]> git.lyx.org Git - features.git/commitdiff
prepare support insertion of greek characters without explicitly entering
authorAndré Pönitz <poenitz@gmx.net>
Thu, 30 Aug 2001 09:35:11 +0000 (09:35 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 30 Aug 2001 09:35:11 +0000 (09:35 +0000)
math mode

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2627 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/formulabase.C
src/mathed/formulabase.h

index 2a06ceb9a980a846aa1fdc99b6c2a6db82871659..e55f403642b51b867fe3a14d5eb5484f981e8b4f 100644 (file)
@@ -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);
+               }
+       }
+}         
+
index 81b36fb66b993fdc49b9dc5d0c1908d23cfe4571..ab614a6f942960710c2d008ee13702ffa29dacb5 100644 (file)
@@ -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