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);
46 setAutoCollapse(false);
48 setInsetName("Theorem");
52 void InsetTheorem::write(Buffer const * buf, ostream & os) const
54 os << getInsetName() << "\n";
55 InsetCollapsable::write(buf, os);
59 Inset * InsetTheorem::clone(Buffer const &, bool) const
62 #warning Is this inset used? If YES this is WRONG!!! (Jug)
64 InsetTheorem * result = new InsetTheorem;
66 result->collapsed_ = collapsed_;
71 string const InsetTheorem::editMessage() const
73 return _("Opened Theorem Inset");
77 int InsetTheorem::latex(Buffer const * buf,
78 ostream & os, bool fragile, bool fp) const
80 os << "\\begin{theorem}%\n";
82 int i = inset.latex(buf, os, fragile, fp);
83 os << "\\end{theorem}%\n";