]> git.lyx.org Git - lyx.git/blob - src/mathed/math_defs.h
LyX Drinkers Union: patch 1
[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
41 /** The restrictions of a standard LaTeX math paragraph
42   allows to get a small number of text codes (<30) */
43 enum MathTextCodes  {
44         /// This must be >= 0
45         LM_TC_MIN = 0,
46         /// Open and Close group
47         LM_TC_OPEN,
48         ///
49         LM_TC_CLOSE,
50         /// Math Inset
51         LM_TC_INSET,
52         /// Super and sub scripts
53         LM_TC_UP,
54         ///
55         LM_TC_DOWN,
56         /// Editable Math Inset
57         LM_TC_ACTIVE_INSET,
58         /// Editable Text Inset
59         LM_TC_TEXT_INSET,
60         ///
61         LM_FONT_BEGIN,
62         /// Internal code for constants  11
63         LM_TC_CONST,
64         /// Internal code for variables
65         LM_TC_VAR,
66         ///
67         LM_TC_RM,
68         ///
69         LM_TC_CAL,
70         ///
71         LM_TC_BF,
72         ///
73         LM_TC_SF,
74         ///
75         LM_TC_TT,
76         ///
77         LM_TC_IT,
78         ///
79         LM_TC_TEXTRM,
80         /// Math mode TeX characters ",;:{}"  20
81         LM_TC_TEX,
82         /// Special characters "{}&#_%"
83         LM_TC_SPECIAL,
84         /// Internal code for operators  22
85         LM_TC_BOP,
86         /// Internal code for symbols
87         LM_TC_SYMB,
88         ///
89         LM_TC_BOPS,
90         ///
91         LM_TC_BSYM,
92         ///
93         LM_FONT_END,
94         
95         /// This must be < 32 
96         LM_TC_MAX
97 };
98
99
100 /// Types of lyx-math insets 
101 enum MathInsetTypes  {
102         ///
103         LM_OT_SIMPLE = 0,
104         ///
105         LM_OT_EQUATION,
106         /// 
107         LM_OT_EQNARRAY,
108         ///
109         LM_OT_ALIGN,
110         ///
111         LM_OT_ALIGNAT,
112         ///
113         LM_OT_XALIGN,
114         ///
115         LM_OT_XXALIGN,
116         ///
117         LM_OT_MULTLINE,
118         /// An array
119         LM_OT_MATRIX,
120
121         /// A big operator
122         LM_OT_BIGOP,
123         /// A LaTeX macro
124         LM_OT_UNDEF,
125         ///
126         LM_OT_FUNC,
127         ///
128         LM_OT_FUNCLIM,
129         ///
130         LM_OT_SCRIPT,
131         ///
132         LM_OT_SPACE,
133         ///
134         LM_OT_DOTS,
135         /// A fraction
136         LM_OT_FRAC,
137         ///
138         LM_OT_ATOP,
139         ///
140         LM_OT_STACKREL,
141         /// A radical
142         LM_OT_SQRT,
143         /// A delimiter
144         LM_OT_DELIM,
145         /// A decoration
146         LM_OT_DECO,
147         /// An accent
148         LM_OT_ACCENT,
149         ///
150         LM_OT_MACRO,
151         ///
152         LM_OT_MAX
153 };
154
155
156 ///
157 enum MathBinaryTypes {
158         ///
159         LMB_NONE = 0,
160         ///
161         LMB_RELATION,
162         ///
163         LMB_OPERATOR,
164         ///
165         LMB_BOP = (LMB_RELATION | LMB_OPERATOR)
166 };
167
168
169 /// Paragraph permissions
170 enum MathParFlag {
171         LMPF_BASIC = 0,
172         /// If false can use a non-standard size
173         LMPF_FIXED_SIZE = 1,
174         /// If true can insert newlines 
175         LMPF_ALLOW_CR  = 2,
176         /// If true can use tabs
177         LMPF_ALLOW_TAB = 4,
178         /// If true can insert new columns
179         LMPF_ALLOW_NEW_COL = 8,
180         /// Smaller than current size (frac)
181         LMPF_SMALLER = 16,
182         /// Script size (subscript, stackrel)
183         LMPF_SCRIPT = 32
184 };
185
186 #endif