4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
8 * \author Martin Vermeer
10 * Full author contact details are available in file CREDITS.
16 #include "InsetCollapsable.h"
17 #include "TextClass.h"
23 /** The Flex inset, e.g., CharStyle, Custom inset or XML short element
26 class InsetFlex : public InsetCollapsable {
29 InsetFlex(BufferParams const &, InsetLayout const &);
31 docstring name() const { return from_utf8(name_); }
33 /// Is this character style defined in the document's textclass?
34 /// May be wrong after textclass change or paste from another document
35 bool undefined() const;
37 virtual docstring const editMessage() const;
39 InsetCode lyxCode() const { return FLEX_CODE; }
41 void write(Buffer const &, std::ostream &) const;
43 void read(Buffer const & buf, Lexer & lex);
45 bool forceDefaultParagraphs(idx_type) const { return true; }
48 int plaintext(Buffer const &, odocstream &,
49 OutputParams const &) const;
51 int docbook(Buffer const &, odocstream &,
52 OutputParams const &) const;
53 /// the string that is passed to the TOC
54 virtual void textString(Buffer const &, odocstream &) const;
56 /// should paragraph indendation be ommitted in any case?
57 bool neverIndent(Buffer const &) const { return true; }
60 InsetFlex(InsetFlex const &);
63 virtual Inset * clone() const;