summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2024-11-22 15:04:03 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2024-12-05 22:31:30 +0100
commit2d7ab2b66bf1266246fcbab6e428faf0af94d913 (patch)
tree0b6711ba92a05764b2a966967e4cc03c7f190dc7 /include
parentf975b8418573b887cdc3269bcefa54bde6d60fa1 (diff)
jsdialog: weld::Menu
- weld::Menu doesn't have base with weld::Widget - use separate container, only one menu per WindowId - first only send menu and cancel, when user activates option we will send another request and execute entry as menu can be blocking - there is connect_activated way of async setup too Change-Id: Iea03f82a91ecc19af67b91f85364675c119056ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177722 (cherry picked from commit efeb511607dacce991866bcf328c96a01ab594f9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177852 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/jsdialog/executor.hxx10
-rw-r--r--include/vcl/weld.hxx4
2 files changed, 14 insertions, 0 deletions
diff --git a/include/vcl/jsdialog/executor.hxx b/include/vcl/jsdialog/executor.hxx
index ef667a70ce26..260be394d6b8 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -44,6 +44,16 @@ public:
rTreeView.signal_row_activated();
}
+ static void trigger_popup_menu(weld::TreeView& rTreeView, const CommandEvent& rCommand)
+ {
+ rTreeView.signal_popup_menu(rCommand);
+ }
+
+ static void trigger_activated(weld::Menu& rMenu, const OUString& rIdent)
+ {
+ rMenu.signal_activate(rIdent);
+ }
+
static void trigger_item_activated(weld::IconView& rIconView)
{
rIconView.signal_item_activated();
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index e55cf8a205f0..74290a3c9ec7 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1009,6 +1009,8 @@ protected:
return m_aEditingDoneHdl.Call(rIterText);
}
+ void signal_popup_menu(const CommandEvent& rCommand) { m_aPopupMenuHdl.Call(rCommand); }
+
Link<const TreeIter&, OUString> m_aQueryTooltipHdl;
OUString signal_query_tooltip(const TreeIter& rIter) { return m_aQueryTooltipHdl.Call(rIter); }
@@ -2449,6 +2451,8 @@ enum class Placement
class VCL_DLLPUBLIC Menu
{
+ friend class ::LOKTrigger;
+
Link<const OUString&, void> m_aActivateHdl;
protected: