#pragma interface
#endif
-#include FORMS_H_LOCATION
#include "lyxinset.h"
#include "LString.h"
-#include "gettext.h"
+#include <sigc++/signal_system.h>
+
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Signal0;
+#endif
/** 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:
///
explicit
- InsetError(string const & string);
+ InsetError(string const &);
///
- 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(Buffer const *, std::ostream &) const;
+ void Read(Buffer const *, LyXLex &) {}
///
- void Read(Buffer const *, LyXLex & lex);
+ int Latex(Buffer const *, std::ostream &, bool, bool) const { return 0; }
///
- int Latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
+ int Ascii(Buffer const *, std::ostream &, int) const { return 0; }
///
- int Ascii(Buffer const *, std::ostream &) const;
+ int Linuxdoc(Buffer const *, std::ostream &) const { return 0; }
///
- int Linuxdoc(Buffer const *, std::ostream &) const;
+ int DocBook(Buffer const *, std::ostream &) const { return 0; }
///
- int DocBook(Buffer const *, std::ostream &) const;
- ///
- bool AutoDelete() const;
+ bool AutoDelete() const { return true; }
/// what appears in the minibuffer when opening
- char const * EditMessage() const;
+ string const EditMessage() const;
///
- void Edit(BufferView *, int x, int y, unsigned int button);
+ void Edit(BufferView *, int, int, unsigned int);
///
- EDITABLE Editable() const;
+ EDITABLE Editable() const { return IS_EDITABLE; }
///
- Inset * Clone() const;
+ Inset * Clone(Buffer const &) const { return new InsetError(contents); }
///
- 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; };
///
- static void CloseErrorCB(FL_OBJECT *, long data);
+ string const & getContents() const { return contents; }
+ ///
+ Signal0<void> hideDialog;
+
private:
///
string contents;
- ///
- FL_FORM * form;
- ///
- FL_OBJECT * strobj;
};
#endif