4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
15 #include "insetcollapsable.h"
18 struct InsetNoteParams {
20 void write(std::ostream & os) const;
22 void read(LyXLex & lex);
28 /** The PostIt note inset, and other annotations
31 class InsetNote : public InsetCollapsable {
34 InsetNote(BufferParams const &, std::string const &);
36 InsetNote(InsetNote const &);
40 virtual std::auto_ptr<InsetBase> clone() const;
42 std::string const editMessage() const;
44 InsetOld::Code lyxCode() const { return InsetOld::NOTE_CODE; }
46 void write(Buffer const &, std::ostream &) const;
48 void read(Buffer const & buf, LyXLex & lex);
50 void setButtonLabel();
51 /// show the note dialog
52 bool showInsetDialog(BufferView * bv) const;
54 int latex(Buffer const &, std::ostream &,
55 OutputParams const &) const;
57 int linuxdoc(Buffer const &, std::ostream &,
58 OutputParams const &) const;
60 int docbook(Buffer const &, std::ostream &,
61 OutputParams const &) const;
63 int plaintext(Buffer const &, std::ostream &,
64 OutputParams const &) const;
66 void validate(LaTeXFeatures &) const;
68 InsetNoteParams const & params() const { return params_; }
73 priv_dispatch(FuncRequest const &, idx_type &, pos_type &);
75 friend class InsetNoteParams;
77 /// used by the constructors
80 InsetNoteParams params_;
84 #include "mailinset.h"
86 class InsetNoteMailer : public MailInset {
89 InsetNoteMailer(std::string const & name, InsetNote & inset);
91 virtual InsetBase & inset() const { return inset_; }
93 virtual std::string const & name() const { return name_; }
95 virtual std::string const inset2string(Buffer const &) const;
97 static std::string const params2string(std::string const &, InsetNoteParams const &);
99 static void string2params(std::string const &, InsetNoteParams &);
103 std::string const name_;