]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formulabase.h
Fix.
[lyx.git] / src / mathed / formulabase.h
index 2cfb57aea45c30441a6a5b56095e87e6dad7a95e..49d48a4bcdb0d94ece4b5cc961825d79c8509722 100644 (file)
@@ -1,23 +1,18 @@
 // -*- C++ -*-
+
 /*
- *  File:        formulabase.h
- *  Purpose:     Common parts of the math LyX insets
- *  Author:      André Pönitz
- *  Created:     May 2001
- *  Description: Allows the edition of math paragraphs inside Lyx.
+ * Common parts of the math LyX insets
+ * \author  André Pönitz
  *
- *  Copyright: 2001, The LyX Project
+ * Full author contact details are available in file CREDITS
  *
- *   You are free to use and modify this code under the terms of
- *   the GNU General Public Licence version 2 or later.
+ * You are free to use and modify this code under the terms of
+ * the GNU General Public Licence version 2 or later.
  */
 
 #ifndef INSET_FORMULABASE_H
 #define INSET_FORMULABASE_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "insets/inset.h"
 #include "frontends/mouse_state.h"
@@ -43,8 +38,6 @@ public:
        virtual int width(BufferView *, LyXFont const &) const = 0;
        ///
        virtual void draw(BufferView *,LyXFont const &, int, float &, bool) const = 0;
-       ///
-       virtual string hullType() const { return "none"; }
        /// lowest x coordinate
        virtual int xlow() const;
        /// highest x coordinate
@@ -80,16 +73,12 @@ public:
        ///
        virtual void toggleInsetSelection(BufferView * bv);
        ///
-       virtual void insetButtonPress(BufferView *, int x, int y, mouse_button::state button);
-       ///
-       virtual bool insetButtonRelease(BufferView *, int x, int y, mouse_button::state button);
-       ///
-       virtual void insetMotionNotify(BufferView *, int x, int y, mouse_button::state state);
-       ///
        virtual void insetUnlock(BufferView *);
 
        /// To allow transparent use of math editing functions
        virtual RESULT localDispatch(FuncRequest const &);
+       /// To allow transparent use of math editing functions
+       //virtual void status(FuncRequest const &);
 
        ///
        virtual std::vector<string> const getLabelList() const;
@@ -104,10 +93,10 @@ public:
 
        ///
        virtual bool searchForward(BufferView *, string const &,
-                                  bool = true, bool = false);
+                                  bool = true, bool = false);
        ///
        virtual bool searchBackward(BufferView *, string const &,
-                                   bool = true, bool = false);
+                                   bool = true, bool = false);
        ///
        virtual bool isTextInset() const { return true; }
        ///
@@ -115,13 +104,23 @@ public:
        ///
        virtual void revealCodes(BufferView *) const;
        ///
-       virtual Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
+       virtual EDITABLE editable() const { return HIGHLY_EDITABLE; }
+       ///
+       bool display() const;
+       // return the selection as string
+       string selectionAsString() const;
 
 private:
        /// unimplemented
        void operator=(const InsetFormulaBase &);
        /// common base for handling accents
        void handleAccent(BufferView * bv, string const & arg, string const & name);
+       /// lfun handler
+       RESULT lfunMousePress(FuncRequest const &);
+       ///
+       RESULT lfunMouseRelease(FuncRequest const &);
+       ///
+       RESULT lfunMouseMotion(FuncRequest const &);
 
 protected:
        ///
@@ -145,27 +144,9 @@ protected:
 
 // We don't really mess want around with mathed stuff outside mathed.
 // So do it here.
-//
-void mathDispatchCreation(BufferView *, string const &, bool);
-//
-void mathDispatchMathDisplay(BufferView *, string const &);
-//
-void mathDispatchMathMode(BufferView *, string const &);
-//
-void mathDispatchMathMacro(BufferView *, string const &);
-//
-void mathDispatchMathDelim(BufferView *, string const &);
-//
-void mathDispatchInsertMath(BufferView *, string const &);
-//
-void mathDispatchInsertMatrix(BufferView *, string const &);
-//
-void mathDispatchGreek(BufferView *, string const &);
-//
-void mathDispatchMathImportSelection(BufferView *, string const &);
-//
-void mathDispatch(BufferView *, FuncRequest const &);
-//
-void mathDispatch(BufferView *, string const &);
+void mathDispatch(FuncRequest const &);
+
+///
+void releaseMathCursor(BufferView * bv);
 
 #endif