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 {
36 InsetNote(BufferParams const &, std::string const &);
38 InsetNote(InsetNote const &);
42 virtual std::auto_ptr<InsetBase> clone() const;
44 std::string const editMessage() const;
46 InsetOld::Code lyxCode() const { return InsetOld::NOTE_CODE; }
48 void write(Buffer const &, std::ostream &) const;
50 void read(Buffer const & buf, LyXLex & lex);
52 void setButtonLabel();
54 void metrics(MetricsInfo &, Dimension &) const;
55 /// show the note dialog
56 bool showInsetDialog(BufferView * bv) const;
58 int latex(Buffer const &, std::ostream &,
59 OutputParams const &) const;
61 int linuxdoc(Buffer const &, std::ostream &,
62 OutputParams const &) const;
64 int docbook(Buffer const &, std::ostream &,
65 OutputParams const &) const;
67 int plaintext(Buffer const &, std::ostream &,
68 OutputParams const &) const;
70 void validate(LaTeXFeatures &) const;
72 InsetNoteParams const & params() const { return params_; }
77 priv_dispatch(FuncRequest const &, idx_type &, pos_type &);
79 friend class InsetNoteParams;
81 /// used by the constructors
84 InsetNoteParams params_;
88 #include "mailinset.h"
90 class InsetNoteMailer : public MailInset {
93 InsetNoteMailer(std::string const & name, InsetNote & inset);
95 virtual InsetBase & inset() const { return inset_; }
97 virtual std::string const & name() const { return name_; }
99 virtual std::string const inset2string(Buffer const &) const;
101 static std::string const params2string(std::string const &, InsetNoteParams const &);
103 static void string2params(std::string const &, InsetNoteParams &);
107 std::string const name_;