]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormMathsPanel.h
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / FormMathsPanel.h
index 13614b62a60a078431bfbb6f40fb307fec2beeda..617922f31eb54a3e49025aecad1d0f9f12aecbab 100644 (file)
@@ -1,26 +1,30 @@
 // -*- C++ -*-
-/** 
+/**
  * \file FormMathsPanel.h
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
- * 
- * \author Alejandro Aguilar Sierra 
- * \author John Levon, moz@compsoc.man.ac.uk
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author John Levon
+ * \author Angus Leeming 
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef FORM_MATHSPANEL_H
 #define FORM_MATHSPANEL_H
 
 #include "commandtags.h"
-#include <boost/smart_ptr.hpp>
 
-#ifdef __GNUG_
+#ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "MathsCallbacks.h"
 #include "FormBaseDeprecated.h"
 
+#include <boost/scoped_ptr.hpp>
+
 class FormMathsBitmap;
 class FormMathsDeco;
 class FormMathsDelim;
@@ -28,65 +32,39 @@ class FormMathsMatrix;
 class FormMathsSpace;
 class FormMathsStyle;
 class FormMathsSub;
-struct FD_form_maths_panel;
-
-/// values used by the xforms callbacks 
-enum MathsCallbackValues {
-       MM_GREEK,
-       MM_ARROW,
-       MM_BOP,
-       MM_BRELATS,
-       MM_VARSIZE,
-       MM_MISC,
-       MM_FRAC,
-       MM_SQRT,
-       MM_DELIM,
-       MM_SUPER,
-       MM_SUB,
-       MM_SUBSUPER,
-       MM_MATRIX,
-       MM_EQU,
-       MM_DECO,
-       MM_SPACE,
-       MM_STYLE,
-       MM_DOTS,
-       MM_FUNC
-};
-/** 
+struct FD_maths_panel;
+
+/**
  * This class provides an XForms implementation of the maths panel.
  */
 class FormMathsPanel : public FormBaseBD {
 public:
        ///
-       FormMathsPanel(LyXView *, Dialogs *);
+       FormMathsPanel(LyXView &, Dialogs &);
        ///
        void setActive(FormMathsSub *) const;
-       /// dispatch a symbol insert 
-       void insertSymbol(string const & sym) const;
        /// dispatch an LFUN:
        void dispatchFunc(kb_action action) const;
+       /// dispatch a symbol insert
+       void insertSymbol(string const & sym, bool bs = true) const;
 private:
        /// Pointer to the actual instantiation of the ButtonController.
        virtual xformsBC & bc();
-       
+
        /// Build the dialog
        virtual void build();
        /// input handler
        virtual bool input(FL_OBJECT *, long);
-   
+
        /// Pointer to the actual instantiation of the xforms form
        virtual FL_FORM * form() const;
 
-       // build the panels
-       FD_form_maths_panel * build_maths_panel();
-       
+       // Real GUI implementation
+       boost::scoped_ptr<FD_maths_panel> dialog_;
+
        /// send LFUN_MATH_DISPLAY
        void mathDisplay() const;
 
-       // Real GUI implementation
-       boost::scoped_ptr<FD_form_maths_panel> dialog_;
-
        /// Subdialogs
        boost::scoped_ptr<FormMathsDeco>   deco_;
        boost::scoped_ptr<FormMathsDelim>  delim_;
@@ -100,6 +78,11 @@ private:
        boost::scoped_ptr<FormMathsBitmap> misc_;
        boost::scoped_ptr<FormMathsBitmap> dots_;
        boost::scoped_ptr<FormMathsBitmap> varsize_;
+       boost::scoped_ptr<FormMathsBitmap> ams_misc_;
+       boost::scoped_ptr<FormMathsBitmap> ams_arrows_;
+       boost::scoped_ptr<FormMathsBitmap> ams_rel_;
+       boost::scoped_ptr<FormMathsBitmap> ams_nrel_;
+       boost::scoped_ptr<FormMathsBitmap> ams_ops_;
 
        /// A pointer to the currently active subdialog
        mutable FormMathsSub * active_;
@@ -114,8 +97,8 @@ class FormMathsSub : public FormBaseBD {
 
 public:
        ///
-       FormMathsSub(LyXView *, Dialogs *, FormMathsPanel const &,
-                    string const &, bool allowResize=true);
+       FormMathsSub(LyXView &, Dialogs &, FormMathsPanel const &,
+                    string const &, bool allowResize = true);
 
 protected:
        /// Pointer to the actual instantiation of the ButtonController.