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 virtual lyx::docstring 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 &, lyx::odocstream &,
61 OutputParams const &) const;
63 int docbook(Buffer const &, std::ostream &,
64 OutputParams const &) const;
66 int plaintext(Buffer const &, lyx::odocstream &,
67 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 #include "mailinset.h"
92 class InsetNoteMailer : public MailInset {
95 InsetNoteMailer(InsetNote & inset);
97 virtual InsetBase & inset() const { return inset_; }
99 virtual std::string const & name() const { return name_; }
101 virtual std::string const inset2string(Buffer const &) const;
103 static std::string const params2string(InsetNoteParams const &);
105 static void string2params(std::string const &, InsetNoteParams &);
109 static std::string const name_;