]> git.lyx.org Git - lyx.git/blob - src/mathed/math_mboxinset.h
rename priv_dispatch to doDispatch
[lyx.git] / src / mathed / math_mboxinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_mboxinset.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_MBOXINSET_H
13 #define MATH_MBOXINSET_H
14
15 #include "math_diminset.h"
16 #include "lyxtext.h"
17
18
19 // almost a substitute for the real text inset...
20
21 class MathMBoxInset : public MathDimInset {
22 public:
23         ///
24         explicit MathMBoxInset(BufferView & bv);
25         /// this stores metrics information in cache_
26         void metrics(MetricsInfo & mi, Dimension & dim) const;
27         /// draw according to cached metrics
28         void draw(PainterInfo &, int x, int y) const;
29         ///
30         bool inMathed() const { return false; }
31         ///
32         bool isActive() const { return true; }
33
34         ///
35         void write(WriteStream & os) const;
36         ///
37         int latex(Buffer const &, std::ostream & os,
38                         OutputParams const & runparams) const;
39         ///
40         LyXText * getText(int) const;
41         ///
42         void getCursorPos(LCursor const & cur, int & x, int & y) const;
43 protected:
44         virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
45
46         ///
47         mutable LyXText text_;
48         ///
49         BufferView * const bv_;
50 private:
51         virtual std::auto_ptr<InsetBase> doClone() const;
52 };
53
54 #endif