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"
28 /// \c type defaults to Note
31 void write(std::ostream & os) const;
33 void read(Lexer & lex);
39 /////////////////////////////////////////////////////////////////////////
43 /////////////////////////////////////////////////////////////////////////
45 /// The PostIt note inset, and other annotations
46 class InsetNote : public InsetCollapsable
50 InsetNote(Buffer const &, std::string const &);
54 static std::string params2string(InsetNoteParams const &);
56 static void string2params(std::string const &, InsetNoteParams &);
58 InsetNoteParams const & params() const { return params_; }
61 docstring editMessage() const;
63 InsetCode lyxCode() const { return NOTE_CODE; }
65 docstring name() const;
67 DisplayType display() const;
69 bool noFontChange() const { return params_.type != InsetNoteParams::Note; }
71 void write(std::ostream &) const;
73 void read(Lexer & lex);
75 void setButtonLabel();
76 /// show the note dialog
77 bool showInsetDialog(BufferView * bv) const;
79 bool isMacroScope() const;
81 int latex(odocstream &, OutputParams const &) const;
83 int plaintext(odocstream &, OutputParams const &) const;
85 int docbook(odocstream &, OutputParams const &) const;
87 void validate(LaTeXFeatures &) const;
89 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
90 // Update the counters of this inset and of its contents
91 void updateLabels(ParIterator const &);
93 void addToToc(ParConstIterator const &) const;
95 void doDispatch(Cursor & cur, FuncRequest & cmd);
97 Inset * clone() const { return new InsetNote(*this); }
98 /// used by the constructors
101 docstring contextMenu(BufferView const & bv, int x, int y) const;
103 friend class InsetNoteParams;
106 InsetNoteParams params_;
112 #endif // INSET_NOTE_H