From 5e79b2ca4f262e44cbbdc8d1db773c8aac3543b6 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Sun, 9 Mar 2008 15:07:27 +0000 Subject: [PATCH] Add math context menu. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23591 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ui/stdmenus.inc | 8 ++++++++ src/mathed/InsetMathHull.cpp | 6 ++++++ src/mathed/InsetMathHull.h | 3 +++ 3 files changed, 17 insertions(+) diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index c319ebef26..4174c70790 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -531,6 +531,14 @@ Menuset Item "About LyX|X" "dialog-show aboutlyx" End +# +# InsetMath context menu +# + Menu "context-math" + Item "Equation label|L" "label-insert" + End + + # # InsetRef context menu # diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index b8607a89f2..63065c2fb9 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -1606,4 +1606,10 @@ void InsetMathHull::textString(odocstream & os) const } +docstring InsetMathHull::contextMenu(BufferView const &, int, int) const +{ + return from_ascii("context-math"); +} + + } // namespace lyx diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index 1a0c49d056..927ef15db2 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -128,6 +128,9 @@ public: /// Force inset into LTR environment if surroundings are RTL? virtual bool forceLTR() const { return true; } + /// + virtual docstring contextMenu(BufferView const &, int, int) const; + protected: InsetMathHull(InsetMathHull const &); -- 2.39.2