]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathRef.h
Set correctly the spacing between atoms in MathData
[lyx.git] / src / mathed / InsetMathRef.h
index 0d1504e097d1dc0c6152000f8a3e54929d52ff82..8011f9452cafed71cc3afe435891d573f5b18541 100644 (file)
@@ -4,7 +4,7 @@
  * 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.
  */
 #define REF_INSET_H
 
 
-#include "InsetMathCommand.h"
+#include "CommandInset.h"
 
 
 namespace lyx {
 class Buffer;
 
 // for \ref
-class RefInset : public CommandInset {
+class InsetMathRef : public CommandInset {
 public:
        ///
-       RefInset();
+       InsetMathRef(Buffer * buf);
        ///
-       explicit RefInset(docstring const & data);
+       explicit InsetMathRef(Buffer * buf, docstring const & data);
+       ///
+       void updateBuffer(ParIterator const &, UpdateType);
        ///
        //void write(WriteStream & os) const;
        ///
        void infoize(odocstream & os) const;
        ///
+       mode_type currentMode() const { return TEXT_MODE; }
+       ///
+       bool lockedMode() const { return true; }
+       ///
+       bool asciiOnly() const { return true; }
+       ///
        docstring const screenLabel() const;
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       virtual RefInset * asRefInset() { return this; }
+       void changeTarget(docstring const & target);
+       ///
+       virtual InsetMathRef * asRefInset() { return this; }
 
        /// docbook output
-       int docbook(Buffer const & buf, odocstream & os, OutputParams const &) const;
+       int docbook(odocstream & os, OutputParams const &) const;
        /// generate something that will be understood by the Dialogs.
-       std::string const createDialogStr(std::string const & name) const;
+       std::string const createDialogStr() const;
 
        struct ref_type_info {
                ///
@@ -55,14 +65,19 @@ public:
        static int getType(docstring const & name);
        ///
        static docstring const & getName(int type);
+       ///
+       docstring const getTarget() const;
+       ///
+       InsetCode lyxCode() const { return MATH_REF_CODE; }
+
 protected:
        ///
-       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
-       bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
+       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
 private:
        ///
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual Inset * clone() const;
 };