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 "InsetCollapsible.h"
21 /** The Flex inset, e.g., CharStyle, Custom inset or XML short element
24 class InsetFlex : public InsetCollapsible {
27 InsetFlex(Buffer *, std::string const & layoutName);
29 docstring layoutName() const override { return from_utf8("Flex:" + name_); }
31 InsetLayout const & getLayout() const override;
33 InsetCode lyxCode() const override { return FLEX_CODE; }
35 InsetDecoration decoration() const override;
37 void write(std::ostream &) const override;
38 /// should paragraph indentation be omitted in any case?
39 bool neverIndent() const override { return true; }
41 bool hasSettings() const override { return false; }
43 bool canTrackChanges() const override { return name_ != "URL"; }
45 bool getStatus(Cursor & cur, FuncRequest const & cmd,
46 FuncStatus &) const override;
48 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
50 void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false) override;
54 InsetFlex(InsetFlex const &);
58 Inset * clone() const override { return new InsetFlex(*this); }