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 * ====================================================== */
21 #include <sigc++/signal_system.h>
23 #ifdef SIGC_CXX_NAMESPACES
27 /** Used for error messages from LaTeX runs.
29 The edit-operation opens a
30 dialog with the text of the error-message. The inset is displayed as
31 "Error" in a box, and automatically deleted. */
32 class InsetError : public Inset {
36 InsetError(string const &);
38 ~InsetError() { hide(); }
40 int ascent(BufferView *, LyXFont const &) const;
42 int descent(BufferView *, LyXFont const &) const;
44 int width(BufferView *, LyXFont const &) const;
46 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
48 void Write(Buffer const *, std::ostream &) const {}
50 void Read(Buffer const *, LyXLex &) {}
52 int Latex(Buffer const *, std::ostream &, bool, bool) const { return 0; }
54 int Ascii(Buffer const *, std::ostream &, int) const { return 0; }
56 int Linuxdoc(Buffer const *, std::ostream &) const { return 0; }
58 int DocBook(Buffer const *, std::ostream &) const { return 0; }
60 bool AutoDelete() const { return true; }
61 /// what appears in the minibuffer when opening
62 string const EditMessage() const;
64 void Edit(BufferView *, int, int, unsigned int);
66 EDITABLE Editable() const { return IS_EDITABLE; }
68 Inset * Clone() const { return new InsetError(contents); }
70 Inset::Code LyxCode() const { return Inset::NO_CODE; }
71 /// We don't want "begin" and "end inset" in lyx-file
72 bool DirectWrite() const { return true; };
74 string const & getContents() const { return contents; }