]> git.lyx.org Git - lyx.git/blob - src/insets/InsetFlex.h
c38cecff1054ab8a360ea508f9cb2020d42f6ab6
[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 namespace lyx {
19
20 /** The Flex inset, e.g., CharStyle, Custom inset or XML short element
21
22 */
23 class InsetFlex : public InsetCollapsable {
24 public:
25         ///
26         InsetFlex(Buffer const &, std::string const & layoutName);
27         ///
28         docstring name() const { return from_utf8(name_); }
29
30         ///
31         docstring editMessage() const;
32         ///
33         InsetCode lyxCode() const { return FLEX_CODE; }
34         ///
35         void write(std::ostream &) const;
36         ///
37         void read(Lexer & lex);
38
39         ///
40         int plaintext(odocstream &, OutputParams const &) const;
41         ///
42         int docbook(odocstream &, OutputParams const &) const;
43         /// the string that is passed to the TOC
44         void tocString(odocstream &) const;
45
46         /// should paragraph indendation be ommitted in any case?
47         bool neverIndent() const { return true; }
48
49 protected:
50         InsetFlex(InsetFlex const &);
51
52 private:
53         Inset * clone() const { return new InsetFlex(*this); }
54         ///
55         std::string name_;
56 };
57
58
59 } // namespace lyx
60
61 #endif