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 InsetBase * clone() const;
45 string const editMessage() const;
47 Inset::Code lyxCode() const { return Inset::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 int latex(Buffer const *, std::ostream &,
58 LatexRunParams const &) const;
60 int linuxdoc(Buffer const *, std::ostream &) const;
62 int docbook(Buffer const *, std::ostream &, bool) const;
64 int ascii(Buffer const *, std::ostream &, int) const;
66 void validate(LaTeXFeatures &) const;
68 InsetNoteParams const & params() const { return params_; }
71 friend class InsetNoteParams;
73 /// used by the constructors
76 InsetNoteParams params_;
79 #include "mailinset.h"
81 class InsetNoteMailer : public MailInset {
84 InsetNoteMailer(string const & name, InsetNote & inset);
86 virtual InsetBase & inset() const { return inset_; }
88 virtual string const & name() const { return name_; }
90 virtual string const inset2string() const;
92 static string const params2string(string const &, InsetNoteParams const &);
94 static void string2params(string const &, InsetNoteParams &);