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 *, 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 InsetCode lyxCode() const { return NOTE_CODE; }
63 docstring name() const;
65 DisplayType display() const;
67 bool noFontChange() const { return params_.type != InsetNoteParams::Note; }
69 * Is the content of this inset part of the output document?
71 * Note that Note insets are not considered part of the
72 * document, even in their 'greyed out' incarnation.
74 bool producesOutput() const { return false; }
76 bool allowSpellCheck() const;
78 void write(std::ostream &) const;
80 void read(Lexer & lex);
82 void setButtonLabel();
83 /// show the note dialog
84 bool showInsetDialog(BufferView * bv) const;
86 bool isMacroScope() const;
88 int latex(odocstream &, OutputParams const &) const;
90 int plaintext(odocstream &, OutputParams const &) const;
92 int docbook(odocstream &, OutputParams const &) const;
94 docstring xhtml(XHTMLStream &, OutputParams const &) const;
96 void validate(LaTeXFeatures &) const;
98 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
100 void addToToc(DocIterator const &);
102 void doDispatch(Cursor & cur, FuncRequest & cmd);
104 Inset * clone() const { return new InsetNote(*this); }
105 /// used by the constructors
108 docstring contextMenu(BufferView const & bv, int x, int y) const;
110 friend class InsetNoteParams;
113 InsetNoteParams params_;
118 #endif // INSET_NOTE_H