#include "matrix.xpm"
#include "space.xpm"
#include "sqrt.xpm"
+#include "sub.xpm"
+#include "super.xpm"
#include "arrows.xbm"
#include "bop.xbm"
using SigC::slot;
FormMathsPanel::FormMathsPanel(LyXView * lv, Dialogs * d)
- : FormBaseBD(lv, d, _("Maths Panel")),
+ : FormBaseBD(lv, d, _("Maths Panel"), false),
active_(0), bc_("Close")
{
deco_.reset( new FormMathsDeco( lv, d, *this));
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,
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();
void FormMathsPanel::insertSymbol(string const & sym) const
{
- lv_->getLyXFunc()->dispatch(LFUN_INSERT_MATH, sym);
+ lv_->getLyXFunc()->dispatch(LFUN_INSERT_MATH, '\\' + sym);
}
FormMathsSub::FormMathsSub(LyXView * lv, Dialogs * d, FormMathsPanel const & p,
- string const & t)
- : FormBaseBD(lv, d, t), parent_(p), bc_("Close")
+ string const & t, bool allowResize)
+ : FormBaseBD(lv, d, t, allowResize), parent_(p), bc_("Close")
{}