X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finseterror.h;h=8619f644a17cd9f3767c7772e259fa6c7c19183f;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=86f7c712f94c824109af727be2aa397989b3f7e2;hpb=a9b448a027036c65c40b372bd19e02f243d1f1ab;p=lyx.git diff --git a/src/insets/inseterror.h b/src/insets/inseterror.h index 86f7c712f9..8619f644a1 100644 --- a/src/insets/inseterror.h +++ b/src/insets/inseterror.h @@ -5,7 +5,7 @@ * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. + * Copyright 1995-2001 The LyX Team. * * ====================================================== */ @@ -16,68 +16,66 @@ #pragma interface #endif -#include FORMS_H_LOCATION -#include "lyxinset.h" +#include "inset.h" #include "LString.h" -#include "gettext.h" +#include /** Used for error messages from LaTeX runs. The edit-operation opens a dialog with the text of the error-message. The inset is displayed as "Error" in a box, and automatically deleted. */ -class InsetError: public Inset { +class InsetError : public Inset { public: /// - InsetError(string const & string); + explicit + InsetError(string const &, bool same_id = false); /// - InsetError(); + ~InsetError() { hideDialog(); } /// - ~InsetError(); + int ascent(BufferView *, LyXFont const &) const; /// - int ascent(Painter &, LyXFont const & font) const; + int descent(BufferView *, LyXFont const &) const; /// - int descent(Painter &, LyXFont const & font) const; + int width(BufferView *, LyXFont const &) const; /// - int width(Painter &, LyXFont const & font) const; + void draw(BufferView *, LyXFont const &, int, float &, bool) const; /// - void draw(Painter &, LyXFont const & font, int baseline, float & x) const; + void write(Buffer const *, std::ostream &) const {} /// - void Write(ostream &) const; + void read(Buffer const *, LyXLex &) {} /// - void Read(LyXLex & lex); + int latex(Buffer const *, std::ostream &, bool, bool) const { return 0; } /// - int Latex(ostream &, signed char fragile) const; -#ifndef USE_OSTREAM_ONLY + int ascii(Buffer const *, std::ostream &, int) const { return 0; } /// - int Latex(string & file, signed char fragile) const; -#endif - /// - int Linuxdoc(string & file) const; + int linuxdoc(Buffer const *, std::ostream &) const { return 0; } /// - int DocBook(string & file) const; + int docbook(Buffer const *, std::ostream &) const { return 0; } /// - bool AutoDelete() const; + bool autoDelete() const { return true; } /// what appears in the minibuffer when opening - const char * EditMessage() const {return _("Opened error");} + string const editMessage() const; + /// + void edit(BufferView *, int, int, unsigned int); /// - void Edit(BufferView *, int x, int y, unsigned int button); + void edit(BufferView * bv, bool front = true); /// - unsigned char Editable() const; + EDITABLE editable() const { return IS_EDITABLE; } /// - Inset * Clone() const; + Inset * clone(Buffer const &, bool same_id = false) const { + return new InsetError(contents, same_id); + } /// - Inset::Code LyxCode() const { return Inset::NO_CODE; } + Inset::Code lyxCode() const { return Inset::ERROR_CODE; } /// We don't want "begin" and "end inset" in lyx-file - bool DirectWrite() const { return true; }; + bool directWrite() const { return true; }; /// - static void CloseErrorCB(FL_OBJECT *, long data); + string const & getContents() const { return contents; } + /// + SigC::Signal0 hideDialog; private: /// string contents; - /// - FL_FORM * form; - /// - FL_OBJECT * strobj; }; #endif