2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 the LyX Team.
10 * ====================================================== */
20 #include FORMS_H_LOCATION
24 /** Info. Handles the note insets.
26 This class handles the note insets. The edit operation bringes up
27 a dialog, where the user can type a note about life or something
28 else of interest. When collapsed, the inset is displayed as "Note"
29 in a yellow box. Currently, the Read-function is a terrible hack.
30 Some day in the distant future, this will hopefully be obsoleted by
31 a true comment-environment. */
32 class InsetInfo : public Inset {
38 InsetInfo(string const & string);
42 int ascent(BufferView *, LyXFont const &) const;
44 int descent(BufferView *, LyXFont const &) const;
46 int width(BufferView *, LyXFont const &) const;
48 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
50 void write(Buffer const *, std::ostream &) const;
52 void read(Buffer const *, LyXLex & lex);
54 int latex(Buffer const *, std::ostream &,
55 bool fragile, bool free_spc) const;
57 int ascii(Buffer const *, std::ostream &, int linelen) const;
59 int linuxdoc(Buffer const *, std::ostream &) const;
61 int docBook(Buffer const *, std::ostream &) const;
62 /// what appears in the minibuffer when opening
63 string const editMessage() const;
65 void edit(BufferView *, int, int, unsigned int);
67 void edit(BufferView * bv, bool front = true);
69 EDITABLE editable() const;
71 Inset::Code lyxCode() const;
73 virtual Inset * clone(Buffer const &, bool same_id = false) const;
75 static void closeInfoCB(FL_OBJECT *, long data);