]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QMath.h
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / QMath.h
1 // -*- C++ -*-
2 /**
3  * \file QMath.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef QMATH_H
13 #define QMATH_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "LString.h"
20
21 class QMathDialog;
22
23 class QMath {
24 public:
25         friend class QMathDialog;
26
27         QMath();
28
29         /// temporary
30         void do_show();
31
32         /// build the dialog (should be private)
33         virtual void build_dialog();
34
35         /// insert a math symbol into the doc
36         void insert(string const & name);
37
38         /// insert a cube root
39         void insertCubeRoot();
40
41         /// insert a matrix
42         void insertMatrix(string const & str);
43
44         /// insert delim
45         void insertDelim(string const & str);
46
47         /// add a subscript
48         void subscript();
49
50         /// add a superscript
51         void superscript();
52
53         /// switch between display and inline
54         void toggleDisplay();
55 private:
56         /// Apply changes
57         virtual void apply() {}
58         /// update
59         virtual void update_contents() {}
60
61         // FIXME: temp
62         QMathDialog * dialog_;
63 };
64
65 #endif // QMATH_H