]> git.lyx.org Git - lyx.git/blob - src/insets/InsetFlex.h
s/cellstruct/CellData/g
[lyx.git] / src / insets / InsetFlex.h
1 // -*- C++ -*-
2 /**
3  * \file InsetFlex.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  * \author Martin Vermeer
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef INSETFLEX_H
14 #define INSETFLEX_H
15
16 #include "InsetCollapsable.h"
17
18 using std::string;
19
20 namespace lyx {
21
22
23 /** The Flex inset, e.g., CharStyle, Custom inset or XML short element
24
25 */
26 class InsetFlex : public InsetCollapsable {
27 public:
28         ///
29         InsetFlex(BufferParams const &,TextClassPtr tc, 
30                         string const & layoutName);
31         ///
32         docstring name() const { return from_utf8(name_); }
33
34         ///
35         docstring editMessage() const;
36         ///
37         InsetCode lyxCode() const { return FLEX_CODE; }
38         ///
39         void write(std::ostream &) const;
40         ///
41         void read(Lexer & lex);
42         ///
43         virtual bool allowParagraphCustomization(idx_type) const { return false; }
44
45         ///
46         int plaintext(odocstream &, OutputParams const &) const;
47         ///
48         int docbook(odocstream &, OutputParams const &) const;
49         /// the string that is passed to the TOC
50         void textString(odocstream &) const;
51         ///
52         void validate(LaTeXFeatures &) const;
53
54         /// should paragraph indendation be ommitted in any case?
55         bool neverIndent() const { return true; }
56
57 protected:
58         InsetFlex(InsetFlex const &);
59
60 private:
61         virtual Inset * clone() const;
62
63         ///
64         std::string name_;
65         ///
66         std::set<std::string> packages_;
67         ///
68         std::string preamble_;
69 };
70
71
72 } // namespace lyx
73
74 #endif