]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/ref_inset.h
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / ref_inset.h
index 796b83023d4344ec6d35e69f466e4543d47dfec2..7e3c58ce2d006fd8dbde820bd64c3821eec140e5 100644 (file)
@@ -14,6 +14,7 @@
 
 
 #include "command_inset.h"
+class Buffer;
 
 // for \ref
 class RefInset : public CommandInset {
@@ -21,45 +22,43 @@ public:
        ///
        RefInset();
        ///
-       explicit RefInset(string const & data);
-       ///
-       virtual std::auto_ptr<InsetBase> clone() const;
+       explicit RefInset(std::string const & data);
        ///
        //void write(WriteStream & os) const;
        ///
        void infoize(std::ostream & os) const;
        ///
-       dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
-       ///
-       string const screenLabel() const;
+       std::string const screenLabel() const;
        ///
        void validate(LaTeXFeatures & features) const;
        ///
        virtual RefInset * asRefInset() { return this; }
 
        /// plain ascii output
-       int ascii(std::ostream & os, int) const;
+       int plaintext(std::ostream & os, OutputParams const &) const;
        /// linuxdoc output
-       int linuxdoc(std::ostream & os) const;
+       int linuxdoc(std::ostream & os, OutputParams const &) const;
        /// docbook output
-       int docbook(std::ostream & os, bool) const;
-
-       /// small wrapper for the time being
-       dispatch_result localDispatch(FuncRequest const & cmd);
+       int docbook(Buffer const & buf, std::ostream & os, OutputParams const &) const;
 
        struct ref_type_info {
                ///
-               string latex_name;
+               std::string latex_name;
                ///
-               string gui_name;
+               std::string gui_name;
                ///
-               string short_gui_name;
+               std::string short_gui_name;
        };
        static ref_type_info types[];
        ///
-       static int getType(string const & name);
+       static int getType(std::string const & name);
+       ///
+       static std::string const & getName(int type);
+protected:
+       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+private:
        ///
-       static string const & getName(int type);
+       virtual std::auto_ptr<InsetBase> doClone() const;
 };
 
 #endif