+#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.
*
#include <config.h>
-#include "Inset.heorem.h"
+#include "InsetTheorem.h"
#include "insets/InsetText.h"
-#include "debug.h"
-#include "gettext.h"
-#include "Font.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 <ostream>
+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
: InsetCollapsable()
{
setLabel(_("theorem"));
- Font font(Font::ALL_SANE);
- font.decSize();
- font.decSize();
- font.setColor(Color::collapsable);
- setLabelFont(font);
#if 0
setAutoCollapse(false);
#endif
void Inset.heorem::write(Buffer const * buf, ostream & os) const
{
- os << insetName() << "\n";
+ os << name() << "\n";
InsetCollapsable::write(buf, os);
}
-auto_ptr<Inset> 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<Inset.heorem> 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;
}
} // namespace lyx
+
+#endif