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 class InsetFlexParams {
26 void write(std::ostream & os) const;
28 void read(Lexer & lex);
34 /** The Flex inset, e.g., CharStyle, Custom inset or XML short element
37 class InsetFlex : public InsetCollapsable {
40 InsetFlex(BufferParams const &, InsetLayout const &);
42 docstring name() const { return from_ascii("Flex"); }
44 InsetLayout const & getLayout(BufferParams const &) const
46 /// Is this character style defined in the document's textclass?
47 /// May be wrong after textclass change or paste from another document
48 bool undefined() const;
49 /// (Re-)set the character style parameters from \p il
50 void setLayout(InsetLayout const & il);
52 virtual docstring const editMessage() const;
54 InsetCode lyxCode() const { return FLEX_CODE; }
56 void write(Buffer const &, std::ostream &) const;
58 void read(Buffer const & buf, Lexer & lex);
60 bool forceDefaultParagraphs(idx_type) const { return true; }
63 int plaintext(Buffer const &, odocstream &,
64 OutputParams const &) const;
66 int docbook(Buffer const &, odocstream &,
67 OutputParams const &) const;
68 /// the string that is passed to the TOC
69 virtual void textString(Buffer const &, odocstream &) const;
72 InsetFlexParams const & params() const { return params_; }
74 /// should paragraph indendation be ommitted in any case?
75 bool neverIndent(Buffer const &) const { return true; }
78 InsetFlex(InsetFlex const &);
81 friend class InsetFlexParams;
83 virtual Inset * clone() const;
86 InsetFlexParams params_;