]> git.lyx.org Git - lyx.git/blob - src/insets/insetinfo.h
last updates from 1.0.4, no more updates expected from that branch now
[lyx.git] / src / insets / insetinfo.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *       
7  *          Copyright (C) 1995 Matthias Ettrich
8  *
9  *======================================================*/
10
11 #ifndef _INSET_INFO_H
12 #define _INSET_INFO_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "lyxinset.h"
19 #include FORMS_H_LOCATION
20 #include "LString.h"
21
22 /** Info. Handles the note insets.
23   
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 {
31 public:
32         ///
33         InsetInfo();
34         ///
35         InsetInfo(LString const & string);
36         ///
37         ~InsetInfo();
38         ///
39         int Ascent(LyXFont const &font) const;
40         ///
41         int Descent(LyXFont const &font) const;
42         ///
43         int Width(LyXFont const &font) const;
44         ///
45         void Draw(LyXFont font, LyXScreen &scr, int baseline, float &x);
46         ///
47         void Write(FILE *file);
48         ///
49         void Read(LyXLex &lex);
50         ///
51         int Latex(FILE *file, signed char fragile);
52         ///
53         int Latex(LString &file, signed char fragile);
54         ///
55         int Linuxdoc(LString &file);
56         ///
57         int DocBook(LString &file);
58         /// what appears in the minibuffer when opening
59         char const* EditMessage() {return "Opened note";}
60         ///
61         void Edit(int, int);
62         ///
63         unsigned char Editable() const;
64         ///
65         Inset::Code LyxCode() const;
66         ///
67         Inset* Clone();
68 private:
69         ///
70         LString contents;
71         ///
72         FL_FORM *form;
73         ///
74         FL_OBJECT *strobj;
75         ///
76         static void CloseInfoCB(FL_OBJECT *, long data);
77 };
78
79 #endif