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; }
68 /// Is the content of this inset part of the output document?
69 bool producesOutput() const
70 { return params_.type == InsetNoteParams::Greyedout; }
72 bool allowSpellCheck() const;
74 void write(std::ostream &) const;
76 void read(Lexer & lex);
77 /// show the note dialog
78 bool showInsetDialog(BufferView * bv) const;
80 bool isMacroScope() const;
82 int latex(odocstream &, OutputParams const &) const;
84 int plaintext(odocstream &, OutputParams const &) const;
86 int docbook(odocstream &, OutputParams const &) const;
88 docstring xhtml(XHTMLStream &, OutputParams const &) const;
90 void validate(LaTeXFeatures &) const;
92 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
94 void addToToc(DocIterator const &);
96 void doDispatch(Cursor & cur, FuncRequest & cmd);
98 Inset * clone() const { return new InsetNote(*this); }
99 /// used by the constructors
102 docstring contextMenuName() const;
104 friend class InsetNoteParams;
107 InsetNoteParams params_;
112 #endif // INSET_NOTE_H