]> git.lyx.org Git - lyx.git/blob - src/insets/insetert.h
99e5294647c622db48b6d249e1789dbd1eb0ff58
[lyx.git] / src / insets / insetert.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1998 The LyX Team.
8  *
9  *======================================================
10  */
11 // The pristine updatable inset: Text
12
13
14 #ifndef INSETERT_H
15 #define INSETERT_H
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "insettext.h"
22
23 class Painter;
24
25 /** A colapsable text inset
26   
27   To write full ert (including styles and other insets) in a given
28   space. 
29 */
30 class InsetERT : public InsetText {
31 public:
32     ///
33     InsetERT(Buffer *);
34     ///
35     //     InsetERT(InsetERT const &, Buffer *);
36     ///
37     ~InsetERT() {}
38     ///
39     InsetERT * Clone() const;
40     ///
41     //    void Read(LyXLex &);
42     ///
43     void Write(ostream &) const;
44     ///
45     int ascent(Painter &, LyXFont const &) const;
46     ///
47     int descent(Painter &, LyXFont const &) const;
48     ///
49     int width(Painter &, LyXFont const & f) const;
50     ///
51     void draw(Painter & pain, const LyXFont &, int , float &) const;
52     ///
53     //LString EditMessage() const;
54     ///
55     void InsetButtonRelease(BufferView *, int, int, int);
56     ///
57     void InsetButtonPress(BufferView *, int, int, int);
58     ///
59     void InsetMotionNotify(BufferView *, int, int, int);
60     ///
61     void Edit(BufferView *, int, int, unsigned int);
62     ///
63     void InsetUnlock(BufferView *);
64     ///
65     bool InsertInset(Inset *);
66     ///
67     void SetFont(LyXFont const &, bool toggleall);
68
69 protected:
70     ///
71     int ascent_closed(Painter &, LyXFont const &) const;
72     ///
73     int descent_closed(Painter &, LyXFont const &) const;
74     ///
75     int width_closed(Painter &, LyXFont const & f) const;
76     ///
77     void draw_closed(Painter & pain, LyXFont const &, int , float &) const;
78
79 private:
80         ///
81         bool closed;
82         ///
83         bool nomotion;
84 };
85
86 #endif