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.
16 #include "insetcollapsable.h"
19 struct InsetNoteParams {
21 void write(std::ostream & os) const;
23 void read(LyXLex & lex);
29 /** The PostIt note inset, and other annotations
32 class InsetNote : public InsetCollapsable {
37 InsetNote(BufferParams const &, std::string const &);
39 InsetNote(InsetNote const &);
43 virtual std::auto_ptr<InsetBase> clone() const;
45 std::string const editMessage() const;
47 InsetOld::Code lyxCode() const { return InsetOld::NOTE_CODE; }
49 void write(Buffer const &, std::ostream &) const;
51 void read(Buffer const & buf, LyXLex & lex);
53 void setButtonLabel();
55 void metrics(MetricsInfo &, Dimension &) const;
56 /// show the note dialog
57 bool showInsetDialog(BufferView * bv) const;
59 int latex(Buffer const &, std::ostream &,
60 LatexRunParams const &) const;
62 int linuxdoc(Buffer const &, std::ostream &,
63 LatexRunParams const &) const;
65 int docbook(Buffer const &, std::ostream &,
66 LatexRunParams const &) const;
68 int ascii(Buffer const &, std::ostream &,
69 LatexRunParams const &) const;
71 void validate(LaTeXFeatures &) const;
73 InsetNoteParams const & params() const { return params_; }
78 priv_dispatch(FuncRequest const &, idx_type &, pos_type &);
80 friend class InsetNoteParams;
82 /// used by the constructors
85 InsetNoteParams params_;
89 #include "mailinset.h"
91 class InsetNoteMailer : public MailInset {
94 InsetNoteMailer(std::string const & name, InsetNote & inset);
96 virtual InsetBase & inset() const { return inset_; }
98 virtual std::string const & name() const { return name_; }
100 virtual std::string const inset2string(Buffer const &) const;
102 static std::string const params2string(std::string const &, InsetNoteParams const &);
104 static void string2params(std::string const &, InsetNoteParams &);
108 std::string const name_;