2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ====================================================== */
19 #include FORMS_H_LOCATION
24 /** Used for error messages from LaTeX runs.
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 {
32 InsetError(string const & string);
38 int ascent(Painter &, LyXFont const & font) const;
40 int descent(Painter &, LyXFont const & font) const;
42 int width(Painter &, LyXFont const & font) const;
44 void draw(Painter &, LyXFont const & font, int baseline, float & x) const;
46 void Write(ostream &) const;
48 void Read(LyXLex & lex);
50 int Latex(ostream &, signed char fragile) const;
51 #ifndef USE_OSTREAM_ONLY
53 int Latex(string & file, signed char fragile) const;
55 int Linuxdoc(string & file) const;
57 int DocBook(string & file) const;
60 int Linuxdoc(ostream &) const;
62 int DocBook(ostream &) const;
65 bool AutoDelete() const;
66 /// what appears in the minibuffer when opening
67 const char * EditMessage() const {return _("Opened error");}
69 void Edit(BufferView *, int x, int y, unsigned int button);
71 unsigned char Editable() const;
73 Inset * Clone() const;
75 Inset::Code LyxCode() const { return Inset::NO_CODE; }
76 /// We don't want "begin" and "end inset" in lyx-file
77 bool DirectWrite() const { return true; };
79 static void CloseErrorCB(FL_OBJECT *, long data);