2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 1995 Matthias Ettrich
9 *======================================================*/
19 #include FORMS_H_LOCATION
22 /** Info. Handles the note insets.
24 This class handles the note insets. The edit operation bringes up
25 a dialog, where the user can type a note about life or something
26 else of interest. When collapsed, the inset is displayed as "Note"
27 in a yellow box. Currently, the Read-function is a terrible hack.
28 Some day in the distant future, this will hopefully be obsoleted by
29 a true comment-environment. */
30 class InsetInfo: public Inset {
35 InsetInfo(string const & string);
39 int Ascent(LyXFont const &font) const;
41 int Descent(LyXFont const &font) const;
43 int Width(LyXFont const &font) const;
45 void Draw(LyXFont font, LyXScreen &scr, int baseline, float &x);
47 void Write(FILE *file);
49 void Read(LyXLex &lex);
51 int Latex(FILE *file, signed char fragile);
53 int Latex(string &file, signed char fragile);
55 int Linuxdoc(string &file);
57 int DocBook(string &file);
58 /// what appears in the minibuffer when opening
59 char const* EditMessage() {return "Opened note";}
63 unsigned char Editable() const;
65 Inset::Code LyxCode() const;
69 static void CloseInfoCB(FL_OBJECT *, long data);