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 {
25 /// \c type defaults to Note
28 void write(std::ostream & os) const;
30 void read(LyXLex & lex);
36 /** The PostIt note inset, and other annotations
39 class InsetNote : public InsetCollapsable {
42 InsetNote(BufferParams const &, std::string const &);
46 std::string const editMessage() const;
48 InsetBase::Code lyxCode() const { return InsetBase::NOTE_CODE; }
50 void write(Buffer const &, std::ostream &) const;
52 void read(Buffer const & buf, LyXLex & lex);
54 void setButtonLabel();
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_; }
74 bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
76 InsetNote(InsetNote const &);
78 virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
80 friend class InsetNoteParams;
82 virtual std::auto_ptr<InsetBase> doClone() const;
84 /// used by the constructors
87 InsetNoteParams params_;
91 #include "mailinset.h"
93 class InsetNoteMailer : public MailInset {
96 InsetNoteMailer(InsetNote & inset);
98 virtual InsetBase & inset() const { return inset_; }
100 virtual std::string const & name() const { return name_; }
102 virtual std::string const inset2string(Buffer const &) const;
104 static std::string const params2string(InsetNoteParams const &);
106 static void string2params(std::string const &, InsetNoteParams &);
110 static std::string const name_;