1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2001 The LyX Team.
9 * ====================================================== */
14 #pragma implementation
19 #include "insetoptarg.h"
20 #include "support/LOstream.h"
21 #include "frontends/Alert.h"
22 #include "support/lstrings.h" //frontStrip, strip
26 #include "BufferView.h"
27 #include "support/lstrings.h"
33 /* OptArg. Used to insert a short version of sectioning header etc.
34 * automatically, or other optional LaTeX arguments */
37 InsetOptArg::InsetOptArg(BufferParams const & ins)
38 : InsetCollapsable(ins, true)
40 LyXFont font(LyXFont::ALL_SANE);
41 font.setColor(LColor::collapsable);
46 InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
47 : InsetCollapsable(in, same_id)
49 LyXFont font(LyXFont::ALL_SANE);
50 font.setColor(LColor::collapsable);
55 Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
57 return new InsetOptArg(*this, same_id);
60 string const InsetOptArg::editMessage() const
62 return _("Opened Optional Argument Inset");
65 void InsetOptArg::write(Buffer const * buf, ostream & os) const
67 os << "OptArg" << "\n";
68 InsetCollapsable::write(buf, os);
71 int InsetOptArg::latex(Buffer const *, ostream &, bool, bool) const
76 int InsetOptArg::latexOptional(Buffer const * buf, ostream & os,
80 int const i = inset.latex(buf, os, false, fp);