} // anon
-InsetBox::InsetBox(BufferParams const & bp, string const & label)
- : InsetCollapsable(bp), params_(label)
+InsetBox::InsetBox(Buffer const & buffer, string const & label)
+ : InsetCollapsable(buffer), params_(label)
{
if (forceEmptyLayout())
- paragraphs().back().layout(bp.textClass().emptyLayout());
+ paragraphs().back().setLayout(buffer.params().documentClass().emptyLayout());
}
-InsetBox::InsetBox(InsetBox const & in)
- : InsetCollapsable(in), params_(in.params_)
-{}
-
-
InsetBox::~InsetBox()
{
InsetBoxMailer(*this).hideDialog();
}
-Inset * InsetBox::clone() const
-{
- return new InsetBox(*this);
-}
-
-
-docstring const InsetBox::editMessage() const
+docstring InsetBox::editMessage() const
{
return _("Opened Box Inset");
}
docstring InsetBox::name() const
{
// FIXME: UNICODE
- string name = string("Box");
+ string name = "Box";
if (boxtranslator().find(params_.type) == Shaded)
name += string(":Shaded");
return from_ascii(name);
}
-void InsetBox::write(Buffer const & buf, ostream & os) const
+void InsetBox::write(ostream & os) const
{
params_.write(os);
- InsetCollapsable::write(buf, os);
+ InsetCollapsable::write(os);
}
-void InsetBox::read(Buffer const & buf, Lexer & lex)
+void InsetBox::read(Lexer & lex)
{
params_.read(lex);
- InsetCollapsable::read(buf, lex);
+ InsetCollapsable::read(lex);
}
bool InsetBox::hasFixedWidth() const
{
- return params_.inner_box || params_.special != "width";
+ return params_.inner_box || params_.special != "width";
}
}
-bool InsetBox::forceEmptyLayout() const
+bool InsetBox::forceEmptyLayout(idx_type) const
{
return !params_.inner_box;
}
}
-bool InsetBox::isMacroScope(Buffer const &) const
-{
- BoxType btype = boxtranslator().find(params_.type);
- return btype != Frameless || params_.inner_box;
-}
-
-
-int InsetBox::latex(Buffer const & buf, odocstream & os,
- OutputParams const & runparams) const
+int InsetBox::latex(odocstream & os, OutputParams const & runparams) const
{
BoxType btype = boxtranslator().find(params_.type);
string width_string = params_.width.asLatexString();
- bool stdwidth(false);
+ bool stdwidth = false;
if (params_.inner_box &&
(width_string.find("1.0\\columnwidth") != string::npos
|| width_string.find("1.0\\textwidth") != string::npos)) {
os << "\\begin{shaded}%\n";
i += 1;
- i += InsetText::latex(buf, os, runparams);
+ i += InsetText::latex(os, runparams);
if (btype == Shaded)
os << "\\end{shaded}";
}
-int InsetBox::plaintext(Buffer const & buf, odocstream & os,
- OutputParams const & runparams) const
+int InsetBox::plaintext(odocstream & os, OutputParams const & runparams) const
{
BoxType const btype = boxtranslator().find(params_.type);
break;
}
- InsetText::plaintext(buf, os, runparams);
+ InsetText::plaintext(os, runparams);
int len = 0;
switch (btype) {
}
-int InsetBox::docbook(Buffer const & buf, odocstream & os,
- OutputParams const & runparams) const
+int InsetBox::docbook(odocstream & os, OutputParams const & runparams) const
{
- return InsetText::docbook(buf, os, runparams);
+ return InsetText::docbook(os, runparams);
}