]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormMathsPanel.C
Martin's patches, Part II
[lyx.git] / src / frontends / xforms / FormMathsPanel.C
index d85c24aeb4b7cad3b8afbb92c7af7e473075adf6..bb9a3f135693efaa1c5dd681ab6bc3a0056eb66c 100644 (file)
@@ -41,6 +41,8 @@
 #include "matrix.xpm"
 #include "space.xpm"
 #include "sqrt.xpm"
+#include "sub.xpm"
+#include "super.xpm"
 
 #include "arrows.xbm"
 #include "bop.xbm"
@@ -137,6 +139,10 @@ void FormMathsPanel::build()
                           const_cast<char**>(sqrt_xpm));
        fl_set_pixmap_data(dialog_->button_frac,
                           const_cast<char**>(frac));
+       fl_set_pixmap_data(dialog_->button_super,
+                          const_cast<char**>(super_xpm));
+       fl_set_pixmap_data(dialog_->button_sub,
+                          const_cast<char**>(sub_xpm));
        fl_set_pixmap_data(dialog_->button_delim,
                           const_cast<char**>(delim));
        fl_set_pixmap_data(dialog_->button_deco,
@@ -224,6 +230,20 @@ bool FormMathsPanel::input(FL_OBJECT *, long data)
                insertSymbol("sqrt");
                break;
 
+       case MM_SUPER:
+               lv_->getLyXFunc()->dispatch(LFUN_SUPERSCRIPT);
+               break;
+
+       case MM_SUB:
+               lv_->getLyXFunc()->dispatch(LFUN_SUBSCRIPT);
+               break;
+
+       case MM_SUBSUPER:
+               lv_->getLyXFunc()->dispatch(LFUN_SUBSCRIPT);
+               lv_->getLyXFunc()->dispatch(LFUN_LEFT);
+               lv_->getLyXFunc()->dispatch(LFUN_SUPERSCRIPT);
+               break;
+
        case MM_DELIM:
                if (active_ && active_ != delim_.get())
                        active_->hide();