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 struct InsetNoteParams {
24 /// \c type defaults to Note
27 void write(std::ostream & os) const;
29 void read(LyXLex & lex);
35 /** The PostIt note inset, and other annotations
38 class InsetNote : public InsetCollapsable {
41 InsetNote(BufferParams const &, std::string const &);
43 InsetNote(InsetNote const &);
47 virtual std::auto_ptr<InsetBase> clone() const;
49 std::string const editMessage() const;
51 InsetOld::Code lyxCode() const { return InsetOld::NOTE_CODE; }
53 void write(Buffer const &, std::ostream &) const;
55 void read(Buffer const & buf, LyXLex & lex);
57 void setButtonLabel();
58 /// show the note dialog
59 bool showInsetDialog(BufferView * bv) const;
61 int latex(Buffer const &, std::ostream &,
62 OutputParams const &) const;
64 int linuxdoc(Buffer const &, std::ostream &,
65 OutputParams const &) const;
67 int docbook(Buffer const &, std::ostream &,
68 OutputParams const &) const;
70 int plaintext(Buffer const &, std::ostream &,
71 OutputParams const &) const;
73 void validate(LaTeXFeatures &) const;
75 InsetNoteParams const & params() const { return params_; }
80 priv_dispatch(LCursor & cur, FuncRequest const & cmd);
82 friend class InsetNoteParams;
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_;