]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/ref_inset.h
mathed uglyfication
[lyx.git] / src / mathed / ref_inset.h
index c689c10cb603b5987211bd8ff68ab0960b1ca492..a65f9be9e28458ae6b3943c5fa3ec77902366af0 100644 (file)
@@ -1,3 +1,14 @@
+// -*- C++ -*-
+/**
+ * \file ref_inset.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #ifndef REF_INSET_H
 #define REF_INSET_H
 
@@ -10,51 +21,48 @@ public:
        ///
        RefInset();
        ///
-       explicit RefInset(string const & data);
+       explicit RefInset(std::string const & data);
        ///
-       MathInset * clone() const;
+       virtual std::auto_ptr<InsetBase> clone() const;
        ///
        //void write(WriteStream & os) const;
        ///
        void infoize(std::ostream & os) const;
        ///
-       dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
-       ///
-       string 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;
+       int docbook(std::ostream & os, OutputParams const &) const;
 
        /// small wrapper for the time being
-       dispatch_result localDispatch(FuncRequest const & cmd);
+       DispatchResult localDispatch(FuncRequest const & cmd);
 
        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 string const & getName(int type);
+       static std::string const & getName(int type);
+protected:
+       ///
+       virtual
+       DispatchResult
+       priv_dispatch(BufferView & bv, FuncRequest const & cmd);
 };
 
-/** 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