]> git.lyx.org Git - lyx.git/blob - src/insets/inseterror.h
cdc03f41dcae981bc9b287bbff68ce92587f80c2
[lyx.git] / src / insets / inseterror.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *       
7  *          Copyright (C) 1995 Matthias Ettrich
8  *
9  *======================================================*/
10
11 #ifndef _INSET_ERROR_H
12 #define _INSET_ERROR_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include FORMS_H_LOCATION
19 #include "lyxinset.h"
20 #include "LString.h"
21 #include "gettext.h"
22
23 /** Used for error messages from LaTeX runs.
24   
25   The edit-operation opens a 
26   dialog with the text of the error-message. The inset is displayed as 
27   "Error" in a box, and automatically deleted. */
28 class InsetError: public Inset {
29 public:
30         ///
31         InsetError(string const & string);
32         ///
33         InsetError();
34         ///
35         ~InsetError();
36         ///
37         int Ascent(LyXFont const &font) const;
38         ///
39         int Descent(LyXFont const &font) const;
40         ///
41         int Width(LyXFont const &font) const;
42         ///
43         void Draw(LyXFont font, LyXScreen &scr, int baseline, float &x);
44         ///
45         void Write(FILE *file);
46         ///
47         void Read(LyXLex &lex);
48         ///
49         int Latex(FILE *file, signed char fragile);
50         ///
51         int Latex(string &file, signed char fragile);
52         ///
53         int Linuxdoc(string &file);
54         ///
55         int DocBook(string &file);
56         ///
57         bool AutoDelete() const;
58         /// what appears in the minibuffer when opening
59         char const* EditMessage() {return _("Opened error");}
60         ///
61         void Edit(int, int);
62         ///
63         unsigned char Editable() const;
64         ///
65         Inset* Clone();
66         ///
67         Inset::Code LyxCode() const { return Inset::NO_CODE; }
68         /// We don't want "begin" and "end inset" in lyx-file
69         bool DirectWrite() const { return true; };
70         ///
71         static void CloseErrorCB(FL_OBJECT *, long data);
72 private:
73         ///
74         string contents;
75         ///
76         FL_FORM *form;
77         ///
78         FL_OBJECT *strobj;
79 };
80 #endif