X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsettheorem.C;h=9ea8506ba20409b33db65e96f6383bcd66e7ae01;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=637e4933c7ba011ef69175275d33bf3bf7f39330;hpb=77639efa94ce5c071cf47bfd3ba0026f157a1e6a;p=lyx.git diff --git a/src/insets/insettheorem.C b/src/insets/insettheorem.C index 637e4933c7..9ea8506ba2 100644 --- a/src/insets/insettheorem.C +++ b/src/insets/insettheorem.C @@ -40,54 +40,45 @@ InsetTheorem::InsetTheorem() LyXFont font(LyXFont::ALL_SANE); font.decSize(); font.decSize(); - font.setColor(LColor::footnote); + font.setColor(LColor::collapsable); setLabelFont(font); +#if 0 setAutoCollapse(false); +#endif setInsetName("Theorem"); } -void InsetTheorem::Write(Buffer const * buf, ostream & os) const +void InsetTheorem::write(Buffer const * buf, ostream & os) const { os << getInsetName() << "\n"; - InsetCollapsable::Write(buf, os); + InsetCollapsable::write(buf, os); } -Inset * InsetTheorem::Clone(Buffer const &) const +Inset * InsetTheorem::clone(Buffer const &, bool) const { +#warning Is this inset used? If YES this is WRONG!!! (Jug) InsetTheorem * result = new InsetTheorem; - result->collapsed = collapsed; + result->collapsed_ = collapsed_; return result; } -string const InsetTheorem::EditMessage() const +string const InsetTheorem::editMessage() const { return _("Opened Theorem Inset"); } -int InsetTheorem::Latex(Buffer const * buf, +int InsetTheorem::latex(Buffer const * buf, ostream & os, bool fragile, bool fp) const { os << "\\begin{theorem}%\n"; - int i = inset.Latex(buf, os, fragile, fp); + int i = inset.latex(buf, os, fragile, fp); os << "\\end{theorem}%\n"; return i + 2; } - - -bool InsetTheorem::InsertInsetAllowed(Inset * inset) const -{ - lyxerr << "InsetTheorem::InsertInsetAllowed" << endl; - - if ((inset->LyxCode() == Inset::FOOT_CODE) || - (inset->LyxCode() == Inset::MARGIN_CODE)) { - return false; - } - return true; -}