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 &);
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();
54 /// show the note dialog
55 bool showInsetDialog(BufferView * bv) const;
57 int latex(Buffer const &, std::ostream &,
58 OutputParams const &) const;
60 int linuxdoc(Buffer const &, std::ostream &,
61 OutputParams const &) const;
63 int docbook(Buffer const &, std::ostream &,
64 OutputParams const &) const;
66 int plaintext(Buffer const &, std::ostream &,
67 OutputParams const &) const;
69 void validate(LaTeXFeatures &) const;
71 InsetNoteParams const & params() const { return params_; }
73 InsetNote(InsetNote const &);
75 virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
77 friend class InsetNoteParams;
79 virtual std::auto_ptr<InsetBase> doClone() const;
81 /// used by the constructors
84 InsetNoteParams params_;
88 #include "mailinset.h"
90 class InsetNoteMailer : public MailInset {
93 InsetNoteMailer(InsetNote & inset);
95 virtual InsetBase & inset() const { return inset_; }
97 virtual std::string const & name() const { return name_; }
99 virtual std::string const inset2string(Buffer const &) const;
101 static std::string const params2string(InsetNoteParams const &);
103 static void string2params(std::string const &, InsetNoteParams &);
107 static std::string const name_;