]> git.lyx.org Git - lyx.git/blob - src/insets/insetert.h
935ecd9022e083f709f4ac8813dc2ded2aefc75f
[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 "insetcollapsable.h"
22
23 /** A collapsable text inset for LaTeX insertions.
24   
25   To write full ert (including styles and other insets) in a given
26   space. 
27 */
28 class InsetERT : public InsetCollapsable {
29 public:
30         ///
31         InsetERT();
32         ///
33         InsetERT(string const & contents, bool collapsed);
34         ///
35         void read(Buffer const * buf, LyXLex & lex);
36         ///
37         void write(Buffer const * buf, std::ostream & os) const;
38         ///
39         string const editMessage() const;
40         ///
41         bool insertInset(BufferView *, Inset *);
42         ///
43         bool insetAllowed(Inset::Code) const { return false; }
44         ///
45         void setFont(BufferView *, LyXFont const &,
46                              bool toggleall = false, bool selectall = false);
47         ///
48         void edit(BufferView *, int, int, unsigned int);
49         ///
50         void edit(BufferView * bv, bool front = true);
51         ///
52         void insetButtonRelease(BufferView * bv, int x, int y, int button);
53         ///
54         int latex(Buffer const *, std::ostream &, bool fragile,
55                   bool free_spc) const;
56         ///
57         int ascii(Buffer const *,
58                           std::ostream &, int linelen = 0) const;
59         ///
60         int linuxdoc(Buffer const *, std::ostream &) const;
61         ///
62         int docBook(Buffer const *, std::ostream &) const;
63         ///
64         UpdatableInset::RESULT localDispatch(BufferView *, kb_action,
65                                              string const &);
66 private:
67         ///
68         void init();
69         ///
70         string const get_new_label() const;
71 };
72
73 #endif