]> git.lyx.org Git - lyx.git/blob - src/mathed/math_defs.h
More fonts in mathed.
[lyx.git] / src / mathed / math_defs.h
1 // -*- C++ -*-
2 /*
3  *  File:        math_defs.h
4  *  Purpose:     Math editor definitions 
5  *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
6  *  Created:     January 1996
7  *  Description: Math paragraph and objects for a WYSIWYG math editor.
8  *
9  *  Dependencies: Xlib
10  *
11  *  Copyright: 1996, 1997 Alejandro Aguilar Sierra
12  *
13  *   Version: 0.8beta, Math & Lyx project.
14  *
15  *   You are free to use and modify this code under the terms of
16  *   the GNU General Public Licence version 2 or later.
17  * 
18  */
19
20 #ifndef MATH_DEFS
21 #define MATH_DEFS
22
23 #ifdef __GNUG__
24 #pragma interface
25 #endif
26
27
28 /// Standard Math Sizes (Math mode styles)
29 enum MathStyles {
30         ///
31         LM_ST_DISPLAY = 0,
32         ///
33         LM_ST_TEXT,
34         ///
35         LM_ST_SCRIPT,
36         ///
37         LM_ST_SCRIPTSCRIPT
38 };
39
40 // decrease math size for super- and subscripts
41 MathStyles smallerStyleScript(MathStyles);
42
43 // decrease math size for fractions
44 MathStyles smallerStyleFrac(MathStyles st);
45
46
47
48 /** The restrictions of a standard LaTeX math paragraph
49   allows to get a small number of text codes (<30) */
50 enum MathTextCodes  {
51         /// This must be >= 0
52         LM_TC_MIN = 0,
53         /// Math Inset
54         LM_TC_INSET,
55
56         ///
57         LM_FONT_BEGIN,
58         /// Internal code for variables
59         LM_TC_VAR,
60         ///
61         LM_TC_CONST,
62         ///
63         LM_TC_RM,
64         ///
65         LM_TC_CAL,
66         ///
67         LM_TC_BF,
68         ///
69         LM_TC_SF,
70         ///
71         LM_TC_TT,
72         ///
73         LM_TC_IT,
74         ///
75         LM_TC_TEXTRM,
76         /// Math mode TeX characters ",;:{}"  
77         LM_TC_TEX,
78         /// Internal code when typing greek
79         LM_TC_GREEK,
80         /// Internal code when typing a single greek character
81         LM_TC_GREEK1,
82         /// Internal code for symbols
83         LM_TC_SYMB,
84         /// internal code for symbols that get bigger in displayed math
85         LM_TC_BSYM,
86         ///
87         LM_TC_CMSY,
88         ///
89         LM_TC_CMM,
90         ///
91         LM_TC_CMEX,
92         ///
93         LM_TC_MSA,
94         ///
95         LM_TC_MSB,
96         ///
97         LM_FONT_END,
98         
99         /// This must be < 32 
100         LM_TC_MAX
101 };
102
103
104 /// Types of lyx-math insets 
105 enum MathInsetTypes  {
106         ///
107         LM_OT_SIMPLE = 0,
108         ///
109         LM_OT_EQUATION,
110         /// 
111         LM_OT_EQNARRAY,
112         ///
113         LM_OT_ALIGN,
114         ///
115         LM_OT_ALIGNAT,
116         ///
117         LM_OT_XALIGN,
118         ///
119         LM_OT_XXALIGN,
120         ///
121         LM_OT_MULTLINE,
122         /// An array
123         LM_OT_MATRIX,
124
125         /// A LaTeX macro
126         LM_OT_UNDEF,
127         ///
128         LM_OT_FUNCLIM,
129         ///
130         LM_OT_MACRO,
131         ///
132         LM_OT_MAX
133 };
134
135
136 ///
137 enum MathSymbolTypes {
138         ///
139         LMB_NONE = 0,
140         ///
141         LMB_RELATION,
142         ///
143         LMB_OPERATOR,
144         ///
145         LMB_BOP = (LMB_RELATION | LMB_OPERATOR)
146 };
147
148
149 /// Paragraph permissions
150 enum MathParFlag {
151         LMPF_BASIC = 0,
152         /// If false can use a non-standard size
153         LMPF_FIXED_SIZE = 1,
154         /// If true can insert newlines 
155         LMPF_ALLOW_CR  = 2,
156         /// If true can use tabs
157         LMPF_ALLOW_TAB = 4,
158         /// If true can insert new columns
159         LMPF_ALLOW_NEW_COL = 8,
160         /// Smaller than current size (frac)
161         LMPF_SMALLER = 16,
162         /// Script size (subscript, stackrel)
163         LMPF_SCRIPT = 32
164 };
165
166 #endif