}
-InsetCollapsable::InsetCollapsable(Buffer const & buf,
- CollapseStatus status)
- : InsetText(buf), status_(status),
+InsetCollapsable::InsetCollapsable(Buffer const & buf)
+ : InsetText(buf), status_(Inset::Open),
openinlined_(false), autoOpen_(false), mouse_hover_(false)
{
DocumentClass const & dc = buf.params().documentClass();
setAutoBreakRows(true);
setDrawFrame(true);
setFrameColor(Color_collapsableframe);
- paragraphs().back().setLayout(dc.plainLayout());
+ paragraphs().back().setLayout(dc.plainLayout());
}
// collapsable insets should not redefine this, non-standard ones may
// call this.
if (!layout_->latexname().empty()) {
- if (layout_->latextype() == "command") {
+ if (layout_->latextype() == InsetLayout::COMMAND) {
// FIXME UNICODE
if (runparams.moving_arg)
os << "\\protect";
if (!layout_->latexparam().empty())
os << from_utf8(layout_->latexparam());
os << '{';
- } else if (layout_->latextype() == "environment") {
+ } else if (layout_->latextype() == InsetLayout::ENVIRONMENT) {
os << "%\n\\begin{" << from_utf8(layout_->latexname()) << "}\n";
if (!layout_->latexparam().empty())
os << from_utf8(layout_->latexparam());
rp.moving_arg = true;
int i = InsetText::latex(os, rp);
if (!layout_->latexname().empty()) {
- if (layout_->latextype() == "command") {
+ if (layout_->latextype() == InsetLayout::COMMAND) {
os << "}";
- } else if (layout_->latextype() == "environment") {
+ } else if (layout_->latextype() == InsetLayout::ENVIRONMENT) {
os << "\n\\end{" << from_utf8(layout_->latexname()) << "}\n";
i += 4;
}