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;
66 /** returns false if, when outputing LaTeX, font changes should
67 be closed before generating this inset. This is needed for
68 insets that may contain several paragraphs */
69 bool inheritFont() const { return params_.type == InsetNoteParams::Note; }
70 /// Is the content of this inset part of the output document?
71 bool producesOutput() const
72 { return params_.type == InsetNoteParams::Greyedout; }
74 bool allowSpellCheck() const;
76 void write(std::ostream &) const;
78 void read(Lexer & lex);
79 /// show the note dialog
80 bool showInsetDialog(BufferView * bv) const;
82 bool isMacroScope() const;
84 void latex(otexstream &, OutputParams const &) const;
86 int plaintext(odocstream &, OutputParams const &) const;
88 int docbook(odocstream &, OutputParams const &) const;
90 docstring xhtml(XHTMLStream &, OutputParams const &) const;
92 void validate(LaTeXFeatures &) const;
94 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
96 void addToToc(DocIterator const &) const;
98 void doDispatch(Cursor & cur, FuncRequest & cmd);
100 Inset * clone() const { return new InsetNote(*this); }
101 /// used by the constructors
104 docstring contextMenuName() const;
106 friend class InsetNoteParams;
109 InsetNoteParams params_;
114 #endif // INSET_NOTE_H