From: Vincent van Ravesteijn Date: Mon, 29 Nov 2010 21:27:25 +0000 (+0000) Subject: Rename InsetXXX::contextMenu to InsetXXX::contextMenuName. Now this function doesn... X-Git-Tag: 2.0.0~1609 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e7f2bbe1eec4752ae2c88481bd77320186bbb8fb;hp=5eb7add4092708a5a0dbabf303164be624aff72f;p=lyx.git Rename InsetXXX::contextMenu to InsetXXX::contextMenuName. Now this function doesn't need all the parameters and we split the functionality of choosing which context menu to return, from the functionality of supplying the name for the Inset itself. Now, the InsetText context menu is returned for InsetCollapsables when the button is not hit by the mouse. There is no (intended) change in functionality for insets without a button, collapsed insets. This fixes partly bug #6642. A fix for InsetTabular and for insets with no button will follow. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36604 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/Inset.cpp b/src/insets/Inset.cpp index 8566129b3a..1c0312f5a3 100644 --- a/src/insets/Inset.cpp +++ b/src/insets/Inset.cpp @@ -255,6 +255,12 @@ docstring Inset::toolTip(BufferView const &, int, int) const docstring Inset::contextMenu(BufferView const &, int, int) const +{ + return contextMenuName(); +} + + +docstring Inset::contextMenuName() const { return docstring(); } diff --git a/src/insets/Inset.h b/src/insets/Inset.h index b39c59cc86..85a1360c2c 100644 --- a/src/insets/Inset.h +++ b/src/insets/Inset.h @@ -400,9 +400,14 @@ public: /// This default implementation returns an empty string. virtual docstring toolTip(BufferView const & bv, int x, int y) const; + /// \return Context menu identifier. This function determines + /// whose Inset's menu should be shown for the given position. + virtual docstring contextMenu(BufferView const & bv, int x, int y) const; + /// \return Context menu identifier for this inset. /// This default implementation returns an empty string. - virtual docstring contextMenu(BufferView const & bv, int x, int y) const; + virtual docstring contextMenuName() const; + // FIXME This should really disappear in favor of // docstring name() const { return from_ascii(insetName(lyxCode()))); } diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 539345100d..8f1af04f50 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -987,7 +987,7 @@ docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const } -docstring InsetBibtex::contextMenu(BufferView const &, int, int) const +docstring InsetBibtex::contextMenuName() const { return from_ascii("context-bibtex"); } diff --git a/src/insets/InsetBibtex.h b/src/insets/InsetBibtex.h index 75d010aa7c..5ede7aaa45 100644 --- a/src/insets/InsetBibtex.h +++ b/src/insets/InsetBibtex.h @@ -58,7 +58,7 @@ public: /// docstring xhtml(XHTMLStream &, OutputParams const &) const; /// - docstring contextMenu(BufferView const &, int, int) const; + docstring contextMenuName() const; //@} /// \name Static public methods obligated for InsetCommand derived classes diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index 86121163af..6b409200bf 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -529,7 +529,7 @@ void InsetBox::validate(LaTeXFeatures & features) const } -docstring InsetBox::contextMenu(BufferView const &, int, int) const +docstring InsetBox::contextMenuName() const { return from_ascii("context-box"); } diff --git a/src/insets/InsetBox.h b/src/insets/InsetBox.h index b0692484f5..8c7303246e 100644 --- a/src/insets/InsetBox.h +++ b/src/insets/InsetBox.h @@ -131,7 +131,7 @@ private: /// used by the constructors void init(); /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// InsetBoxParams params_; diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index 978b0408dc..c11a013cb1 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -249,7 +249,7 @@ void InsetBranch::validate(LaTeXFeatures & features) const } -docstring InsetBranch::contextMenu(BufferView const &, int, int) const +docstring InsetBranch::contextMenuName() const { return from_ascii("context-branch"); } diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h index 4100a631cc..f852ee2def 100644 --- a/src/insets/InsetBranch.h +++ b/src/insets/InsetBranch.h @@ -77,7 +77,7 @@ private: /// void validate(LaTeXFeatures &) const; /// - docstring contextMenu(BufferView const &, int, int) const; + docstring contextMenuName() const; /// void addToToc(DocIterator const &); /// diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index c9a012623d..5d8d8c9a20 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -599,7 +599,7 @@ void InsetCitation::validate(LaTeXFeatures & features) const } -docstring InsetCitation::contextMenu(BufferView const &, int, int) const +docstring InsetCitation::contextMenuName() const { return from_ascii("context-citation"); } diff --git a/src/insets/InsetCitation.h b/src/insets/InsetCitation.h index aedbd2e43b..831da30dac 100644 --- a/src/insets/InsetCitation.h +++ b/src/insets/InsetCitation.h @@ -59,7 +59,7 @@ public: /// void addToToc(DocIterator const &); /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; //@} /// \name Static public methods obligated for InsetCommand derived classes diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 4fb0b2cc8c..72cd73b5b2 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -622,16 +622,25 @@ docstring InsetCollapsable::contextMenu(BufferView const & bv, int x, int y) const { if (decoration() == InsetLayout::CONGLOMERATE) - return from_ascii("context-conglomerate"); + return contextMenuName(); if (geometry(bv) == NoButton) - return from_ascii("context-collapsable"); + return contextMenuName(); Dimension dim = dimensionCollapsed(bv); if (x < xo(bv) + dim.wid && y < yo(bv) + dim.des) - return from_ascii("context-collapsable"); + return contextMenuName(); + + return InsetText::contextMenuName(); +} - return InsetText::contextMenu(bv, x, y); + +docstring InsetCollapsable::contextMenuName() const +{ + if (decoration() == InsetLayout::CONGLOMERATE) + return from_ascii("context-conglomerate"); + else + return from_ascii("context-collapsable"); } } // namespace lyx diff --git a/src/insets/InsetCollapsable.h b/src/insets/InsetCollapsable.h index fda6f84e3c..4008cee742 100644 --- a/src/insets/InsetCollapsable.h +++ b/src/insets/InsetCollapsable.h @@ -141,7 +141,9 @@ public: /// virtual bool usePlainLayout() const { return true; } /// - virtual docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenu(BufferView const & bv, int x, int y) const; + /// + docstring contextMenuName() const; /// docstring floatName(std::string const & type) const; protected: diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp index a429e27435..4da3f19b2b 100644 --- a/src/insets/InsetCommand.cpp +++ b/src/insets/InsetCommand.cpp @@ -208,7 +208,7 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd, } -docstring InsetCommand::contextMenu(BufferView const &, int, int) const +docstring InsetCommand::contextMenuName() const { return from_ascii("context-") + from_ascii(insetName(p_.code())); } diff --git a/src/insets/InsetCommand.h b/src/insets/InsetCommand.h index 2d1d678a22..a70f3d2065 100644 --- a/src/insets/InsetCommand.h +++ b/src/insets/InsetCommand.h @@ -91,7 +91,7 @@ protected: /// \name Methods relaying to the InsetCommandParams p_ //@{ /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// bool showInsetDialog(BufferView * bv) const; /// diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h index 139834c21a..416dffbf31 100644 --- a/src/insets/InsetERT.h +++ b/src/insets/InsetERT.h @@ -38,7 +38,7 @@ public: /// static std::string params2string(CollapseStatus); - docstring contextMenu(BufferView const &, int, int) const + docstring contextMenuName() const { return from_ascii("context-ert"); } private: /// diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index f224d54068..f8b8a9bd65 100644 --- a/src/insets/InsetExternal.cpp +++ b/src/insets/InsetExternal.cpp @@ -789,7 +789,7 @@ void InsetExternal::addPreview(DocIterator const & /*inset_pos*/, } -docstring InsetExternal::contextMenu(BufferView const &, int, int) const +docstring InsetExternal::contextMenuName() const { return from_ascii("context-external"); } diff --git a/src/insets/InsetExternal.h b/src/insets/InsetExternal.h index 58377daee7..a5c1c2c58f 100644 --- a/src/insets/InsetExternal.h +++ b/src/insets/InsetExternal.h @@ -111,7 +111,7 @@ public: /// \returns the number of rows (\n's) of generated code. int latex(odocstream &, OutputParams const &) const; /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// bool setMouseHover(BufferView const * bv, bool mouse_hover); /// diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index e28a986b73..25abe040d6 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -1040,7 +1040,7 @@ void InsetGraphics::addToToc(DocIterator const & cpit) } -docstring InsetGraphics::contextMenu(BufferView const &, int, int) const +docstring InsetGraphics::contextMenuName() const { return from_ascii("context-graphics"); } diff --git a/src/insets/InsetGraphics.h b/src/insets/InsetGraphics.h index 1846c4a4e6..34391f5437 100644 --- a/src/insets/InsetGraphics.h +++ b/src/insets/InsetGraphics.h @@ -98,7 +98,7 @@ private: /// void addToToc(DocIterator const &); /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// Force inset into LTR environment if surroundings are RTL bool forceLTR() const { return true; } /// diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index 29ce2ddca7..7a293ff8a4 100644 --- a/src/insets/InsetHyperlink.cpp +++ b/src/insets/InsetHyperlink.cpp @@ -264,7 +264,7 @@ void InsetHyperlink::validate(LaTeXFeatures & features) const } -docstring InsetHyperlink::contextMenu(BufferView const &, int, int) const +docstring InsetHyperlink::contextMenuName() const { return from_ascii("context-hyperlink"); } diff --git a/src/insets/InsetHyperlink.h b/src/insets/InsetHyperlink.h index acecd16d2a..ddf35af853 100644 --- a/src/insets/InsetHyperlink.h +++ b/src/insets/InsetHyperlink.h @@ -40,7 +40,7 @@ public: /// docstring toolTip(BufferView const & bv, int x, int y) const; /// - docstring contextMenu(BufferView const &, int, int) const; + docstring contextMenuName() const; /// void validate(LaTeXFeatures &) const; /// diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index fa2c835545..9464012614 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -898,7 +898,7 @@ void InsetInclude::draw(PainterInfo & pi, int x, int y) const } -docstring InsetInclude::contextMenu(BufferView const &, int, int) const +docstring InsetInclude::contextMenuName() const { return from_ascii("context-include"); } diff --git a/src/insets/InsetInclude.h b/src/insets/InsetInclude.h index b66a21b829..7860ac6510 100644 --- a/src/insets/InsetInclude.h +++ b/src/insets/InsetInclude.h @@ -103,7 +103,7 @@ public: /// void updateBuffer(ParIterator const &, UpdateType); /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; //@} /// \name Static public methods obligated for InsetCommand derived classes diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp index 86da890e02..455f683c64 100644 --- a/src/insets/InsetIndex.cpp +++ b/src/insets/InsetIndex.cpp @@ -376,7 +376,7 @@ void InsetIndex::validate(LaTeXFeatures & features) const } -docstring InsetIndex::contextMenu(BufferView const &, int, int) const +docstring InsetIndex::contextMenuName() const { return from_ascii("context-index"); } @@ -576,7 +576,7 @@ void InsetPrintIndex::validate(LaTeXFeatures & features) const } -docstring InsetPrintIndex::contextMenu(BufferView const &, int, int) const +docstring InsetPrintIndex::contextMenuName() const { return buffer().masterBuffer()->params().use_indices ? from_ascii("context-indexprint") : docstring(); diff --git a/src/insets/InsetIndex.h b/src/insets/InsetIndex.h index b6a0669ee6..26d4fc5e32 100644 --- a/src/insets/InsetIndex.h +++ b/src/insets/InsetIndex.h @@ -79,7 +79,7 @@ private: /// Updates needed features for this inset. void validate(LaTeXFeatures & features) const; /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// Inset * clone() const { return new InsetIndex(*this); } @@ -108,7 +108,7 @@ public: /// bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// Updates needed features for this inset. void validate(LaTeXFeatures & features) const; /// diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 88a27d61be..4dbee710ae 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -452,7 +452,7 @@ void InsetInfo::updateInfo() } -docstring InsetInfo::contextMenu(BufferView const &, int, int) const +docstring InsetInfo::contextMenuName() const { return from_ascii("context-info"); } diff --git a/src/insets/InsetInfo.h b/src/insets/InsetInfo.h index 25f40e241f..bb2144db03 100644 --- a/src/insets/InsetInfo.h +++ b/src/insets/InsetInfo.h @@ -126,7 +126,7 @@ public: /// docstring toolTip(BufferView const & bv, int x, int y) const; /// - docstring contextMenu(BufferView const &, int, int) const; + docstring contextMenuName() const; /// should paragraph indendation be ommitted in any case? bool neverIndent() const { return true; } diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp index dc5728de74..f03cace45f 100644 --- a/src/insets/InsetListings.cpp +++ b/src/insets/InsetListings.cpp @@ -309,7 +309,7 @@ docstring InsetListings::xhtml(XHTMLStream & os, OutputParams const & rp) const } -docstring InsetListings::contextMenu(BufferView const &, int, int) const +docstring InsetListings::contextMenuName() const { return from_ascii("context-listings"); } diff --git a/src/insets/InsetListings.h b/src/insets/InsetListings.h index d307126fe7..7ce6575638 100644 --- a/src/insets/InsetListings.h +++ b/src/insets/InsetListings.h @@ -67,7 +67,7 @@ private: /// InsetListingsParams & params() { return params_; } /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// void doDispatch(Cursor & cur, FuncRequest & cmd); /// diff --git a/src/insets/InsetNewline.cpp b/src/insets/InsetNewline.cpp index c775170d90..88c77c00f7 100644 --- a/src/insets/InsetNewline.cpp +++ b/src/insets/InsetNewline.cpp @@ -261,7 +261,7 @@ void InsetNewline::draw(PainterInfo & pi, int x, int y) const } -docstring InsetNewline::contextMenu(BufferView const &, int, int) const +docstring InsetNewline::contextMenuName() const { return from_ascii("context-newline"); } diff --git a/src/insets/InsetNewline.h b/src/insets/InsetNewline.h index 31ab4451a9..85bf1275ba 100644 --- a/src/insets/InsetNewline.h +++ b/src/insets/InsetNewline.h @@ -77,7 +77,7 @@ private: /// ColorCode ColorName() const; /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// Inset * clone() const { return new InsetNewline(*this); } /// diff --git a/src/insets/InsetNewpage.cpp b/src/insets/InsetNewpage.cpp index 0f718c2979..b405cd2cfd 100644 --- a/src/insets/InsetNewpage.cpp +++ b/src/insets/InsetNewpage.cpp @@ -257,7 +257,7 @@ docstring InsetNewpage::xhtml(XHTMLStream & xs, OutputParams const &) const } -docstring InsetNewpage::contextMenu(BufferView const &, int, int) const +docstring InsetNewpage::contextMenuName() const { return from_ascii("context-newpage"); } diff --git a/src/insets/InsetNewpage.h b/src/insets/InsetNewpage.h index fead3f37e7..30c064cf28 100644 --- a/src/insets/InsetNewpage.h +++ b/src/insets/InsetNewpage.h @@ -81,7 +81,7 @@ private: /// ColorCode ColorName() const; /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// Inset * clone() const { return new InsetNewpage(*this); } /// diff --git a/src/insets/InsetNomencl.cpp b/src/insets/InsetNomencl.cpp index b70a2a73b7..1a44ccd5f8 100644 --- a/src/insets/InsetNomencl.cpp +++ b/src/insets/InsetNomencl.cpp @@ -333,7 +333,7 @@ InsetCode InsetPrintNomencl::lyxCode() const } -docstring InsetPrintNomencl::contextMenu(BufferView const &, int, int) const +docstring InsetPrintNomencl::contextMenuName() const { return from_ascii("context-nomenclprint"); } diff --git a/src/insets/InsetNomencl.h b/src/insets/InsetNomencl.h index ef5b452b36..b50f72279e 100644 --- a/src/insets/InsetNomencl.h +++ b/src/insets/InsetNomencl.h @@ -98,7 +98,7 @@ public: /// int latex(odocstream &, OutputParams const &) const; /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; //@} /// \name Static public methods obligated for InsetCommand derived classes diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index d3c1b1e2b4..5198524da6 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -350,7 +350,7 @@ void InsetNote::validate(LaTeXFeatures & features) const } -docstring InsetNote::contextMenu(BufferView const &, int, int) const +docstring InsetNote::contextMenuName() const { return from_ascii("context-note"); } diff --git a/src/insets/InsetNote.h b/src/insets/InsetNote.h index dde3a48cb2..4f9ecff3e5 100644 --- a/src/insets/InsetNote.h +++ b/src/insets/InsetNote.h @@ -105,7 +105,7 @@ private: /// used by the constructors void init(); /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// friend class InsetNoteParams; diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp index f275e1c9c7..9ec662fef1 100644 --- a/src/insets/InsetPhantom.cpp +++ b/src/insets/InsetPhantom.cpp @@ -358,7 +358,7 @@ docstring InsetPhantom::xhtml(XHTMLStream &, OutputParams const &) const return docstring(); } -docstring InsetPhantom::contextMenu(BufferView const &, int, int) const +docstring InsetPhantom::contextMenuName() const { return from_ascii("context-phantom"); } diff --git a/src/insets/InsetPhantom.h b/src/insets/InsetPhantom.h index d27721f098..c5a805b64d 100644 --- a/src/insets/InsetPhantom.h +++ b/src/insets/InsetPhantom.h @@ -94,7 +94,7 @@ private: /// used by the constructors void init(); /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// friend class InsetPhantomParams; diff --git a/src/insets/InsetPreview.h b/src/insets/InsetPreview.h index b398c89b8f..439740a4f7 100644 --- a/src/insets/InsetPreview.h +++ b/src/insets/InsetPreview.h @@ -49,7 +49,7 @@ public: bool descendable(BufferView const & /*bv*/) const { return true; } - docstring contextMenu(BufferView const &, int, int) const + docstring contextMenuName() const { return from_ascii("context-preview"); } void metrics(MetricsInfo & mi, Dimension & dim) const; diff --git a/src/insets/InsetScript.cpp b/src/insets/InsetScript.cpp index 76f5757c38..9e729d5790 100644 --- a/src/insets/InsetScript.cpp +++ b/src/insets/InsetScript.cpp @@ -423,7 +423,7 @@ docstring InsetScript::xhtml(XHTMLStream & xs, OutputParams const & runparams) c } -docstring InsetScript::contextMenu(BufferView const &, int, int) const +docstring InsetScript::contextMenuName() const { return from_ascii("context-script"); } diff --git a/src/insets/InsetScript.h b/src/insets/InsetScript.h index 92be091885..eb3b55632a 100644 --- a/src/insets/InsetScript.h +++ b/src/insets/InsetScript.h @@ -109,7 +109,7 @@ public: /// Inset * clone() const { return new InsetScript(*this); } /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; //@} /// \name Public functions inherited from InsetText class diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp index b7c15d6eef..cccde17fc8 100644 --- a/src/insets/InsetSpace.cpp +++ b/src/insets/InsetSpace.cpp @@ -753,7 +753,7 @@ bool InsetSpace::isStretchableSpace() const } -docstring InsetSpace::contextMenu(BufferView const &, int, int) const +docstring InsetSpace::contextMenuName() const { return from_ascii("context-space"); } diff --git a/src/insets/InsetSpace.h b/src/insets/InsetSpace.h index 5ecaea0a2b..089b5664e9 100644 --- a/src/insets/InsetSpace.h +++ b/src/insets/InsetSpace.h @@ -146,7 +146,7 @@ public: // a line separator)? bool isSpace() const { return true; } /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// bool clickable(int /* x */, int /* y */) const { return true; } protected: diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 428228da94..b1706be00e 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3327,7 +3327,7 @@ void InsetTabular::write(ostream & os) const } -docstring InsetTabular::contextMenu(BufferView const &, int, int) const +docstring InsetTabular::contextMenuName() const { // FIXME: depending on the selection state, we could offer a different menu. return from_ascii("context-tabular"); diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h index 0b192b83bd..6b34e6caf3 100644 --- a/src/insets/InsetTabular.h +++ b/src/insets/InsetTabular.h @@ -813,7 +813,7 @@ public: /// InsetCode lyxCode() const { return TABULAR_CODE; } /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// get offset of this cursor slice relative to our upper left corner void cursorPos(BufferView const & bv, CursorSlice const & sl, bool boundary, int & x, int & y) const; diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 429a1510d6..68220af5d6 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -813,7 +813,7 @@ void InsetText::completionPosAndDim(Cursor const & cur, int & x, int & y, } -docstring InsetText::contextMenu(BufferView const &, int, int) const +docstring InsetText::contextMenuName() const { return from_ascii("context-edit"); } diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h index 3c242fd4f9..ebb11a29f1 100644 --- a/src/insets/InsetText.h +++ b/src/insets/InsetText.h @@ -196,7 +196,7 @@ public: docstring toolTipText(docstring prefix = empty_docstring()) const; /// - virtual docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// void doDispatch(Cursor & cur, FuncRequest & cmd); protected: diff --git a/src/insets/InsetVSpace.cpp b/src/insets/InsetVSpace.cpp index e8fad01615..e73db774d5 100644 --- a/src/insets/InsetVSpace.cpp +++ b/src/insets/InsetVSpace.cpp @@ -233,7 +233,7 @@ docstring InsetVSpace::xhtml(XHTMLStream &, OutputParams const &) const } -docstring InsetVSpace::contextMenu(BufferView const &, int, int) const +docstring InsetVSpace::contextMenuName() const { return from_ascii("context-vspace"); } diff --git a/src/insets/InsetVSpace.h b/src/insets/InsetVSpace.h index 4eb279dad2..e065462ced 100644 --- a/src/insets/InsetVSpace.h +++ b/src/insets/InsetVSpace.h @@ -32,7 +32,7 @@ public: /// bool hasSettings() const { return true; } /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + docstring contextMenuName() const; /// static void string2params(std::string const &, VSpace &); /// diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index ec9d299f84..8ff7b230d4 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -1968,7 +1968,7 @@ void InsetMathHull::tocString(odocstream & os) const } -docstring InsetMathHull::contextMenu(BufferView const &, int, int) const +docstring InsetMathHull::contextMenuName() const { return from_ascii("context-math"); } diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index 7f161f2235..dd4255f0d9 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -154,7 +154,7 @@ public: void recordLocation(DocIterator const & di); /// - virtual docstring contextMenu(BufferView const &, int, int) const; + docstring contextMenuName() const; /// InsetCode lyxCode() const { return MATH_HULL_CODE; } diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index 9cf184fa7a..cede32a786 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -268,7 +268,7 @@ InsetSpaceParams InsetMathSpace::params() const } -docstring InsetMathSpace::contextMenu(BufferView const &, int, int) const +docstring InsetMathSpace::contextMenuName() const { return from_ascii("context-mathspace"); } diff --git a/src/mathed/InsetMathSpace.h b/src/mathed/InsetMathSpace.h index 8f633fffa8..fa5c8aee2f 100644 --- a/src/mathed/InsetMathSpace.h +++ b/src/mathed/InsetMathSpace.h @@ -61,7 +61,7 @@ public: /// bool hasSettings() const { return true; } /// - docstring contextMenu(BufferView const &, int, int) const; + docstring contextMenuName() const; /// bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; /// diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index 3eadf6d2ef..f6421c6c48 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -1353,7 +1353,7 @@ void MathMacroTemplate::infoize(odocstream & os) const } -docstring MathMacroTemplate::contextMenu(BufferView const &, int, int) const +docstring MathMacroTemplate::contextMenuName() const { return from_ascii("context-math-macro-definition"); } diff --git a/src/mathed/MathMacroTemplate.h b/src/mathed/MathMacroTemplate.h index e93ceb46d0..be3b7ee5f2 100644 --- a/src/mathed/MathMacroTemplate.h +++ b/src/mathed/MathMacroTemplate.h @@ -104,7 +104,7 @@ public: /// void infoize(odocstream & os) const; /// - docstring contextMenu(BufferView const &, int, int) const; + docstring contextMenuName() const; protected: /// virtual void doDispatch(Cursor & cur, FuncRequest & cmd);