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 {
30 /// \c type defaults to Note
33 void write(std::ostream & os) const;
35 void read(LyXLex & lex);
41 /** The PostIt note inset, and other annotations
44 class InsetNote : public InsetCollapsable {
47 InsetNote(BufferParams const &, std::string const &);
51 virtual docstring const editMessage() const;
53 InsetBase::Code lyxCode() const { return InsetBase::NOTE_CODE; }
55 void write(Buffer const &, std::ostream &) const;
57 void read(Buffer const & buf, LyXLex & lex);
59 void setButtonLabel();
60 /// show the note dialog
61 bool showInsetDialog(BufferView * bv) const;
63 int latex(Buffer const &, odocstream &, OutputParams const &) const;
65 int docbook(Buffer const &, odocstream &, OutputParams const &) const;
67 int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
69 void validate(LaTeXFeatures &) const;
71 InsetNoteParams const & params() const { return params_; }
73 bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
75 InsetNote(InsetNote const &);
77 virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
79 friend class InsetNoteParams;
81 virtual std::auto_ptr<InsetBase> doClone() const;
83 /// used by the constructors
86 InsetNoteParams params_;
90 class InsetNoteMailer : public MailInset {
93 InsetNoteMailer(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(InsetNoteParams const &);
103 static void string2params(std::string const &, InsetNoteParams &);
107 static std::string const name_;