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
11 * Full author contact details are available in file CREDITS.
17 #include "InsetCollapsable.h"
27 InsetBoxParams(std::string const &);
29 void write(std::ostream & os) const;
31 void read(Lexer & lex);
35 /// Is there a parbox?
37 /// Is there a makebox?
39 /// Do we have an inner parbox or minipage to format paragraphs to
44 /// "special" widths, see usrguide.dvi §3.5
55 std::string height_special;
66 ///////////////////////////////////////////////////////////////////////
68 // The fbox/fancybox inset
70 ///////////////////////////////////////////////////////////////////////
73 class InsetBox : public InsetCollapsable
88 InsetBox(Buffer *, std::string const &);
91 static std::string params2string(InsetBoxParams const &);
93 static void string2params(std::string const &, InsetBoxParams &);
95 InsetBoxParams const & params() const { return params_; }
97 /// \name Public functions inherited from Inset class
100 InsetCode lyxCode() const { return BOX_CODE; }
102 docstring layoutName() const;
104 void write(std::ostream &) const;
106 void read(Lexer & lex);
108 void metrics(MetricsInfo &, Dimension &) const;
110 DisplayType display() const { return Inline; }
112 ColorCode backgroundColor(PainterInfo const &) const;
114 bool allowParagraphCustomization(idx_type = 0) const { return !forcePlainLayout(); }
116 bool allowMultiPar() const;
118 bool forcePlainLayout(idx_type = 0) const;
120 bool neverIndent() const { return true; }
122 bool inheritFont() const { return false; }
124 void latex(otexstream &, OutputParams const &) const;
126 int plaintext(odocstringstream & ods, OutputParams const & op,
127 size_t max_length = INT_MAX) const;
129 int docbook(odocstream &, OutputParams const &) const;
131 docstring xhtml(XHTMLStream &, OutputParams const &) const;
133 void validate(LaTeXFeatures &) const;
135 bool hasFixedWidth() const;
137 std::string contextMenuName() const;
140 /// \name Public functions inherited from InsetCollapsable class
143 void setButtonLabel();
147 /// \name Protected functions inherited from Inset class
150 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
152 void doDispatch(Cursor & cur, FuncRequest & cmd);
154 Inset * clone() const { return new InsetBox(*this); }
158 /// used by the constructors
162 friend class InsetBoxParams;
163 InsetBoxParams params_;