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(Painter &, LyXFont const &) const;
43 int descent(Painter &, LyXFont const &) const;
45 int width(Painter &, 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 &, bool fragile, bool free_spc) const;
55 int Ascii(Buffer const *, std::ostream &) const;
57 int Linuxdoc(Buffer const *, std::ostream &) const;
59 int DocBook(Buffer const *, std::ostream &) const;
60 /// what appears in the minibuffer when opening
61 char const * EditMessage() const;
63 void Edit(BufferView *, int, int, unsigned int);
65 EDITABLE Editable() const;
67 Inset::Code LyxCode() const;
69 Inset * Clone() const;
71 static void CloseInfoCB(FL_OBJECT *, long data);