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"
16 #include "MailInset.h"
21 class InsetNoteParams {
28 /// \c type defaults to Note
31 void write(std::ostream & os) const;
33 void read(Lexer & lex);
39 /** The PostIt note inset, and other annotations
42 class InsetNote : public InsetCollapsable {
45 InsetNote(Buffer const &, std::string const &);
49 InsetNoteParams const & params() const { return params_; }
52 docstring editMessage() const;
54 InsetCode lyxCode() const { return NOTE_CODE; }
56 docstring name() const;
58 virtual DisplayType display() const;
60 void write(std::ostream &) const;
62 void read(Lexer & lex);
64 void setButtonLabel();
65 /// show the note dialog
66 bool showInsetDialog(BufferView * bv) const;
68 bool isMacroScope() const;
70 int latex(odocstream &, OutputParams const &) const;
72 int plaintext(odocstream &, OutputParams const &) const;
74 int docbook(odocstream &, OutputParams const &) const;
76 void validate(LaTeXFeatures &) const;
78 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
79 // Update the counters of this inset and of its contents
80 void updateLabels(ParIterator const &);
82 void addToToc(ParConstIterator const &) const;
84 void doDispatch(Cursor & cur, FuncRequest & cmd);
86 Inset * clone() const { return new InsetNote(*this); }
87 /// used by the constructors
90 friend class InsetNoteParams;
93 InsetNoteParams params_;
97 class InsetNoteMailer : public MailInset {
100 InsetNoteMailer(InsetNote & inset);
102 virtual Inset & inset() const { return inset_; }
104 virtual std::string const & name() const { return name_; }
106 virtual std::string const inset2string(Buffer const &) const;
108 static std::string const params2string(InsetNoteParams const &);
110 static void string2params(std::string const &, InsetNoteParams &);
114 static std::string const name_;