X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetTheorem.cpp;h=3dae9df1b2a973049dd1bc8a22ac5d2aea92431c;hb=c3a8b3a566e9e90f9ade72acbc723232d721d0b1;hp=edd28f4bd6f85f5482f0b2bf03df8ecf7b4224a2;hpb=e0d54dd3b497b78094ea16ab0f38ccdc8c1642e2;p=lyx.git diff --git a/src/insets/InsetTheorem.cpp b/src/insets/InsetTheorem.cpp index edd28f4bd6..3dae9df1b2 100644 --- a/src/insets/InsetTheorem.cpp +++ b/src/insets/InsetTheorem.cpp @@ -1,5 +1,6 @@ +#if 0 /** - * \file Inset.heorem.cpp + * \file InsetTheorem.cpp * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -10,24 +11,21 @@ #include -#include "Inset.heorem.h" +#include "InsetTheorem.h" #include "insets/InsetText.h" -#include "debug.h" -#include "gettext.h" -#include "Font.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 @@ -39,11 +37,6 @@ Inset.heorem::InsetTheorem() : InsetCollapsable() { setLabel(_("theorem")); - Font font(Font::ALL_SANE); - font.decSize(); - font.decSize(); - font.setColor(Color::collapsable); - setLabelFont(font); #if 0 setAutoCollapse(false); #endif @@ -53,30 +46,25 @@ Inset.heorem::InsetTheorem() void Inset.heorem::write(Buffer const * buf, ostream & os) const { - os << insetName() << "\n"; + os << name() << "\n"; InsetCollapsable::write(buf, os); } -auto_ptr Inset.heorem::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 Inset.heorem::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; } @@ -105,3 +93,5 @@ int Inset.heorem::latex(Buffer const * buf, odocstream & os, } // namespace lyx + +#endif