From 63adecdf8a7069a6183a440d49bc1d0107b634fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 30 Aug 2001 09:35:11 +0000 Subject: [PATCH] prepare support insertion of greek characters without explicitly entering math mode git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2627 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/formulabase.C | 14 ++++++++++++++ src/mathed/formulabase.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 2a06ceb9a9..e55f403642 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -754,6 +754,7 @@ void mathDispatchCreation(BufferView * bv, string const & arg, bool display) bv->owner()->getLyXFunc()->setMessage(N_("Math editor mode")); } + void mathDispatchMathDisplay(BufferView * bv, string const & arg) { mathDispatchCreation(bv, arg, true); @@ -815,3 +816,16 @@ void mathDispatchInsertMath(BufferView * bv, string const & arg) } } + +void mathDispatchGreek(BufferView * bv, string const & arg) +{ + if (bv->available()) { + InsetFormula * f = new InsetFormula; + if (openNewInset(bv, f)) { + bv->theLockingInset()->localDispatch(bv, LFUN_GREEK, string()); + bv->theLockingInset()->localDispatch(bv, LFUN_SELFINSERT, arg); + bv->unlockInset(f); + } + } +} + diff --git a/src/mathed/formulabase.h b/src/mathed/formulabase.h index 81b36fb66b..ab614a6f94 100644 --- a/src/mathed/formulabase.h +++ b/src/mathed/formulabase.h @@ -143,6 +143,8 @@ void mathDispatchInsertMath(BufferView *, string const &); // void mathDispatchInsertMatrix(BufferView *, string const &); // +void mathDispatchGreek(BufferView *, string const &); +// void mathDispatchMathImportSelection(BufferView *, string const &); #endif -- 2.39.2