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 class InsetNoteParams {
27 /// \c type defaults to Note
30 void write(std::ostream & os) const;
32 void read(LyXLex & lex);
38 /** The PostIt note inset, and other annotations
41 class InsetNote : public InsetCollapsable {
44 InsetNote(BufferParams const &, std::string const &);
48 std::string const editMessage() const;
50 InsetBase::Code lyxCode() const { return InsetBase::NOTE_CODE; }
52 void write(Buffer const &, std::ostream &) const;
54 void read(Buffer const & buf, LyXLex & lex);
56 void setButtonLabel();
57 /// show the note dialog
58 bool showInsetDialog(BufferView * bv) const;
60 int latex(Buffer const &, std::ostream &,
61 OutputParams const &) const;
63 int linuxdoc(Buffer const &, std::ostream &,
64 OutputParams const &) const;
66 int docbook(Buffer const &, std::ostream &,
67 OutputParams const &) const;
69 int plaintext(Buffer const &, std::ostream &,
70 OutputParams const &) const;
72 void validate(LaTeXFeatures &) const;
74 InsetNoteParams const & params() const { return params_; }
76 bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
78 InsetNote(InsetNote const &);
80 virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
82 friend class InsetNoteParams;
84 virtual std::auto_ptr<InsetBase> doClone() const;
86 /// used by the constructors
89 InsetNoteParams params_;
93 #include "mailinset.h"
95 class InsetNoteMailer : public MailInset {
98 InsetNoteMailer(InsetNote & inset);
100 virtual InsetBase & inset() const { return inset_; }
102 virtual std::string const & name() const { return name_; }
104 virtual std::string const inset2string(Buffer const &) const;
106 static std::string const params2string(InsetNoteParams const &);
108 static void string2params(std::string const &, InsetNoteParams &);
112 static std::string const name_;