summaryrefslogtreecommitdiff
path: root/wizards/Package_sfwidgets.mk
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-12-03 12:18:17 +0100
committerJean-Pierre Ledure <jp@ledure.be>2021-12-03 15:24:57 +0100
commit88c82f10280a3de773091ddc41983c6d2f8ee157 (patch)
treec4f445c29b967e63cb92f4fdb125c00b3cb7fe57 /wizards/Package_sfwidgets.mk
parent4321fb516f4a65b047b182c4cb6f9c9a232efd85 (diff)
ScriptForge - (SFWidgets) new SF_Menu service
Display a menu in the menubar of a document (form document to be done) After use, the menu will not be saved neither in the application settings, nor in the document. The menu setting does not affect the modified status of the document. The menu will be displayed, as usual, when its header in the menubar is clicked. When one of its items is selected, there are 3 alternative options: - a UNO command (like ".uno:About") is triggered - a user script is run receiving a standard argument defined in this service - one of above combined with a toggle of the status of the item The menu is described from top to bottom. Each menu item receives a numeric and a string identifier. Each menu item may be decorated with a tooltip and/or an icon. The AddItem(), AddCheckBox() and AddRadioButton() methods, when coompared with their equivalents in the SF_PopupMenu service, receive 2 additional arguments: Command and Script. The various document services receive 2 additional methods: CreateMenu(), returning a Menu service instance RemoveMenu() Very short example: menu = doc.CreateMenu("My menu", Before := "Help") menu.AddItem("First Item", Command := "About") menu.AddItem('2nd Item", Script := "... URI notation ...") menu.Dispose() ' Once set the menu object may ve erased, listeners stay tuned Later in the lifecycle of the document, one may run: doc.RemoveMenu("My menu") ' doc.RemoveMenu("File") works as well !!! All the functionalities are available both in Basic and Python user scripts. Change-Id: Iabd157573693e9648fcb06d36c90af9a22b17a6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126309 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards/Package_sfwidgets.mk')
-rw-r--r--wizards/Package_sfwidgets.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/wizards/Package_sfwidgets.mk b/wizards/Package_sfwidgets.mk
index f89b83e58d5b..3e2041a5f810 100644
--- a/wizards/Package_sfwidgets.mk
+++ b/wizards/Package_sfwidgets.mk
@@ -20,6 +20,8 @@
$(eval $(call gb_Package_Package,wizards_basicsrvsfwidgets,$(SRCDIR)/wizards/source/sfwidgets))
$(eval $(call gb_Package_add_files,wizards_basicsrvsfwidgets,$(LIBO_SHARE_FOLDER)/basic/SFWidgets,\
+ SF_Menu.xba \
+ SF_MenuListener.xba \
SF_PopupMenu.xba \
SF_Register.xba \
__License.xba \