2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 the LyX Team.
10 * ====================================================== */
20 #include FORMS_H_LOCATION
23 /** Info. Handles the note insets.
25 This class handles the note insets. The edit operation bringes up
26 a dialog, where the user can type a note about life or something
27 else of interest. When collapsed, the inset is displayed as "Note"
28 in a yellow box. Currently, the Read-function is a terrible hack.
29 Some day in the distant future, this will hopefully be obsoleted by
30 a true comment-environment. */
31 class InsetInfo : public Inset {
37 InsetInfo(string const & string);
41 int ascent(BufferView *, LyXFont const &) const;
43 int descent(BufferView *, LyXFont const &) const;
45 int width(BufferView *, LyXFont const &) const;
47 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
49 void Write(Buffer const *, std::ostream &) const;
51 void Read(Buffer const *, LyXLex & lex);
53 int Latex(Buffer const *, std::ostream &,
54 bool fragile, bool free_spc) const;
56 int Ascii(Buffer const *, std::ostream &, int linelen) const;
58 int Linuxdoc(Buffer const *, std::ostream &) const;
60 int DocBook(Buffer const *, std::ostream &) const;
61 /// what appears in the minibuffer when opening
62 string const EditMessage() const;
64 void Edit(BufferView *, int, int, unsigned int);
66 EDITABLE Editable() const;
68 Inset::Code LyxCode() const;
70 Inset * Clone() const;
72 static void CloseInfoCB(FL_OBJECT *, long data);