2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-1999 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 {
36 InsetInfo(string const & string);
40 int ascent(Painter &, LyXFont const &) const;
42 int descent(Painter &, LyXFont const &) const;
44 int width(Painter &, LyXFont const &) const;
46 void draw(Painter &, LyXFont const &, int baseline, float & x) const;
48 void Write(ostream &) const;
50 void Read(LyXLex & lex);
52 int Latex(ostream &, signed char fragile) const;
53 #ifndef USE_OSTREAM_ONLY
55 int Latex(string & file, signed char fragile) const;
57 int Linuxdoc(string & file) const;
59 int DocBook(string & file) const;
62 int Linuxdoc(ostream &) const;
64 int DocBook(ostream &) const;
66 /// what appears in the minibuffer when opening
67 const char * EditMessage() const {return _("Opened note");}
69 void Edit(BufferView *, int, int, unsigned int);
71 unsigned char Editable() const;
73 Inset::Code LyxCode() const;
75 Inset * Clone() const;
77 static void CloseInfoCB(FL_OBJECT *, long data);