]> git.lyx.org Git - lyx.git/blob - src/mathed/math_textinset.h
Ensure all #warning statements are wrapped by #ifdef WITH_WARNINGS.
[lyx.git] / src / mathed / math_textinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_textinset.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_TEXTINSET_H
13 #define MATH_TEXTINSET_H
14
15 #include "math_gridinset.h"
16
17
18 // not yet a substitute for the real text inset...
19
20 class MathTextInset : public MathNestInset {
21 public:
22         ///
23         MathTextInset();
24         ///
25         std::auto_ptr<InsetBase> clone() const;
26         /// get cursor position
27         void getCursorPos(LCursor const & cur, int & x, int & y) const;
28         /// this stores metrics information in cache_
29         void metrics(MetricsInfo & mi, Dimension & dim) const;
30         /// draw according to cached metrics
31         void draw(PainterInfo &, int x, int y) const;
32         /// draw selection background
33         //void drawSelection(PainterInfo & pi,
34         //      idx_type idx1, pos_type pos1, idx_type idx2, pos_type pos2) const;
35         /// moves cursor up or down
36         //bool idxUpDown2(LCursor & pos, bool up) const;
37 protected:
38         /// row corresponding to given position
39         idx_type pos2row(pos_type pos) const;
40         /// cached metrics
41         mutable MathGridInset cache_;
42 };
43
44 #endif