]> git.lyx.org Git - lyx.git/blob - src/insets/insetinfo.h
fix compilation pb ; update eu.po
[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(BufferView *, LyXFont const &) const;
42         ///
43         int descent(BufferView *, LyXFont const &) const;
44         ///
45         int width(BufferView *, LyXFont const &) const;
46         ///
47         void draw(BufferView *, LyXFont const &, int, float &, bool) const;
48         ///
49         void Write(Buffer const *, std::ostream &) const;
50         ///
51         void Read(Buffer const *, LyXLex & lex);
52         ///
53         int Latex(Buffer const *, std::ostream &,
54                   bool fragile, bool free_spc) const;
55         ///
56         int Ascii(Buffer const *, std::ostream &, int linelen) const;
57         ///
58         int Linuxdoc(Buffer const *, std::ostream &) const;
59         ///
60         int DocBook(Buffer const *, std::ostream &) const;
61         /// what appears in the minibuffer when opening
62         string const EditMessage() const;
63         ///
64         void Edit(BufferView *, int, int, unsigned int);
65         ///
66         EDITABLE Editable() const;
67         ///
68         Inset::Code LyxCode() const;
69         ///
70         Inset * Clone(Buffer const &) const;
71         ///
72         static void CloseInfoCB(FL_OBJECT *, long data);
73 private:
74         ///
75         string contents;
76         ///
77         FL_FORM * form;
78         ///
79         FL_OBJECT * strobj;
80         ///
81         LyXFont labelfont;
82 };
83 #endif