2001-10-12 13:29:46 +00:00
|
|
|
/*
|
2001-09-13 16:14:43 +00:00
|
|
|
* File: formulabase.C
|
|
|
|
* Purpose: Implementation of common parts of the LyX math insets
|
2001-06-25 00:06:33 +00:00
|
|
|
* Author: Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
|
|
|
|
* Created: January 1996
|
|
|
|
*
|
|
|
|
* Copyright: 1996-1998 Alejandro Aguilar Sierra
|
|
|
|
*
|
|
|
|
* Version: 0.4, Lyx project.
|
|
|
|
*
|
|
|
|
* You are free to use and modify this code under the terms of
|
|
|
|
* the GNU General Public Licence version 2 or later.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include <fstream>
|
|
|
|
|
|
|
|
#include "Lsstream.h"
|
2001-10-12 15:38:58 +00:00
|
|
|
#include "support/LAssert.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "formula.h"
|
2001-07-06 12:09:32 +00:00
|
|
|
#include "formulamacro.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
#include "commandtags.h"
|
|
|
|
#include "math_cursor.h"
|
|
|
|
#include "BufferView.h"
|
|
|
|
#include "lyxtext.h"
|
2001-07-06 12:09:32 +00:00
|
|
|
#include "lyxfunc.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
#include "gettext.h"
|
|
|
|
#include "LaTeXFeatures.h"
|
|
|
|
#include "debug.h"
|
2001-08-15 05:50:39 +00:00
|
|
|
#include "support.h"
|
2001-07-29 17:39:01 +00:00
|
|
|
#include "support/lstrings.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
#include "LyXView.h"
|
|
|
|
#include "Painter.h"
|
|
|
|
#include "font.h"
|
|
|
|
#include "math_arrayinset.h"
|
|
|
|
#include "math_spaceinset.h"
|
2001-07-27 12:32:29 +00:00
|
|
|
#include "math_macrotable.h"
|
2001-08-15 05:50:39 +00:00
|
|
|
#include "math_factory.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
#include "support/lyxlib.h"
|
2001-07-06 15:57:54 +00:00
|
|
|
#include "undo_funcs.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
|
2001-06-27 15:57:57 +00:00
|
|
|
using std::endl;
|
|
|
|
using std::ostream;
|
|
|
|
using std::vector;
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
extern char const * latex_mathenv[];
|
|
|
|
MathCursor * mathcursor = 0;
|
|
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
|
|
|
|
// local global
|
|
|
|
int sel_x;
|
|
|
|
int sel_y;
|
|
|
|
bool sel_flag;
|
|
|
|
|
2001-07-03 07:56:55 +00:00
|
|
|
void handleFont(BufferView * bv, MathTextCodes t)
|
|
|
|
{
|
2001-07-26 09:01:36 +00:00
|
|
|
if (mathcursor->selection())
|
2001-07-03 07:56:55 +00:00
|
|
|
bv->lockedInsetStoreUndo(Undo::EDIT);
|
|
|
|
mathcursor->handleFont(t);
|
|
|
|
}
|
|
|
|
|
2001-08-09 15:19:31 +00:00
|
|
|
|
2001-07-26 16:14:23 +00:00
|
|
|
void handleAccent(BufferView * bv, string const & name)
|
2001-07-10 13:17:43 +00:00
|
|
|
{
|
|
|
|
bv->lockedInsetStoreUndo(Undo::EDIT);
|
2001-08-15 05:50:39 +00:00
|
|
|
mathcursor->insert(createMathInset(name));
|
2001-07-10 13:17:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-06 12:09:32 +00:00
|
|
|
bool openNewInset(BufferView * bv, UpdatableInset * new_inset)
|
|
|
|
{
|
|
|
|
LyXText * lt = bv->getLyXText();
|
|
|
|
|
|
|
|
bv->beforeChange(lt);
|
2001-07-06 15:57:54 +00:00
|
|
|
finishUndo();
|
2001-07-06 12:09:32 +00:00
|
|
|
if (!bv->insertInset(new_inset)) {
|
|
|
|
delete new_inset;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
new_inset->edit(bv, 0, 0, 0);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2001-07-10 13:17:43 +00:00
|
|
|
|
2001-08-01 13:28:45 +00:00
|
|
|
// returns the nearest enclosing grid
|
2001-09-26 16:52:34 +00:00
|
|
|
MathArrayInset * matrixpar(MathInset::idx_type & idx)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
idx = 0;
|
2001-10-22 15:37:49 +00:00
|
|
|
return mathcursor ? mathcursor->enclosingArray(idx) : 0;
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace anon
|
|
|
|
|
|
|
|
|
2001-08-01 13:28:45 +00:00
|
|
|
|
2001-08-03 09:54:48 +00:00
|
|
|
InsetFormulaBase::InsetFormulaBase()
|
2001-10-22 15:37:49 +00:00
|
|
|
: view_(0), font_()
|
2001-07-27 12:32:29 +00:00
|
|
|
{
|
2001-09-09 22:02:19 +00:00
|
|
|
// This is needed as long the math parser is not re-entrant
|
2001-07-27 12:32:29 +00:00
|
|
|
MathMacroTable::builtinMacros();
|
2001-08-03 18:01:09 +00:00
|
|
|
//lyxerr << "sizeof MathInset: " << sizeof(MathInset) << "\n";
|
2001-07-27 12:32:29 +00:00
|
|
|
}
|
2001-06-25 00:06:33 +00:00
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
// Check if uses AMS macros
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::validate(LaTeXFeatures &) const
|
2001-06-25 00:06:33 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
2001-10-22 15:37:49 +00:00
|
|
|
void InsetFormulaBase::metrics(BufferView * bv, LyXFont const & f) const
|
2001-10-19 11:25:48 +00:00
|
|
|
{
|
|
|
|
if (bv)
|
|
|
|
view_ = bv;
|
2001-10-22 15:37:49 +00:00
|
|
|
font_ = f;
|
2001-10-19 11:25:48 +00:00
|
|
|
MathMetricsInfo mi(view_, font_, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
|
|
|
|
par()->metrics(mi);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
string const InsetFormulaBase::editMessage() const
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
return _("Math editor mode");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::edit(BufferView * bv, int x, int /*y*/, unsigned int)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
if (!bv->lockInset(this))
|
|
|
|
lyxerr[Debug::MATHED] << "Cannot lock inset!!!" << endl;
|
|
|
|
|
2001-10-12 12:02:49 +00:00
|
|
|
mathcursor = new MathCursor(this, x == 0);
|
2001-10-19 11:25:48 +00:00
|
|
|
metrics(bv);
|
2001-08-14 09:35:44 +00:00
|
|
|
// if that is removed, we won't get the magenta box when entering an
|
|
|
|
// inset for the first time
|
|
|
|
bv->updateInset(this, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
sel_x = 0;
|
|
|
|
sel_y = 0;
|
|
|
|
sel_flag = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-20 14:18:48 +00:00
|
|
|
void InsetFormulaBase::edit(BufferView * bv, bool front)
|
|
|
|
{
|
2001-08-14 07:46:11 +00:00
|
|
|
// looks hackish but seems to work
|
2001-07-20 14:18:48 +00:00
|
|
|
edit(bv, front ? 0 : 1, 0, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::insetUnlock(BufferView * bv)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
if (mathcursor) {
|
2001-07-26 09:01:36 +00:00
|
|
|
if (mathcursor->inMacroMode()) {
|
|
|
|
mathcursor->macroModeClose();
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
delete mathcursor;
|
2001-07-17 09:46:07 +00:00
|
|
|
mathcursor = 0;
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
bv->updateInset(this, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->getPos(x, y);
|
2001-08-03 09:54:48 +00:00
|
|
|
x -= par()->xo();
|
|
|
|
y -= par()->yo();
|
2001-09-03 11:38:04 +00:00
|
|
|
y -= 3;
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::toggleInsetCursor(BufferView * bv)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
if (!mathcursor)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (isCursorVisible())
|
|
|
|
bv->hideLockedInsetCursor();
|
|
|
|
else {
|
|
|
|
int x;
|
|
|
|
int y;
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->getPos(x, y);
|
2001-08-03 09:54:48 +00:00
|
|
|
//x -= par()->xo();
|
|
|
|
y -= par()->yo();
|
2001-09-03 11:38:04 +00:00
|
|
|
y -= 3;
|
2001-10-19 17:46:13 +00:00
|
|
|
int asc = 0;
|
|
|
|
int des = 0;
|
|
|
|
MathMetricsInfo mi(bv, font_, LM_ST_TEXT);
|
|
|
|
math_font_max_dim(LM_TC_TEXTRM, mi, asc, des);
|
2001-09-03 11:38:04 +00:00
|
|
|
bv->showLockedInsetCursor(x, y, asc, des);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
toggleCursorVisible();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::showInsetCursor(BufferView * bv, bool)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
if (!isCursorVisible()) {
|
|
|
|
if (mathcursor) {
|
|
|
|
int x;
|
|
|
|
int y;
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->getPos(x, y);
|
2001-08-03 09:54:48 +00:00
|
|
|
x -= par()->xo();
|
|
|
|
y -= par()->yo();
|
2001-10-19 17:46:13 +00:00
|
|
|
int asc = 0;
|
|
|
|
int des = 0;
|
|
|
|
MathMetricsInfo mi(bv, font_, LM_ST_TEXT);
|
|
|
|
math_font_max_dim(LM_TC_TEXTRM, mi, asc, des);
|
2001-09-03 11:38:04 +00:00
|
|
|
bv->fitLockedInsetCursor(x, y, asc, des);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
2001-06-28 10:25:20 +00:00
|
|
|
toggleInsetCursor(bv);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::hideInsetCursor(BufferView * bv)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
if (isCursorVisible())
|
2001-06-28 10:25:20 +00:00
|
|
|
toggleInsetCursor(bv);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::toggleInsetSelection(BufferView * bv)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
2001-07-17 09:46:07 +00:00
|
|
|
if (mathcursor)
|
|
|
|
bv->updateInset(this, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
vector<string> const InsetFormulaBase::getLabelList() const
|
|
|
|
{
|
|
|
|
return std::vector<string>();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-17 09:46:07 +00:00
|
|
|
void InsetFormulaBase::updateLocal(BufferView * bv, bool dirty)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
2001-10-19 11:25:48 +00:00
|
|
|
metrics(bv);
|
2001-07-17 09:46:07 +00:00
|
|
|
bv->updateInset(this, dirty);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::insetButtonRelease(BufferView * bv,
|
|
|
|
int x, int y, int /*button*/)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
if (mathcursor) {
|
2001-06-28 10:25:20 +00:00
|
|
|
hideInsetCursor(bv);
|
2001-08-03 09:54:48 +00:00
|
|
|
x += par()->xo();
|
|
|
|
y += par()->yo();
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->setPos(x, y);
|
2001-06-28 10:25:20 +00:00
|
|
|
showInsetCursor(bv);
|
2001-06-25 00:06:33 +00:00
|
|
|
if (sel_flag) {
|
|
|
|
sel_flag = false;
|
|
|
|
sel_x = 0;
|
|
|
|
sel_y = 0;
|
|
|
|
}
|
2001-07-06 12:09:32 +00:00
|
|
|
bv->updateInset(this, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::insetButtonPress(BufferView * bv,
|
|
|
|
int x, int y, int /*button*/)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
sel_flag = false;
|
|
|
|
sel_x = x;
|
|
|
|
sel_y = y;
|
2001-07-26 09:01:36 +00:00
|
|
|
if (mathcursor && mathcursor->selection()) {
|
|
|
|
mathcursor->selClear();
|
2001-06-25 00:06:33 +00:00
|
|
|
bv->updateInset(this, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::insetMotionNotify(BufferView * bv,
|
|
|
|
int x, int y, int /*button*/)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
if (sel_x && sel_y && abs(x-sel_x) > 4 && !sel_flag) {
|
|
|
|
sel_flag = true;
|
2001-06-28 10:25:20 +00:00
|
|
|
hideInsetCursor(bv);
|
2001-08-03 09:54:48 +00:00
|
|
|
mathcursor->setPos(sel_x + par()->xo(), sel_y + par()->yo());
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->selStart();
|
2001-06-28 10:25:20 +00:00
|
|
|
showInsetCursor(bv);
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->getPos(sel_x, sel_y);
|
2001-06-25 00:06:33 +00:00
|
|
|
} else if (sel_flag) {
|
2001-06-28 10:25:20 +00:00
|
|
|
hideInsetCursor(bv);
|
2001-08-03 09:54:48 +00:00
|
|
|
x += par()->xo();
|
|
|
|
y += par()->yo();
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->setPos(x, y);
|
2001-06-28 10:25:20 +00:00
|
|
|
showInsetCursor(bv);
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->getPos(x, y);
|
2001-06-25 00:06:33 +00:00
|
|
|
if (sel_x != x || sel_y != y)
|
|
|
|
bv->updateInset(this, false);
|
|
|
|
sel_x = x;
|
|
|
|
sel_y = y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
void InsetFormulaBase::insetKeyPress(XKeyEvent *)
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
2001-07-26 09:01:36 +00:00
|
|
|
lyxerr[Debug::MATHED] << "Used InsetFormulaBase::InsetKeyPress." << endl;
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
UpdatableInset::RESULT
|
2001-06-28 10:25:20 +00:00
|
|
|
InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
|
2001-06-25 00:06:33 +00:00
|
|
|
string const & arg)
|
|
|
|
{
|
2001-10-10 16:35:18 +00:00
|
|
|
//lyxerr << "InsetFormulaBase::localDispatch: act: " << action
|
2001-06-25 00:06:33 +00:00
|
|
|
// << " arg: '" << arg << "' cursor: " << mathcursor << "\n";
|
|
|
|
|
|
|
|
if (!mathcursor)
|
|
|
|
return UNDISPATCHED;
|
|
|
|
|
2001-08-13 14:02:37 +00:00
|
|
|
RESULT result = DISPATCHED;
|
|
|
|
bool sel = false;
|
|
|
|
bool was_macro = mathcursor->inMacroMode();
|
2001-07-26 09:01:36 +00:00
|
|
|
bool was_selection = mathcursor->selection();
|
2001-06-25 00:06:33 +00:00
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
hideInsetCursor(bv);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
mathcursor->normalize();
|
|
|
|
|
|
|
|
switch (action) {
|
|
|
|
|
|
|
|
// --- Cursor Movements ---------------------------------------------
|
|
|
|
|
|
|
|
case LFUN_RIGHTSEL:
|
|
|
|
sel = true; // fall through...
|
|
|
|
|
|
|
|
case LFUN_RIGHT:
|
2001-08-16 11:57:45 +00:00
|
|
|
result = mathcursor->right(sel) ? DISPATCHED : FINISHED_RIGHT;
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case LFUN_LEFTSEL:
|
|
|
|
sel = true; // fall through
|
|
|
|
|
|
|
|
case LFUN_LEFT:
|
2001-08-16 11:57:45 +00:00
|
|
|
result = mathcursor->left(sel) ? DISPATCHED : FINISHED;
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case LFUN_UPSEL:
|
|
|
|
sel = true;
|
|
|
|
|
|
|
|
case LFUN_UP:
|
2001-08-16 11:57:45 +00:00
|
|
|
result = mathcursor->up(sel) ? DISPATCHED : FINISHED_UP;
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case LFUN_DOWNSEL:
|
|
|
|
sel = true;
|
|
|
|
|
|
|
|
case LFUN_DOWN:
|
2001-08-16 11:57:45 +00:00
|
|
|
result = mathcursor->down(sel) ? DISPATCHED : FINISHED_DOWN;
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
2001-08-30 10:17:28 +00:00
|
|
|
case LFUN_HOMESEL:
|
|
|
|
sel = true;
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
case LFUN_HOME:
|
2001-08-30 10:17:28 +00:00
|
|
|
mathcursor->home(sel);
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
2001-08-30 10:17:28 +00:00
|
|
|
case LFUN_ENDSEL:
|
|
|
|
sel = true;
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
case LFUN_END:
|
2001-08-30 10:17:28 +00:00
|
|
|
mathcursor->end(sel);
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_DELETE_LINE_FORWARD:
|
|
|
|
bv->lockedInsetStoreUndo(Undo::DELETE);
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->delLine();
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_TAB:
|
2001-07-06 12:09:32 +00:00
|
|
|
mathcursor->idxNext();
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, false);
|
2001-07-06 12:09:32 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_SHIFT_TAB:
|
|
|
|
mathcursor->idxPrev();
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, false);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_TABINSERT:
|
2001-07-06 12:09:32 +00:00
|
|
|
bv->lockedInsetStoreUndo(Undo::EDIT);
|
|
|
|
mathcursor->splitCell();
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_BACKSPACE:
|
2001-08-07 15:04:57 +00:00
|
|
|
bv->lockedInsetStoreUndo(Undo::DELETE);
|
|
|
|
mathcursor->backspace();
|
|
|
|
bv->updateInset(this, true);
|
|
|
|
break;
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
case LFUN_DELETE:
|
|
|
|
bv->lockedInsetStoreUndo(Undo::DELETE);
|
2001-08-07 15:04:57 +00:00
|
|
|
mathcursor->erase();
|
2001-06-25 00:06:33 +00:00
|
|
|
bv->updateInset(this, true);
|
|
|
|
break;
|
|
|
|
|
|
|
|
// case LFUN_GETXY:
|
|
|
|
// sprintf(dispatch_buffer, "%d %d",);
|
|
|
|
// dispatch_result = dispatch_buffer;
|
|
|
|
// break;
|
2001-08-13 14:02:37 +00:00
|
|
|
case LFUN_SETXY: {
|
2001-06-25 00:06:33 +00:00
|
|
|
lyxerr << "LFUN_SETXY broken!\n";
|
2001-06-29 06:30:53 +00:00
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int x1;
|
|
|
|
int y1;
|
2001-06-29 11:54:39 +00:00
|
|
|
istringstream is(arg.c_str());
|
2001-06-25 00:06:33 +00:00
|
|
|
is >> x >> y;
|
2001-08-03 09:54:48 +00:00
|
|
|
par()->getXY(x1, y1);
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->setPos(x1 + x, y1 + y);
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, false);
|
2001-08-13 14:02:37 +00:00
|
|
|
break;
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case LFUN_PASTE:
|
|
|
|
if (was_macro)
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->macroModeClose();
|
2001-06-25 00:06:33 +00:00
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->selPaste();
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_CUT:
|
|
|
|
bv->lockedInsetStoreUndo(Undo::DELETE);
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->selCut();
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_COPY:
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->selCopy();
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_WORDRIGHTSEL:
|
|
|
|
case LFUN_WORDLEFTSEL:
|
|
|
|
break;
|
|
|
|
|
|
|
|
// --- accented characters ------------------------------
|
|
|
|
|
2001-08-13 14:02:37 +00:00
|
|
|
case LFUN_UMLAUT: handleAccent(bv, "ddot"); break;
|
|
|
|
case LFUN_CIRCUMFLEX: handleAccent(bv, "hat"); break;
|
|
|
|
case LFUN_GRAVE: handleAccent(bv, "grave"); break;
|
|
|
|
case LFUN_ACUTE: handleAccent(bv, "acute"); break;
|
|
|
|
case LFUN_TILDE: handleAccent(bv, "tilde"); break;
|
|
|
|
case LFUN_MACRON: handleAccent(bv, "bar"); break;
|
|
|
|
case LFUN_DOT: handleAccent(bv, "dot"); break;
|
|
|
|
case LFUN_CARON: handleAccent(bv, "check"); break;
|
|
|
|
case LFUN_BREVE: handleAccent(bv, "breve"); break;
|
|
|
|
case LFUN_VECTOR: handleAccent(bv, "vec"); break;
|
|
|
|
|
|
|
|
// Math fonts
|
|
|
|
case LFUN_GREEK_TOGGLE: handleFont(bv, LM_TC_GREEK); break;
|
|
|
|
case LFUN_BOLD: handleFont(bv, LM_TC_BF); break;
|
|
|
|
case LFUN_SANS: handleFont(bv, LM_TC_SF); break;
|
|
|
|
case LFUN_EMPH: handleFont(bv, LM_TC_CAL); break;
|
|
|
|
case LFUN_ROMAN: handleFont(bv, LM_TC_RM); break;
|
|
|
|
case LFUN_CODE: handleFont(bv, LM_TC_TT); break;
|
2001-08-31 21:15:57 +00:00
|
|
|
case LFUN_NOUN: handleFont(bv, LM_TC_BB); break;
|
2001-08-13 14:02:37 +00:00
|
|
|
case LFUN_DEFAULT: handleFont(bv, LM_TC_VAR); break;
|
2001-07-03 07:56:55 +00:00
|
|
|
|
2001-10-12 12:02:49 +00:00
|
|
|
case LFUN_GREEK:
|
|
|
|
handleFont(bv, LM_TC_GREEK1);
|
|
|
|
if (arg.size())
|
2001-10-23 08:14:52 +00:00
|
|
|
mathcursor->interpret(arg);
|
2001-10-12 12:02:49 +00:00
|
|
|
break;
|
|
|
|
|
2001-07-03 07:56:55 +00:00
|
|
|
case LFUN_MATH_MODE:
|
|
|
|
handleFont(bv, LM_TC_TEXTRM);
|
|
|
|
//bv->owner()->message(_("math text mode toggled"));
|
|
|
|
break;
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
case LFUN_MATH_LIMITS:
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
|
|
|
if (mathcursor->toggleLimits())
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_MATH_SIZE:
|
2001-10-23 09:03:07 +00:00
|
|
|
#if 0
|
2001-06-25 00:06:33 +00:00
|
|
|
if (!arg.empty()) {
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-10-23 09:03:07 +00:00
|
|
|
mathcursor->setSize(arg);
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
2001-10-23 09:03:07 +00:00
|
|
|
#endif
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
2001-07-09 10:19:50 +00:00
|
|
|
case LFUN_INSERT_MATRIX:
|
2001-06-25 00:06:33 +00:00
|
|
|
if (!arg.empty()) {
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-07-26 09:01:36 +00:00
|
|
|
mathcursor->interpret("matrix " + arg);
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-07-25 14:15:05 +00:00
|
|
|
case LFUN_MATH_SPACE:
|
|
|
|
{
|
|
|
|
bv->lockedInsetStoreUndo(Undo::EDIT);
|
2001-10-12 12:02:49 +00:00
|
|
|
mathcursor->insert(MathAtom(new MathSpaceInset(1)));
|
2001-07-25 14:15:05 +00:00
|
|
|
updateLocal(bv, true);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
case LFUN_MATH_DELIM:
|
|
|
|
{
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-07-13 07:55:55 +00:00
|
|
|
//lyxerr << "formulabase::LFUN_MATH_DELIM, arg: '" << arg << "'\n";
|
2001-08-09 15:19:31 +00:00
|
|
|
string ls;
|
|
|
|
string rs;
|
2001-06-29 11:54:39 +00:00
|
|
|
istringstream is(arg.c_str());
|
2001-08-09 15:19:31 +00:00
|
|
|
is >> ls >> rs;
|
2001-09-12 12:51:55 +00:00
|
|
|
if (!is) {
|
2001-08-09 15:19:31 +00:00
|
|
|
lyxerr << "can't parse delimeters from '" << arg << "'\n";
|
|
|
|
break;
|
2001-07-23 16:08:41 +00:00
|
|
|
}
|
2001-08-09 15:19:31 +00:00
|
|
|
bv->lockedInsetStoreUndo(Undo::EDIT);
|
2001-09-12 12:51:55 +00:00
|
|
|
mathcursor->handleDelim(ls, rs);
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case LFUN_PROTECTEDSPACE:
|
2001-07-25 09:32:38 +00:00
|
|
|
//lyxerr << " called LFUN_PROTECTEDSPACE\n";
|
2001-06-25 00:06:33 +00:00
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-10-12 12:02:49 +00:00
|
|
|
mathcursor->insert(MathAtom(new MathSpaceInset(1)));
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_UNDO:
|
|
|
|
bv->owner()->message(_("Invalid action in math mode!"));
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case LFUN_MATH_HALIGN:
|
|
|
|
{
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
|
|
|
lyxerr << "handling halign '" << arg << "'\n";
|
2001-09-26 16:52:34 +00:00
|
|
|
MathInset::idx_type idx;
|
2001-06-25 00:06:33 +00:00
|
|
|
MathArrayInset * p = matrixpar(idx);
|
|
|
|
if (!p)
|
|
|
|
break;
|
|
|
|
p->halign(arg.size() ? arg[0] : 'c', p->col(idx));
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case LFUN_MATH_VALIGN:
|
|
|
|
{
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
|
|
|
lyxerr << "handling valign '" << arg << "'\n";
|
2001-09-26 16:52:34 +00:00
|
|
|
MathInset::idx_type idx;
|
2001-06-25 00:06:33 +00:00
|
|
|
MathArrayInset * p = matrixpar(idx);
|
|
|
|
if (!p)
|
|
|
|
break;
|
|
|
|
p->valign(arg.size() ? arg[0] : 'c');
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case LFUN_MATH_ROW_INSERT:
|
|
|
|
{
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-09-26 16:52:34 +00:00
|
|
|
MathInset::idx_type idx;
|
2001-06-25 00:06:33 +00:00
|
|
|
MathArrayInset * p = matrixpar(idx);
|
|
|
|
lyxerr << " calling LFUN_MATH_ROW_INSERT on " << p << endl;
|
|
|
|
if (!p)
|
|
|
|
break;
|
|
|
|
p->addRow(p->row(idx));
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case LFUN_MATH_ROW_DELETE:
|
|
|
|
{
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-09-26 16:52:34 +00:00
|
|
|
MathInset::idx_type idx;
|
2001-06-25 00:06:33 +00:00
|
|
|
MathArrayInset * p = matrixpar(idx);
|
|
|
|
lyxerr << " calling LFUN_MATH_ROW_DELETE on " << p << endl;
|
|
|
|
if (!p)
|
|
|
|
break;
|
|
|
|
p->delRow(p->row(idx));
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case LFUN_MATH_COLUMN_INSERT:
|
|
|
|
{
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-09-26 16:52:34 +00:00
|
|
|
MathInset::idx_type idx;
|
2001-06-25 00:06:33 +00:00
|
|
|
MathArrayInset * p = matrixpar(idx);
|
|
|
|
if (!p)
|
|
|
|
break;
|
|
|
|
p->addCol(p->col(idx));
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case LFUN_MATH_COLUMN_DELETE:
|
|
|
|
{
|
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-09-26 16:52:34 +00:00
|
|
|
MathInset::idx_type idx;
|
2001-06-25 00:06:33 +00:00
|
|
|
MathArrayInset * p = matrixpar(idx);
|
|
|
|
if (!p)
|
|
|
|
break;
|
|
|
|
p->delCol(p->col(idx));
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case LFUN_EXEC_COMMAND:
|
|
|
|
result = UNDISPATCHED;
|
|
|
|
break;
|
|
|
|
|
2001-08-13 14:02:37 +00:00
|
|
|
case -1:
|
|
|
|
case LFUN_INSERT_MATH:
|
|
|
|
case LFUN_SELFINSERT:
|
|
|
|
if (!arg.empty()) {
|
2001-06-25 00:06:33 +00:00
|
|
|
bv->lockedInsetStoreUndo(Undo::INSERT);
|
2001-08-13 14:02:37 +00:00
|
|
|
mathcursor->interpret(arg);
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
2001-08-13 14:02:37 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LFUN_MATH_PANEL:
|
|
|
|
result = UNDISPATCHED;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2001-09-13 16:14:43 +00:00
|
|
|
result = UNDISPATCHED;
|
2001-06-25 00:06:33 +00:00
|
|
|
}
|
|
|
|
|
2001-10-12 15:38:58 +00:00
|
|
|
lyx::Assert(mathcursor);
|
2001-09-11 10:58:17 +00:00
|
|
|
//mathcursor->normalize();
|
2001-06-25 00:06:33 +00:00
|
|
|
|
2001-10-12 15:38:58 +00:00
|
|
|
if (//was_macro != mathcursor->inMacroMode() &&
|
|
|
|
action >= 0 && action != LFUN_BACKSPACE)
|
2001-07-17 09:46:07 +00:00
|
|
|
updateLocal(bv, true);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
2001-07-26 09:01:36 +00:00
|
|
|
if (mathcursor->selection() || was_selection)
|
2001-06-28 10:25:20 +00:00
|
|
|
toggleInsetSelection(bv);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
if (result == DISPATCHED || result == DISPATCHED_NOUPDATE ||
|
|
|
|
result == UNDISPATCHED)
|
2001-06-28 10:25:20 +00:00
|
|
|
showInsetCursor(bv);
|
2001-06-25 00:06:33 +00:00
|
|
|
else
|
|
|
|
bv->unlockInset(this);
|
|
|
|
|
|
|
|
return result; // original version
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
Inset::Code InsetFormulaBase::lyxCode() const
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
return Inset::MATH_CODE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-06 12:09:32 +00:00
|
|
|
void mathDispatchCreation(BufferView * bv, string const & arg, bool display)
|
|
|
|
{
|
|
|
|
if (bv->available()) {
|
2001-08-14 07:46:11 +00:00
|
|
|
// use selection if available..
|
|
|
|
//string sel;
|
|
|
|
//if (action == LFUN_MATH_IMPORT_SELECTION)
|
|
|
|
// sel = "";
|
|
|
|
//else
|
|
|
|
|
2001-10-19 11:25:48 +00:00
|
|
|
string sel = bv->getLyXText()->selectionAsString(bv->buffer(), false);
|
2001-08-14 07:46:11 +00:00
|
|
|
|
|
|
|
InsetFormulaBase * f;
|
|
|
|
if (sel.empty()) {
|
2001-09-24 13:38:52 +00:00
|
|
|
f = new InsetFormula;
|
|
|
|
if (openNewInset(bv, f)) {
|
|
|
|
// don't do that also for LFUN_MATH_MODE unless you want end up with
|
|
|
|
// always changing to mathrm when opening an inlined inset
|
|
|
|
// -- I really hate "LyXfunc overloading"...
|
|
|
|
if (display)
|
|
|
|
f->localDispatch(bv, LFUN_MATH_DISPLAY, string());
|
|
|
|
f->localDispatch(bv, LFUN_INSERT_MATH, arg);
|
|
|
|
}
|
2001-08-14 07:46:11 +00:00
|
|
|
} else {
|
|
|
|
// create a macro if we see "\\newcommand" somewhere, and an ordinary
|
|
|
|
// formula otherwise
|
|
|
|
if (sel.find("\\newcommand") == string::npos)
|
|
|
|
f = new InsetFormula(sel);
|
|
|
|
else
|
|
|
|
f = new InsetFormulaMacro(sel);
|
|
|
|
bv->getLyXText()->cutSelection(bv);
|
|
|
|
openNewInset(bv, f);
|
|
|
|
}
|
2001-07-06 12:09:32 +00:00
|
|
|
}
|
|
|
|
bv->owner()->getLyXFunc()->setMessage(N_("Math editor mode"));
|
|
|
|
}
|
|
|
|
|
2001-08-30 09:35:11 +00:00
|
|
|
|
2001-07-06 12:09:32 +00:00
|
|
|
void mathDispatchMathDisplay(BufferView * bv, string const & arg)
|
|
|
|
{
|
|
|
|
mathDispatchCreation(bv, arg, true);
|
|
|
|
}
|
2001-08-14 07:46:11 +00:00
|
|
|
|
2001-07-06 12:09:32 +00:00
|
|
|
|
|
|
|
void mathDispatchMathMode(BufferView * bv, string const & arg)
|
|
|
|
{
|
|
|
|
mathDispatchCreation(bv, arg, false);
|
|
|
|
}
|
|
|
|
|
2001-08-14 07:46:11 +00:00
|
|
|
|
2001-07-06 12:09:32 +00:00
|
|
|
void mathDispatchMathImportSelection(BufferView * bv, string const & arg)
|
|
|
|
{
|
|
|
|
mathDispatchCreation(bv, arg, true);
|
|
|
|
}
|
|
|
|
|
2001-08-14 07:46:11 +00:00
|
|
|
|
2001-07-06 12:09:32 +00:00
|
|
|
void mathDispatchMathMacro(BufferView * bv, string const & arg)
|
|
|
|
{
|
|
|
|
if (bv->available()) {
|
2001-07-17 09:46:07 +00:00
|
|
|
if (arg.empty())
|
2001-07-06 12:09:32 +00:00
|
|
|
bv->owner()->getLyXFunc()->setErrorMessage(N_("Missing argument"));
|
|
|
|
else {
|
2001-07-17 09:46:07 +00:00
|
|
|
string s(arg);
|
2001-07-06 12:09:32 +00:00
|
|
|
string const s1 = token(s, ' ', 1);
|
|
|
|
int const na = s1.empty() ? 0 : lyx::atoi(s1);
|
|
|
|
openNewInset(bv, new InsetFormulaMacro(token(s, ' ', 0), na));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-14 07:46:11 +00:00
|
|
|
|
2001-07-06 12:09:32 +00:00
|
|
|
void mathDispatchMathDelim(BufferView * bv, string const & arg)
|
|
|
|
{
|
|
|
|
if (bv->available()) {
|
|
|
|
if (openNewInset(bv, new InsetFormula))
|
|
|
|
bv->theLockingInset()->localDispatch(bv, LFUN_MATH_DELIM, arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void mathDispatchInsertMatrix(BufferView * bv, string const & arg)
|
|
|
|
{
|
|
|
|
if (bv->available()) {
|
|
|
|
if (openNewInset(bv, new InsetFormula))
|
|
|
|
bv->theLockingInset()->localDispatch(bv, LFUN_INSERT_MATRIX, arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-14 07:46:11 +00:00
|
|
|
|
2001-07-06 12:09:32 +00:00
|
|
|
void mathDispatchInsertMath(BufferView * bv, string const & arg)
|
|
|
|
{
|
|
|
|
if (bv->available()) {
|
2001-10-12 14:33:38 +00:00
|
|
|
if (arg.size() && arg[0] == '\\') {
|
|
|
|
InsetFormula * f = new InsetFormula(arg);
|
|
|
|
if (!bv->insertInset(f))
|
|
|
|
delete f;
|
|
|
|
} else
|
2001-07-09 10:32:44 +00:00
|
|
|
mathDispatchMathMode(bv, arg);
|
2001-07-06 12:09:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-30 09:35:11 +00:00
|
|
|
|
|
|
|
void mathDispatchGreek(BufferView * bv, string const & arg)
|
|
|
|
{
|
|
|
|
if (bv->available()) {
|
|
|
|
InsetFormula * f = new InsetFormula;
|
|
|
|
if (openNewInset(bv, f)) {
|
2001-10-12 12:02:49 +00:00
|
|
|
bv->theLockingInset()->localDispatch(bv, LFUN_GREEK, arg);
|
2001-08-30 09:35:11 +00:00
|
|
|
bv->unlockInset(f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|