]> git.lyx.org Git - lyx.git/blob - src/mathed/math_factory.C
forgotten files again...
[lyx.git] / src / mathed / math_factory.C
1 #include <config.h>
2
3 #include "math_parser.h"
4 #include "math_bigopinset.h"
5 #include "math_decorationinset.h"
6 #include "math_dotsinset.h"
7 #include "math_funcinset.h"
8 #include "math_funcliminset.h"
9 #include "math_fracinset.h"
10 #include "math_macro.h"
11 #include "math_macrotable.h"
12 #include "math_noglyphinset.h"
13 #include "math_rootinset.h"
14 #include "math_spaceinset.h"
15 #include "math_sqrtinset.h"
16 #include "math_symbolinset.h"
17 #include "math_stackrelinset.h"
18
19
20 MathInset * createMathInset(latexkeys const * l)
21 {
22         switch (l->token) {
23                 case LM_TK_NOGLYPH:
24                 case LM_TK_NOGLYPHB:
25                         return new MathNoglyphInset(l);
26                 case LM_TK_BIGSYM:
27                         return new MathBigopInset(l);
28                 case LM_TK_FUNCLIM:
29                         return new MathFuncLimInset(l);
30                 case LM_TK_SYM: 
31                         return new MathSymbolInset(l);
32                 case LM_TK_STACK:
33                         return new MathStackrelInset;
34                 case LM_TK_FRAC:
35                         return new MathFracInset;
36                 case LM_TK_SQRT:
37                         return new MathSqrtInset;
38                 case LM_TK_ROOT:
39                         return new MathRootInset;
40                 case LM_TK_DECORATION:
41                         return new MathDecorationInset(l);
42                 case LM_TK_SPACE:
43                         return new MathSpaceInset(l->id);
44                 case LM_TK_DOTS:
45                         return new MathDotsInset(l);
46         }
47         return new MathFuncInset(l->name);
48 }