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"
26 InsetBoxParams(std::string const &);
28 void write(std::ostream & os) const;
30 void read(Lexer & lex);
34 /// Use a parbox (true) or minipage (false)
36 /// Do we have an inner parbox or minipage to format paragraphs to
41 /// "special" widths, see usrguide.dvi ยง3.5
52 std::string height_special;
57 ///////////////////////////////////////////////////////////////////////
59 // The fbox/fancybox inset
61 ///////////////////////////////////////////////////////////////////////
64 class InsetBox : public InsetCollapsable
79 InsetBox(Buffer *, std::string const &);
81 static std::string params2string(InsetBoxParams const &);
83 static void string2params(std::string const &, InsetBoxParams &);
85 InsetBoxParams const & params() const { return params_; }
88 friend class InsetBoxParams;
90 InsetCode lyxCode() const { return BOX_CODE; }
92 docstring name() const;
94 void write(std::ostream &) const;
96 void read(Lexer & lex);
98 void setButtonLabel();
100 void metrics(MetricsInfo &, Dimension &) const;
102 DisplayType display() const { return Inline; }
104 bool allowParagraphCustomization(idx_type = 0) const { return !forcePlainLayout(); }
106 bool forcePlainLayout(idx_type = 0) const;
108 bool neverIndent() const { return true; }
110 bool noFontChange() const { return true; }
112 int latex(odocstream &, OutputParams const &) const;
114 int plaintext(odocstream &, OutputParams const &) const;
116 int docbook(odocstream &, OutputParams const &) const;
118 docstring xhtml(XHTMLStream &, OutputParams const &) const;
120 void validate(LaTeXFeatures &) const;
122 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
124 void doDispatch(Cursor & cur, FuncRequest & cmd);
125 /// Is the width forced to some value?
126 bool hasFixedWidth() const;
128 Inset * clone() const { return new InsetBox(*this); }
129 /// used by the constructors
132 docstring contextMenu(BufferView const & bv, int x, int y) const;
135 InsetBoxParams params_;