X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetTheorem.cpp;h=3dae9df1b2a973049dd1bc8a22ac5d2aea92431c;hb=c3a8b3a566e9e90f9ade72acbc723232d721d0b1;hp=04acc8a6f7d53e35d868d47e2897b28705b96a09;hpb=00e305c9d9bd8b0ff54b6c58adb6192d5934ed60;p=lyx.git diff --git a/src/insets/InsetTheorem.cpp b/src/insets/InsetTheorem.cpp index 04acc8a6f7..3dae9df1b2 100644 --- a/src/insets/InsetTheorem.cpp +++ b/src/insets/InsetTheorem.cpp @@ -1,3 +1,4 @@ +#if 0 /** * \file InsetTheorem.cpp * This file is part of LyX, the document processor. @@ -13,21 +14,18 @@ #include "InsetTheorem.h" #include "insets/InsetText.h" -#include "debug.h" -#include "gettext.h" -#include "LyXFont.h" -#include "LyXText.h" +#include "support/debug.h" +#include "support/gettext.h" +#include "FontInfo.h" +#include "Text.h" #include "MetricsInfo.h" -#include "support/std_ostream.h" +#include +using namespace std; namespace lyx { -using std::endl; -using std::ostream; - - /* The intention is to be able to create arbitrary theorem like environments sing this class and some helper/container classes. It should be possible @@ -35,15 +33,10 @@ using std::ostream; user. */ -InsetTheorem::InsetTheorem() +Inset.heorem::InsetTheorem() : InsetCollapsable() { setLabel(_("theorem")); - LyXFont font(LyXFont::ALL_SANE); - font.decSize(); - font.decSize(); - font.setColor(LColor::collapsable); - setLabelFont(font); #if 0 setAutoCollapse(false); #endif @@ -51,32 +44,27 @@ InsetTheorem::InsetTheorem() } -void InsetTheorem::write(Buffer const * buf, ostream & os) const +void Inset.heorem::write(Buffer const * buf, ostream & os) const { - os << getInsetName() << "\n"; + os << name() << "\n"; InsetCollapsable::write(buf, os); } -auto_ptr InsetTheorem::doClone() const +Inset * InsetTheorem::clone() const { -#ifdef WITH_WARNINGS -#warning Is this inset used? If YES this is WRONG!!! (Jug) -#endif - auto_ptr result(new InsetTheorem); + // FIXME: Is this inset used? If YES this is WRONG!!! (Jug) + InsetTheorem * result = new InsetTheorem; result->setCollapsed(!isOpen()); - return result; } -bool InsetTheorem::metrics(MetricsInfo & mi, Dimension & dim) const + +void Inset.heorem::metrics(MetricsInfo & mi, Dimension & dim) const { InsetCollapsable::metrics(mi, dim); center_indent_ = (mi.base.textwidth - dim.wid) / 2; dim.wid = mi.base.textwidth; - bool const changed = dim_ != dim; - dim_ = dim; - return changed; } @@ -86,13 +74,13 @@ void InsetTOC::draw(PainterInfo & pi, int x, int y) const } -string const InsetTheorem::editMessage() const +string const Inset.heorem::editMessage() const { return _("Opened Theorem Inset"); } -int InsetTheorem::latex(Buffer const * buf, odocstream & os, +int Inset.heorem::latex(Buffer const * buf, odocstream & os, OutputParams const & runparams) const { os << "\\begin{theorem}%\n"; @@ -105,3 +93,5 @@ int InsetTheorem::latex(Buffer const * buf, odocstream & os, } // namespace lyx + +#endif