]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/ref_inset.h
Jean-Marc's fix for wrong descent
[lyx.git] / src / mathed / ref_inset.h
index 2a2c89e64741dd29783e6f7d678c1ee9dc199fa7..c689c10cb603b5987211bd8ff68ab0960b1ca492 100644 (file)
@@ -1,13 +1,10 @@
 #ifndef REF_INSET_H
 #define REF_INSET_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "command_inset.h"
 
-// for \ref 
+// for \ref
 class RefInset : public CommandInset {
 public:
        ///
@@ -21,11 +18,13 @@ public:
        ///
        void infoize(std::ostream & os) const;
        ///
-       result_type dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
+       dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
        ///
        string screenLabel() const;
        ///
        void validate(LaTeXFeatures & features) const;
+       ///
+       virtual RefInset * asRefInset() { return this; }
 
        /// plain ascii output
        int ascii(std::ostream & os, int) const;
@@ -34,8 +33,10 @@ public:
        /// docbook output
        int docbook(std::ostream & os, bool) const;
 
+       /// small wrapper for the time being
+       dispatch_result localDispatch(FuncRequest const & cmd);
 
-       struct type_info {
+       struct ref_type_info {
                ///
                string latex_name;
                ///
@@ -43,11 +44,17 @@ public:
                ///
                string short_gui_name;
        };
-       static type_info types[];
+       static ref_type_info types[];
        ///
        static int getType(string const & name);
        ///
        static string const & getName(int type);
 };
 
+/** Fills ar with the contents of str.
+ *  str is created by the reference dialog and returned to the LyX core.
+ *  The function returns true if it succeeds in creating a RefInset.
+ */
+bool string2RefInset(string const & str, MathArray & ar);
+
 #endif