-// -*- C++ -*-
/**
* \file FormMathsPanel.C
* Copyright 2001 The LyX Team.
#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));
}
misc_.reset(new FormMathsBitmap(lv, d, *this, latex));
+ latex.resize(nr_latex_dots);
+ for (StringVec::size_type i = 0; i<latex.size(); ++i) {
+ latex[i] = latex_dots[i];
+ }
+
+ dots_.reset(new FormMathsBitmap(lv, d, *this, latex));
+
latex.resize(nr_latex_varsz);
for (StringVec::size_type i = 0; i<latex.size(); ++i) {
latex[i] = latex_varsz[i];
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,
greek_->addBitmap(28, 7, 4, greek_width, greek_height, greek_bits);
misc_->addBitmap(29, 5, 6, misc_width, misc_height, misc_bits);
+
+ dots_->addBitmap(4, 4, 1, dots_width, dots_height, dots_bits);
varsize_->addBitmap(14, 3, 5, varsz_width, varsz_height, varsz_bits);
misc_->show();
break;
+ case MM_DOTS:
+ if (active_ && active_ != dots_.get())
+ active_->hide();
+ dots_->show();
+ break;
+
case MM_VARSIZE:
if (active_ && active_ != varsize_.get())
active_->hide();
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);
}
void FormMathsPanel::mathDisplay() const
{
- lv_->getLyXFunc()->Dispatch(LFUN_MATH_DISPLAY);
+ lv_->getLyXFunc()->dispatch(LFUN_MATH_DISPLAY);
}
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")
{}