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"
22 /** The Flex inset, e.g., CharStyle, Custom inset or XML short element
25 class InsetFlex : public InsetCollapsable {
28 InsetFlex(BufferParams const &, InsetLayout const &);
30 docstring name() const { return from_utf8(name_); }
32 /// Is this character style defined in the document's textclass?
33 /// May be wrong after textclass change or paste from another document
34 bool undefined() const;
36 virtual docstring const editMessage() const;
38 InsetCode lyxCode() const { return FLEX_CODE; }
40 void write(Buffer const &, std::ostream &) const;
42 void read(Buffer const & buf, Lexer & lex);
44 bool forceDefaultParagraphs(idx_type) const { return true; }
47 int plaintext(Buffer const &, odocstream &,
48 OutputParams const &) const;
50 int docbook(Buffer const &, odocstream &,
51 OutputParams const &) const;
52 /// the string that is passed to the TOC
53 virtual void textString(Buffer const &, odocstream &) const;
55 /// should paragraph indendation be ommitted in any case?
56 bool neverIndent(Buffer const &) const { return true; }
59 InsetFlex(InsetFlex const &);
62 virtual Inset * clone() const;