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