]> git.lyx.org Git - lyx.git/blob - src/insets/inseterror.h
use the new sstream return non-pods as const, use string instead of char * in a lot...
[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 #if 0
35         ///
36         InsetError();
37 #endif
38         ///
39         ~InsetError();
40         ///
41         int ascent(BufferView *, LyXFont const & font) const;
42         ///
43         int descent(BufferView *, LyXFont const & font) const;
44         ///
45         int width(BufferView *, LyXFont const & font) 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 &) const;
57         ///
58         int Linuxdoc(Buffer const *, std::ostream &) const;
59         ///
60         int DocBook(Buffer const *, std::ostream &) const;
61         ///
62         bool AutoDelete() const;
63         /// what appears in the minibuffer when opening
64         string const EditMessage() const;
65         ///
66         void Edit(BufferView *, int x, int y, unsigned int button);
67         ///
68         EDITABLE Editable() const;
69         ///
70         Inset * Clone() const;
71         ///
72         Inset::Code LyxCode() const { return Inset::NO_CODE; }
73         /// We don't want "begin" and "end inset" in lyx-file
74         bool DirectWrite() const { return true; };
75         ///
76         static void CloseErrorCB(FL_OBJECT *, long data);
77 private:
78         ///
79         string contents;
80         ///
81         FL_FORM * form;
82         ///
83         FL_OBJECT * strobj;
84 };
85 #endif