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 /// Is there a parbox?
36 /// Is there a makebox?
38 /// Do we have an inner parbox or minipage to format paragraphs to
43 /// "special" widths, see usrguide.dvi ยง3.5
54 std::string height_special;
59 ///////////////////////////////////////////////////////////////////////
61 // The fbox/fancybox inset
63 ///////////////////////////////////////////////////////////////////////
66 class InsetBox : public InsetCollapsable
81 InsetBox(Buffer *, std::string const &);
83 static std::string params2string(InsetBoxParams const &);
85 static void string2params(std::string const &, InsetBoxParams &);
87 InsetBoxParams const & params() const { return params_; }
90 friend class InsetBoxParams;
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;
104 DisplayType display() const { return Inline; }
106 bool allowParagraphCustomization(idx_type = 0) const { return !forcePlainLayout(); }
108 bool forcePlainLayout(idx_type = 0) const;
110 bool neverIndent() const { return true; }
112 bool noFontChange() const { return true; }
114 int latex(odocstream &, OutputParams const &) const;
116 int plaintext(odocstream &, OutputParams const &) const;
118 int docbook(odocstream &, OutputParams const &) const;
120 docstring xhtml(XHTMLStream &, OutputParams const &) const;
122 void validate(LaTeXFeatures &) const;
124 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
126 void doDispatch(Cursor & cur, FuncRequest & cmd);
127 /// Is the width forced to some value?
128 bool hasFixedWidth() const;
130 Inset * clone() const { return new InsetBox(*this); }
131 /// used by the constructors
134 docstring contextMenu(BufferView const & bv, int x, int y) const;
137 InsetBoxParams params_;