]> git.lyx.org Git - lyx.git/blob - src/insets/insetinfo.h
clear()->erase() ; lots of using directives for cxx
[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 /** 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         explicit
37         InsetInfo(string const & string);
38         ///
39         ~InsetInfo();
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         ///
49         void Write(std::ostream &) const;
50         ///
51         void Read(LyXLex & lex);
52         ///
53         int Latex(std::ostream &, bool fragile, bool free_spc) const;
54         ///
55         int Ascii(std::ostream &) const;
56         ///
57         int Linuxdoc(std::ostream &) const;
58         ///
59         int DocBook(std::ostream &) const;
60         /// what appears in the minibuffer when opening
61         char const * EditMessage() const;
62         ///
63         void Edit(BufferView *, int, int, unsigned int);
64         ///
65         EDITABLE Editable() const;
66         ///
67         Inset::Code LyxCode() const;
68         ///
69         Inset * Clone() const;
70         ///
71         static void CloseInfoCB(FL_OBJECT *, long data);
72 private:
73         ///
74         string contents;
75         ///
76         FL_FORM * form;
77         ///
78         FL_OBJECT * strobj;
79 };
80 #endif