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;
89 friend class InsetBoxMailer;
91 docstring editMessage() const;
93 InsetCode lyxCode() const { return BOX_CODE; }
95 docstring name() const;
97 void write(std::ostream &) const;
99 void read(Lexer & lex);
101 void setButtonLabel();
103 void metrics(MetricsInfo &, Dimension &) const;
104 /// show the Box dialog
105 bool showInsetDialog(BufferView * bv) const;
107 DisplayType display() const { return Inline; }
109 bool allowParagraphCustomization(idx_type = 0) { return forceEmptyLayout(); }
111 bool forceEmptyLayout(idx_type = 0) const;
113 bool neverIndent() const { return true; }
115 bool noFontChange() const { return true; }
117 int latex(odocstream &, OutputParams const &) const;
119 int plaintext(odocstream &, OutputParams const &) const;
121 int docbook(odocstream &, OutputParams const &) const;
123 void validate(LaTeXFeatures &) const;
125 InsetBoxParams const & params() const { return params_; }
127 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
129 void doDispatch(Cursor & cur, FuncRequest & cmd);
130 /// Is the width forced to some value?
131 bool hasFixedWidth() const;
133 Inset * clone() const { return new InsetBox(*this); }
134 /// used by the constructors
137 docstring contextMenu(BufferView const & bv, int x, int y) const;
140 InsetBoxParams params_;