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 const &, std::string const &);
83 static std::string params2string(InsetBoxParams const &);
85 static void string2params(std::string const &, InsetBoxParams &);
88 friend class InsetBoxParams;
90 docstring editMessage() const;
92 InsetCode lyxCode() const { return BOX_CODE; }
94 docstring name() const;
96 void write(std::ostream &) const;
98 void read(Lexer & lex);
100 void setButtonLabel();
102 void metrics(MetricsInfo &, Dimension &) const;
103 /// show the Box dialog
104 bool showInsetDialog(BufferView * bv) const;
106 DisplayType display() const { return Inline; }
108 bool allowParagraphCustomization(idx_type = 0) { return forcePlainLayout(); }
110 bool forcePlainLayout(idx_type = 0) const;
112 bool neverIndent() const { return true; }
114 bool noFontChange() const { return true; }
116 int latex(odocstream &, OutputParams const &) const;
118 int plaintext(odocstream &, OutputParams const &) const;
120 int docbook(odocstream &, OutputParams const &) const;
122 void validate(LaTeXFeatures &) const;
124 InsetBoxParams const & params() const { return params_; }
126 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
128 void doDispatch(Cursor & cur, FuncRequest & cmd);
129 /// Is the width forced to some value?
130 bool hasFixedWidth() const;
132 Inset * clone() const { return new InsetBox(*this); }
133 /// used by the constructors
136 docstring contextMenu(BufferView const & bv, int x, int y) const;
139 InsetBoxParams params_;