]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/command_inset.h
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / command_inset.h
index a7107202c91ba433fb91723feabfc2df6dd78293..b0de073df565ac55419f8a303c6b176dca587c27 100644 (file)
@@ -1,14 +1,12 @@
 // -*- C++ -*-
-
 /**
- *  \file command_inset.h
- *
- *  This file is part of LyX, the document processor.
- *  Licence details can be found in the file COPYING.
+ * \file command_inset.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *  \author André Pönitz
+ * \author André Pönitz
  *
- *  Full author contact details are available in file CREDITS.
+ * Full author contact details are available in file CREDITS.
  */
 
 
 #define COMMAND_INSET_H
 
 #include "math_nestinset.h"
-#include "insets/renderers.h"
+
+#include "insets/render_button.h"
 
 
 /// Inset for things like \name[options]{contents}
 class CommandInset : public MathNestInset {
 public:
        ///
-       explicit CommandInset(string const & name);
-       ///
-       InsetBase * clone() const;
+       explicit CommandInset(std::string const & name);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
        void write(WriteStream & os) const;
+       //
+       // void infoize(std::ostream & os) const;
        ///
-       //void infoize(std::ostream & os) const;
-       ///
-       dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
-       ///
-       virtual string const screenLabel() const;
+       virtual std::string const screenLabel() const;
        /// generate something that will be understood by the Dialogs.
-       string const createDialogStr(string const & name) const;
-
-       string const & commandname() const { return name_; }
-
+       std::string const createDialogStr(std::string const & name) const;
+       ///
+       std::string const & commandname() const { return name_; }
 private:
-       string name_;
+       virtual std::auto_ptr<InsetBase> doClone() const;
+
+       ///
+       std::string name_;
+       ///
        mutable bool set_label_;
-       mutable ButtonRenderer button_;
+       ///
+       mutable RenderButton button_;
 };
 
 #endif