]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseterror.h
add warning make controllers compile and remove some alomost unused functions, commen...
[lyx.git] / src / insets / inseterror.h
index 47892510a68fa234c02a7690b85b6f7d13fd9427..06525a0356c996589b2ece020c9e10e1037f98de 100644 (file)
@@ -1,88 +1,68 @@
 // -*- C++ -*-
-/* This file is part of*
- * ====================================================== 
+/**
+ * \file inseterror.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
- *      
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team. 
+ * \author Lars Gullik Bjønnes
  *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS
+ */
 
 #ifndef INSET_ERROR_H
 #define INSET_ERROR_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include FORMS_H_LOCATION
-#include "lyxinset.h"
+#include "inset.h"
 #include "LString.h"
-#include "gettext.h"
 
 /** 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 
+
+  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);
-       ///
-       InsetError();
+       explicit
+       InsetError(string const &, bool same_id = false);
        ///
        ~InsetError();
        ///
-       int ascent(Painter &, LyXFont const & font) const;
-       ///
-       int descent(Painter &, LyXFont const & font) const;
-       ///
-       int width(Painter &, LyXFont const & font) const;
+       virtual dispatch_result localDispatch(FuncRequest const & cmd);
        ///
-       void draw(Painter &, LyXFont const & font, int baseline, float & x) const;
+       void dimension(BufferView *, LyXFont const &, Dimension &) const;
        ///
-       void Write(ostream &) const;
+       void draw(BufferView *, LyXFont const &, int, float &) const;
        ///
-       void Read(LyXLex & lex);
+       void write(Buffer const *, std::ostream &) const {}
        ///
-       int Latex(ostream &, signed char fragile) const;
-#ifndef USE_OSTREAM_ONLY
+       void read(Buffer const *, LyXLex &) {}
        ///
-       int Latex(string & file, signed char fragile) const;
+       int latex(Buffer const *, std::ostream &, bool, bool) const { return 0; }
        ///
-       int Linuxdoc(string & file) const;
+       int ascii(Buffer const *, std::ostream &, int) const { return 0; }
        ///
-       int DocBook(string & file) const;
-#else
+       int linuxdoc(Buffer const *, std::ostream &) const { return 0; }
        ///
-       int Linuxdoc(ostream &) const;
+       int docbook(Buffer const *, std::ostream &, bool) const { return 0; }
        ///
-       int DocBook(ostream &) const;
-#endif
-       ///
-       bool AutoDelete() const;
+       bool autoDelete() const { return true; }
        /// what appears in the minibuffer when opening
-       const char * EditMessage() const {return _("Opened error");}
-       ///
-       void Edit(BufferView *, int x, int y, unsigned int button);
+       string const editMessage() const;
        ///
-       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; }
 private:
        ///
        string contents;
-       ///
-       FL_FORM * form;
-       ///
-       FL_OBJECT * strobj;
 };
 #endif