]> git.lyx.org Git - lyx.git/blob - src/insets/inseterror.h
Various small fixes, look in ChangeLog
[lyx.git] / src / insets / inseterror.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_ERROR_H
13 #define INSET_ERROR_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include FORMS_H_LOCATION
20 #include "lyxinset.h"
21 #include "LString.h"
22 #include "gettext.h"
23
24 using std::ostream;
25
26 /** Used for error messages from LaTeX runs.
27   
28   The edit-operation opens a 
29   dialog with the text of the error-message. The inset is displayed as 
30   "Error" in a box, and automatically deleted. */
31 class InsetError: public Inset {
32 public:
33         ///
34         InsetError(string const & string);
35         ///
36         InsetError();
37         ///
38         ~InsetError();
39         ///
40         int ascent(Painter &, LyXFont const & font) const;
41         ///
42         int descent(Painter &, LyXFont const & font) const;
43         ///
44         int width(Painter &, LyXFont const & font) const;
45         ///
46         void draw(Painter &, LyXFont const & font, int baseline, float & x) const;
47         ///
48         void Write(ostream &) const;
49         ///
50         void Read(LyXLex & lex);
51         ///
52         int Latex(ostream &, signed char fragile, bool free_spc) const;
53         ///
54         int Linuxdoc(ostream &) const;
55         ///
56         int DocBook(ostream &) const;
57         ///
58         bool AutoDelete() const;
59         /// what appears in the minibuffer when opening
60         const char * EditMessage() const {return _("Opened error");}
61         ///
62         void Edit(BufferView *, int x, int y, unsigned int button);
63         ///
64         EDITABLE Editable() const;
65         ///
66         Inset * Clone() const;
67         ///
68         Inset::Code LyxCode() const { return Inset::NO_CODE; }
69         /// We don't want "begin" and "end inset" in lyx-file
70         bool DirectWrite() const { return true; };
71         ///
72         static void CloseErrorCB(FL_OBJECT *, long data);
73 private:
74         ///
75         string contents;
76         ///
77         FL_FORM * form;
78         ///
79         FL_OBJECT * strobj;
80 };
81 #endif