1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1998 The LyX Team.
8 * ======================================================
14 #pragma implementation
17 #include "insettheorem.h"
20 #include "BufferView.h"
22 #include "support/LOstream.h"
24 #include "insets/insettext.h"
30 The intention is to be able to create arbitrary theorem like environments
31 sing this class and some helper/container classes. It should be possible
32 to create these theorems both from layout file and interactively by the
36 InsetTheorem::InsetTheorem()
39 setLabel(_("theorem"));
40 LyXFont font(LyXFont::ALL_SANE);
43 font.setColor(LColor::collapsable);
45 setAutoCollapse(false);
46 setInsetName("Theorem");
50 void InsetTheorem::write(Buffer const * buf, ostream & os) const
52 os << getInsetName() << "\n";
53 InsetCollapsable::write(buf, os);
57 Inset * InsetTheorem::clone(Buffer const &, bool) const
59 #warning Is this inset used? If YES this is WRONG!!! (Jug)
60 InsetTheorem * result = new InsetTheorem;
62 result->collapsed_ = collapsed_;
67 string const InsetTheorem::editMessage() const
69 return _("Opened Theorem Inset");
73 int InsetTheorem::latex(Buffer const * buf,
74 ostream & os, bool fragile, bool fp) const
76 os << "\\begin{theorem}%\n";
78 int i = inset.latex(buf, os, fragile, fp);
79 os << "\\end{theorem}%\n";