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 &, string const &);
39 InsetNote(InsetNote const &);
43 virtual std::auto_ptr<InsetBase> clone() const;
45 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 dispatch_result InsetNote::localDispatch(FuncRequest const &);
57 void metrics(MetricsInfo &, Dimension &) const;
58 /// show the note dialog
59 bool showInsetDialog(BufferView * bv) const;
61 int latex(Buffer const &, std::ostream &,
62 LatexRunParams const &) const;
64 int linuxdoc(Buffer const &, std::ostream &) const;
66 int docbook(Buffer const &, std::ostream &, bool) const;
68 int ascii(Buffer const &, std::ostream &, int) const;
70 void validate(LaTeXFeatures &) const;
72 InsetNoteParams const & params() const { return params_; }
75 friend class InsetNoteParams;
77 /// used by the constructors
80 InsetNoteParams params_;
83 #include "mailinset.h"
85 class InsetNoteMailer : public MailInset {
88 InsetNoteMailer(string const & name, InsetNote & inset);
90 virtual InsetBase & inset() const { return inset_; }
92 virtual string const & name() const { return name_; }
94 virtual string const inset2string(Buffer const &) const;
96 static string const params2string(string const &, InsetNoteParams const &);
98 static void string2params(string const &, InsetNoteParams &);