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"
20 /** The Flex inset, e.g., CharStyle, Custom inset or XML short element
23 class InsetFlex : public InsetCollapsable {
26 InsetFlex(Buffer const &, std::string const & layoutName);
28 docstring name() const { return from_utf8(name_); }
31 docstring editMessage() const;
33 InsetCode lyxCode() const { return FLEX_CODE; }
35 void write(std::ostream &) const;
37 void read(Lexer & lex);
40 int plaintext(odocstream &, OutputParams const &) const;
42 int docbook(odocstream &, OutputParams const &) const;
43 /// the string that is passed to the TOC
44 void tocString(odocstream &) const;
46 /// should paragraph indendation be ommitted in any case?
47 bool neverIndent() const { return true; }
50 InsetFlex(InsetFlex const &);
53 Inset * clone() const { return new InsetFlex(*this); }
54 // FIXME The following two routines should be moved to InsetCollapsable.
55 // That will allow the redeclarations of these routines to be removed
56 // from its subclasses, such as InsetERT. But it will also require us
57 // to rework stdinsets.inc, to make sure we get the right behavior from
59 /// should paragraphs be forced to use the empty layout?
60 virtual bool forcePlainLayout(idx_type = 0) const
61 { return getLayout().forcePlainLayout(); }
62 /// should the user be allowed to customize alignment, etc.?
63 virtual bool allowParagraphCustomization(idx_type = 0) const
64 { return getLayout().allowParagraphCustomization(); }