]> git.lyx.org Git - lyx.git/blob - src/insets/insetinfo.h
fix the outstanding painter drawing problems, now tablelines, mathframe, specialchars...
[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-1999 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 /** Info. Handles the note insets.
24   
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 {
32 public:
33         ///
34         InsetInfo();
35         ///
36         InsetInfo(string const & string);
37         ///
38         ~InsetInfo();
39 #ifdef USE_PAINTER
40         ///
41         int ascent(Painter &, LyXFont const &) const;
42         ///
43         int descent(Painter &, LyXFont const &) const;
44         ///
45         int width(Painter &, LyXFont const &) const;
46         ///
47         void draw(Painter &, LyXFont const &, int baseline, float & x) const;
48 #else
49         ///
50         int Ascent(LyXFont const & font) const;
51         ///
52         int Descent(LyXFont const & font) const;
53         ///
54         int Width(LyXFont const & font) const;
55         ///
56         void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
57 #endif
58         ///
59         void Write(ostream &);
60         ///
61         void Read(LyXLex & lex);
62         ///
63         int Latex(ostream &, signed char fragile);
64         ///
65         int Latex(string & file, signed char fragile);
66         ///
67         int Linuxdoc(string & file);
68         ///
69         int DocBook(string & file);
70         /// what appears in the minibuffer when opening
71         char const * EditMessage() const {return _("Opened note");}
72         ///
73         void Edit(int, int);
74         ///
75         unsigned char Editable() const;
76         ///
77         Inset::Code LyxCode() const;
78         ///
79         Inset * Clone() const;
80         ///
81         static void CloseInfoCB(FL_OBJECT *, long data);
82 private:
83         ///
84         string contents;
85         ///
86         FL_FORM * form;
87         ///
88         FL_OBJECT * strobj;
89 };
90 #endif