]> git.lyx.org Git - lyx.git/blob - src/insets/insetinfo.h
some using changes small changes in lyxfont and some other things, read the Changelog
[lyx.git] / src / insets / insetinfo.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *       
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2000 the LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef INSET_INFO_H
13 #define INSET_INFO_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "lyxinset.h"
20 #include FORMS_H_LOCATION
21 #include "LString.h"
22
23 using std::ostream;
24
25 /** Info. Handles the note insets.
26   
27   This class handles the note insets. The edit operation bringes up
28   a dialog, where the user can type a note about life or something
29   else of interest. When collapsed, the inset is displayed as "Note"
30   in a yellow box. Currently, the Read-function is a terrible hack. 
31   Some day in the distant future, this will hopefully be obsoleted by 
32   a true comment-environment. */
33 class InsetInfo : public Inset {
34 public:
35         ///
36         InsetInfo();
37         ///
38         InsetInfo(string const & string);
39         ///
40         ~InsetInfo();
41         ///
42         int ascent(Painter &, LyXFont const &) const;
43         ///
44         int descent(Painter &, LyXFont const &) const;
45         ///
46         int width(Painter &, LyXFont const &) const;
47         ///
48         void draw(Painter &, LyXFont const &, int baseline, float & x) const;
49         ///
50         void Write(ostream &) const;
51         ///
52         void Read(LyXLex & lex);
53         ///
54         int Latex(ostream &, signed char fragile, bool free_spc) const;
55         ///
56         int Linuxdoc(ostream &) const;
57         ///
58         int DocBook(ostream &) const;
59         /// what appears in the minibuffer when opening
60         const char * EditMessage() const {return _("Opened note");}
61         ///
62         void Edit(BufferView *, int, int, unsigned int);
63         ///
64         EDITABLE Editable() const;
65         ///
66         Inset::Code LyxCode() const;
67         ///
68         Inset * Clone() const;
69         ///
70         static void CloseInfoCB(FL_OBJECT *, long data);
71 private:
72         ///
73         string contents;
74         ///
75         FL_FORM * form;
76         ///
77         FL_OBJECT * strobj;
78 };
79 #endif