2001-03-19 15:38:22 +00:00
|
|
|
/**
|
|
|
|
* \file FormMathsPanel.C
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
* See the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Alejandro Aguilar Sierra
|
|
|
|
* \author Pablo De Napoli, pdenapo@dm.uba.ar
|
|
|
|
* \author John Levon, moz@compsoc.man.ac.uk
|
|
|
|
* \author Angus Leeming, a.leeming@ic.ac.uk
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2002-04-23 08:16:27 +00:00
|
|
|
#ifdef __GNUG__
|
2001-03-19 15:38:22 +00:00
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "Dialogs.h"
|
|
|
|
#include "LyXView.h"
|
|
|
|
#include "FormMathsPanel.h"
|
|
|
|
#include "form_maths_panel.h"
|
|
|
|
#include "MathsSymbols.h"
|
|
|
|
#include "debug.h"
|
2001-04-24 17:33:01 +00:00
|
|
|
#include "lyxfunc.h"
|
2001-03-19 15:38:22 +00:00
|
|
|
|
2001-03-20 10:14:03 +00:00
|
|
|
#include "form_maths_deco.h"
|
|
|
|
#include "form_maths_delim.h"
|
|
|
|
#include "form_maths_matrix.h"
|
|
|
|
#include "form_maths_space.h"
|
2002-01-09 14:40:34 +00:00
|
|
|
#include "form_maths_style.h"
|
2001-03-20 10:14:03 +00:00
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
#include "FormMathsBitmap.h"
|
|
|
|
#include "FormMathsDeco.h"
|
|
|
|
#include "FormMathsDelim.h"
|
|
|
|
#include "FormMathsMatrix.h"
|
|
|
|
#include "FormMathsSpace.h"
|
2002-01-09 14:40:34 +00:00
|
|
|
#include "FormMathsStyle.h"
|
2001-03-19 15:38:22 +00:00
|
|
|
|
2002-01-16 19:24:23 +00:00
|
|
|
#include "ButtonController.tmpl"
|
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
#include "deco.xpm"
|
|
|
|
#include "delim.xpm"
|
|
|
|
#include "equation.xpm"
|
|
|
|
#include "frac.xpm"
|
|
|
|
#include "matrix.xpm"
|
|
|
|
#include "space.xpm"
|
2002-01-09 14:40:34 +00:00
|
|
|
#include "style.xpm"
|
2001-03-19 15:38:22 +00:00
|
|
|
#include "sqrt.xpm"
|
2002-01-03 16:17:16 +00:00
|
|
|
#include "sub.xpm"
|
|
|
|
#include "super.xpm"
|
2001-03-19 15:38:22 +00:00
|
|
|
|
|
|
|
#include "arrows.xbm"
|
|
|
|
#include "bop.xbm"
|
|
|
|
#include "brel.xbm"
|
|
|
|
#include "dots.xbm"
|
|
|
|
#include "greek.xbm"
|
|
|
|
#include "misc.xbm"
|
|
|
|
#include "varsz.xbm"
|
|
|
|
|
2002-01-18 12:18:20 +00:00
|
|
|
#include "ams_misc.xbm"
|
|
|
|
#include "ams_arrows.xbm"
|
|
|
|
#include "ams_rel.xbm"
|
|
|
|
#include "ams_nrel.xbm"
|
|
|
|
#include "ams_ops.xbm"
|
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
using std::vector;
|
|
|
|
using SigC::slot;
|
|
|
|
|
|
|
|
FormMathsPanel::FormMathsPanel(LyXView * lv, Dialogs * d)
|
2001-09-07 17:55:37 +00:00
|
|
|
: FormBaseBD(lv, d, _("Maths Panel"), false),
|
2001-03-30 19:24:28 +00:00
|
|
|
active_(0), bc_("Close")
|
2001-03-19 15:38:22 +00:00
|
|
|
{
|
|
|
|
deco_.reset( new FormMathsDeco( lv, d, *this));
|
|
|
|
delim_.reset( new FormMathsDelim( lv, d, *this));
|
|
|
|
matrix_.reset(new FormMathsMatrix(lv, d, *this));
|
|
|
|
space_.reset( new FormMathsSpace( lv, d, *this));
|
2002-01-09 14:40:34 +00:00
|
|
|
style_.reset( new FormMathsStyle( lv, d, *this));
|
2001-03-19 15:38:22 +00:00
|
|
|
|
2001-03-20 01:22:46 +00:00
|
|
|
typedef vector<string> StringVec;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-20 01:22:46 +00:00
|
|
|
StringVec latex(nr_latex_arrow);
|
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
2001-03-19 15:38:22 +00:00
|
|
|
latex[i] = latex_arrow[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
arrow_.reset(new FormMathsBitmap(lv, d, *this, _("Arrows"), latex));
|
2001-03-19 15:38:22 +00:00
|
|
|
|
|
|
|
latex.resize(nr_latex_bop);
|
2001-03-20 01:22:46 +00:00
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
2001-03-19 15:38:22 +00:00
|
|
|
latex[i] = latex_bop[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
boperator_.reset(new FormMathsBitmap(lv, d, *this, _("Binary Ops"), latex));
|
2001-03-19 15:38:22 +00:00
|
|
|
|
|
|
|
latex.resize(nr_latex_brel);
|
2002-01-15 15:31:19 +00:00
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
2001-03-19 15:38:22 +00:00
|
|
|
latex[i] = latex_brel[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
brelats_.reset(new FormMathsBitmap(lv, d, *this, _("Bin Relations"), latex));
|
2001-03-19 15:38:22 +00:00
|
|
|
|
|
|
|
latex.resize(nr_latex_greek);
|
2001-03-20 01:22:46 +00:00
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
2001-03-19 15:38:22 +00:00
|
|
|
latex[i] = latex_greek[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
greek_.reset(new FormMathsBitmap(lv, d, *this, _("Greek"),latex));
|
2001-03-19 15:38:22 +00:00
|
|
|
|
|
|
|
latex.resize(nr_latex_misc);
|
2002-01-15 15:31:19 +00:00
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
2001-03-19 15:38:22 +00:00
|
|
|
latex[i] = latex_misc[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
misc_.reset(new FormMathsBitmap(lv, d, *this, _("Misc"),latex));
|
2001-03-19 15:38:22 +00:00
|
|
|
|
2001-08-01 10:08:53 +00:00
|
|
|
latex.resize(nr_latex_dots);
|
|
|
|
for (StringVec::size_type i = 0; i<latex.size(); ++i) {
|
|
|
|
latex[i] = latex_dots[i];
|
|
|
|
}
|
|
|
|
|
2002-03-01 09:52:49 +00:00
|
|
|
dots_.reset(new FormMathsBitmap(lv, d, *this, _("Dots"), latex));
|
2001-08-01 10:08:53 +00:00
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
latex.resize(nr_latex_varsz);
|
2001-03-20 01:22:46 +00:00
|
|
|
for (StringVec::size_type i = 0; i<latex.size(); ++i) {
|
2001-03-19 15:38:22 +00:00
|
|
|
latex[i] = latex_varsz[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
varsize_.reset(new FormMathsBitmap(lv, d, *this, _("Big Operators"),latex));
|
2001-03-19 15:38:22 +00:00
|
|
|
|
2002-01-18 12:18:20 +00:00
|
|
|
latex.resize(nr_latex_ams_misc);
|
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
|
|
|
latex[i] = latex_ams_misc[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
ams_misc_.reset(new FormMathsBitmap(lv, d, *this, _("AMS Misc"), latex));
|
2002-01-18 12:18:20 +00:00
|
|
|
|
|
|
|
latex.resize(nr_latex_ams_arrows);
|
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
|
|
|
latex[i] = latex_ams_arrows[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
ams_arrows_.reset(new FormMathsBitmap(lv, d, *this, _("AMS Arrows"), latex));
|
2002-01-18 12:18:20 +00:00
|
|
|
|
|
|
|
latex.resize(nr_latex_ams_rel);
|
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
|
|
|
latex[i] = latex_ams_rel[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
ams_rel_.reset(new FormMathsBitmap(lv, d, *this, _("AMS Relations"), latex));
|
2002-01-18 12:18:20 +00:00
|
|
|
|
|
|
|
latex.resize(nr_latex_ams_nrel);
|
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
|
|
|
latex[i] = latex_ams_nrel[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
ams_nrel_.reset(new FormMathsBitmap(lv, d, *this, _("AMS Negated Rel"), latex));
|
2002-01-18 12:18:20 +00:00
|
|
|
|
|
|
|
latex.resize(nr_latex_ams_ops);
|
|
|
|
for (StringVec::size_type i = 0; i < latex.size(); ++i) {
|
|
|
|
latex[i] = latex_ams_ops[i];
|
|
|
|
}
|
2002-03-01 09:52:49 +00:00
|
|
|
ams_ops_.reset(new FormMathsBitmap(lv, d, *this, _("AMS Operators"), latex));
|
2002-01-18 12:18:20 +00:00
|
|
|
|
2002-03-01 09:52:49 +00:00
|
|
|
//showUnderMouse(false);
|
2001-03-19 15:38:22 +00:00
|
|
|
d->showMathPanel.connect(slot(this, &FormMathsPanel::show));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FL_FORM * FormMathsPanel::form() const
|
|
|
|
{
|
|
|
|
if (dialog_.get())
|
2002-03-21 21:21:28 +00:00
|
|
|
return dialog_->form;
|
2001-03-19 15:38:22 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormMathsPanel::setActive(FormMathsSub * a) const
|
|
|
|
{
|
|
|
|
active_ = a;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormMathsPanel::build()
|
|
|
|
{
|
|
|
|
dialog_.reset(build_maths_panel());
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
for (int i = 0; i < nr_function_names; ++i)
|
|
|
|
fl_add_browser_line(dialog_->browser_funcs,
|
|
|
|
function_names[i]);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
fl_set_pixmap_data(dialog_->button_sqrt,
|
|
|
|
const_cast<char**>(sqrt_xpm));
|
|
|
|
fl_set_pixmap_data(dialog_->button_frac,
|
|
|
|
const_cast<char**>(frac));
|
2002-01-03 16:17:16 +00:00
|
|
|
fl_set_pixmap_data(dialog_->button_super,
|
|
|
|
const_cast<char**>(super_xpm));
|
|
|
|
fl_set_pixmap_data(dialog_->button_sub,
|
|
|
|
const_cast<char**>(sub_xpm));
|
2001-03-19 15:38:22 +00:00
|
|
|
fl_set_pixmap_data(dialog_->button_delim,
|
|
|
|
const_cast<char**>(delim));
|
|
|
|
fl_set_pixmap_data(dialog_->button_deco,
|
|
|
|
const_cast<char**>(deco));
|
|
|
|
fl_set_pixmap_data(dialog_->button_space,
|
|
|
|
const_cast<char**>(space_xpm));
|
2002-01-09 14:40:34 +00:00
|
|
|
fl_set_pixmap_data(dialog_->button_style,
|
|
|
|
const_cast<char**>(style_xpm));
|
2001-03-19 15:38:22 +00:00
|
|
|
fl_set_pixmap_data(dialog_->button_matrix,
|
|
|
|
const_cast<char**>(matrix));
|
|
|
|
fl_set_pixmap_data(dialog_->button_equation,
|
|
|
|
const_cast<char**>(equation));
|
|
|
|
|
|
|
|
arrow_->addBitmap(20, 5, 4, arrow_width, arrow_height, arrow_bits);
|
|
|
|
arrow_->addBitmap(7, 2, 4, larrow_width, larrow_height, larrow_bits,
|
|
|
|
false);
|
|
|
|
arrow_->addBitmap(4, 2, 2, darrow_width, darrow_height, darrow_bits);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
boperator_->addBitmap(31, 4, 8, bop_width, bop_height, bop_bits);
|
|
|
|
|
|
|
|
brelats_->addBitmap(35, 4, 9, brel_width, brel_height, brel_bits);
|
|
|
|
|
|
|
|
greek_->addBitmap(11, 6, 2, Greek_width, Greek_height, Greek_bits);
|
|
|
|
greek_->addBitmap(28, 7, 4, greek_width, greek_height, greek_bits);
|
|
|
|
|
|
|
|
misc_->addBitmap(29, 5, 6, misc_width, misc_height, misc_bits);
|
2002-03-04 11:10:26 +00:00
|
|
|
misc_->addBitmap(5, 5, 1, misc4_width, misc4_height, misc4_bits);
|
2002-01-15 15:31:19 +00:00
|
|
|
misc_->addBitmap(6, 3, 2, misc2_width, misc2_height, misc2_bits, false);
|
|
|
|
misc_->addBitmap(4, 2, 2, misc3_width, misc3_height, misc3_bits);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-01 10:08:53 +00:00
|
|
|
dots_->addBitmap(4, 4, 1, dots_width, dots_height, dots_bits);
|
2001-03-19 15:38:22 +00:00
|
|
|
|
|
|
|
varsize_->addBitmap(14, 3, 5, varsz_width, varsz_height, varsz_bits);
|
|
|
|
|
2002-01-18 12:18:20 +00:00
|
|
|
ams_misc_->addBitmap(9, 5, 2, ams1_width, ams1_height, ams1_bits);
|
|
|
|
ams_misc_->addBitmap(26, 3, 9, ams7_width, ams7_height, ams7_bits);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-01-18 12:18:20 +00:00
|
|
|
ams_arrows_->addBitmap(32, 3, 11, ams2_width, ams2_height, ams2_bits);
|
|
|
|
ams_arrows_->addBitmap(6, 3, 2, ams3_width, ams3_height, ams3_bits);
|
|
|
|
|
2002-01-28 14:36:39 +00:00
|
|
|
ams_rel_->addBitmap(66, 6, 11, ams_rel_width, ams_rel_height, ams_rel_bits);
|
2002-01-18 12:18:20 +00:00
|
|
|
|
2002-01-28 14:36:39 +00:00
|
|
|
ams_nrel_->addBitmap(51, 6, 9, ams_nrel_width, ams_nrel_height, ams_nrel_bits);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-01-18 12:18:20 +00:00
|
|
|
ams_ops_->addBitmap(23, 3, 8, ams_ops_width, ams_ops_height, ams_ops_bits);
|
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
bc().setCancel(dialog_->button_close);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool FormMathsPanel::input(FL_OBJECT *, long data)
|
|
|
|
{
|
|
|
|
MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
|
|
|
|
|
|
|
|
switch (val) {
|
|
|
|
case MM_GREEK:
|
|
|
|
if (active_ && active_ != greek_.get())
|
|
|
|
active_->hide();
|
|
|
|
greek_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_ARROW:
|
|
|
|
if (active_ && active_ != arrow_.get())
|
|
|
|
active_->hide();
|
|
|
|
arrow_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_BOP:
|
|
|
|
if (active_ && active_ != boperator_.get())
|
|
|
|
active_->hide();
|
|
|
|
boperator_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_BRELATS:
|
|
|
|
if (active_ && active_ != brelats_.get())
|
|
|
|
active_->hide();
|
|
|
|
brelats_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_MISC:
|
|
|
|
if (active_ && active_ != misc_.get())
|
|
|
|
active_->hide();
|
|
|
|
misc_->show();
|
|
|
|
break;
|
|
|
|
|
2001-08-01 10:08:53 +00:00
|
|
|
case MM_DOTS:
|
|
|
|
if (active_ && active_ != dots_.get())
|
|
|
|
active_->hide();
|
|
|
|
dots_->show();
|
|
|
|
break;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
case MM_VARSIZE:
|
|
|
|
if (active_ && active_ != varsize_.get())
|
|
|
|
active_->hide();
|
|
|
|
varsize_->show();
|
|
|
|
break;
|
|
|
|
|
2002-01-18 12:18:20 +00:00
|
|
|
case MM_AMS_MISC:
|
|
|
|
if (active_ && active_ != ams_misc_.get())
|
|
|
|
active_->hide();
|
|
|
|
ams_misc_->show();
|
|
|
|
break;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-01-18 12:18:20 +00:00
|
|
|
case MM_AMS_ARROWS:
|
|
|
|
if (active_ && active_ != ams_arrows_.get())
|
|
|
|
active_->hide();
|
|
|
|
ams_arrows_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_AMS_BREL:
|
|
|
|
if (active_ && active_ != ams_rel_.get())
|
|
|
|
active_->hide();
|
|
|
|
ams_rel_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_AMS_NREL:
|
|
|
|
if (active_ && active_ != ams_nrel_.get())
|
|
|
|
active_->hide();
|
|
|
|
ams_nrel_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_AMS_OPS:
|
|
|
|
if (active_ && active_ != ams_ops_.get())
|
|
|
|
active_->hide();
|
|
|
|
ams_ops_->show();
|
|
|
|
break;
|
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
case MM_FRAC:
|
|
|
|
insertSymbol("frac");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_SQRT:
|
|
|
|
insertSymbol("sqrt");
|
|
|
|
break;
|
|
|
|
|
2002-01-03 16:17:16 +00:00
|
|
|
case MM_SUPER:
|
2002-04-10 14:51:56 +00:00
|
|
|
//lv_->getLyXFunc()->dispatch(LFUN_MATH_MODE);
|
2002-01-03 16:17:16 +00:00
|
|
|
lv_->getLyXFunc()->dispatch(LFUN_SUPERSCRIPT);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_SUB:
|
2002-04-10 14:51:56 +00:00
|
|
|
//lv_->getLyXFunc()->dispatch(LFUN_MATH_MODE);
|
2002-01-03 16:17:16 +00:00
|
|
|
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;
|
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
case MM_DELIM:
|
|
|
|
if (active_ && active_ != delim_.get())
|
|
|
|
active_->hide();
|
|
|
|
delim_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_MATRIX:
|
|
|
|
if (active_ && active_ != matrix_.get())
|
|
|
|
active_->hide();
|
|
|
|
matrix_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_DECO:
|
|
|
|
if (active_ && active_ != deco_.get())
|
|
|
|
active_->hide();
|
|
|
|
deco_->show();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_SPACE:
|
|
|
|
if (active_ && active_ != space_.get())
|
|
|
|
active_->hide();
|
|
|
|
space_->show();
|
|
|
|
break;
|
|
|
|
|
2002-01-09 14:40:34 +00:00
|
|
|
case MM_STYLE:
|
|
|
|
if (active_ && active_ != style_.get())
|
|
|
|
active_->hide();
|
|
|
|
style_->show();
|
|
|
|
break;
|
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
case MM_EQU:
|
|
|
|
mathDisplay();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MM_FUNC:
|
|
|
|
int const i = fl_get_browser(dialog_->browser_funcs) - 1;
|
|
|
|
insertSymbol(function_names[i]);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-01-15 15:31:19 +00:00
|
|
|
void FormMathsPanel::insertSymbol(string const & sym, bool bs) const
|
2001-03-19 15:38:22 +00:00
|
|
|
{
|
2002-03-21 21:21:28 +00:00
|
|
|
if (bs)
|
2002-01-15 15:31:19 +00:00
|
|
|
lv_->getLyXFunc()->dispatch(LFUN_INSERT_MATH, '\\' + sym);
|
2002-03-21 21:21:28 +00:00
|
|
|
else
|
2002-01-15 15:31:19 +00:00
|
|
|
lv_->getLyXFunc()->dispatch(LFUN_INSERT_MATH, sym);
|
2001-03-19 15:38:22 +00:00
|
|
|
}
|
|
|
|
|
2002-01-12 20:00:47 +00:00
|
|
|
|
|
|
|
void FormMathsPanel::dispatchFunc(kb_action action) const
|
2002-01-10 16:47:03 +00:00
|
|
|
{
|
2002-01-12 20:00:47 +00:00
|
|
|
lv_->getLyXFunc()->dispatch(action);
|
2002-01-10 16:47:03 +00:00
|
|
|
}
|
2001-03-19 15:38:22 +00:00
|
|
|
|
2002-01-12 20:00:47 +00:00
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
void FormMathsPanel::mathDisplay() const
|
|
|
|
{
|
2001-07-16 15:42:57 +00:00
|
|
|
lv_->getLyXFunc()->dispatch(LFUN_MATH_DISPLAY);
|
2001-03-19 15:38:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormMathsSub::FormMathsSub(LyXView * lv, Dialogs * d, FormMathsPanel const & p,
|
2001-09-07 17:55:37 +00:00
|
|
|
string const & t, bool allowResize)
|
2002-03-21 16:59:12 +00:00
|
|
|
: FormBaseBD(lv, d, t, allowResize), parent_(p), bc_("Close")
|
2001-03-19 15:38:22 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
void FormMathsSub::connect()
|
|
|
|
{
|
|
|
|
parent_.setActive(this);
|
|
|
|
FormBaseBD::connect();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormMathsSub::disconnect()
|
|
|
|
{
|
|
|
|
parent_.setActive(0);
|
|
|
|
FormBaseBD::disconnect();
|
|
|
|
}
|