summaryrefslogtreecommitdiff
path: root/scp2
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-10-15 13:53:05 +0200
committerJean-Pierre Ledure <jp@ledure.be>2021-10-15 16:39:48 +0200
commit78db0dcfb6f5a8d5baa2daae7e17733d4c7c0a0c (patch)
treec127387f4121746aa10b89c2654c9aad837fc187 /scp2
parent463d261e3509cc857e248d8bd5787a45d385a646 (diff)
ScriptForge - new SFWidgets library, new PopupMenu service
The SFWidgets library is intended to host the Toolbar, ToolbarControl (both future) and PopupMenu services. A popup menu is usually triggered by a mouse action (typically a right-click) on a dialog, a form, or one of their controls. In these cases the menu will be displayed below the clicked area. When triggered by other events, including in the normal flow of a user script, the script should provide the coordinates of the topleft edge of the menu versus the actual component. The menu is described from top to bottom with next methods: AddItem() AddCheckBox() AddRadioButton() Example: .AddCheckBox("View>Toolbars>Dialog") .AddCheckBox("View>Toolbars>Find", Status := True) .AddCheckBox("View>Status Bar", Status := True) .AddItem("View>Full Screen", Name := "FULLSCREEN") The SubmenuCharacter (Default = ">") is modifiable. Each menu item receives a numeric and a string identifier. The execute() method returns the item selected by the user. The service is available both from Basic and Python user scripts. The commit includes the review of build files to include the new library and the new modules. Change-Id: I2940be25313cc8fff7b337766edd348b04a20584 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123654 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'scp2')
-rw-r--r--scp2/source/ooo/directory_ooo.scp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scp2/source/ooo/directory_ooo.scp b/scp2/source/ooo/directory_ooo.scp
index 1b8243e74979..66c895575a7f 100644
--- a/scp2/source/ooo/directory_ooo.scp
+++ b/scp2/source/ooo/directory_ooo.scp
@@ -285,6 +285,11 @@ Directory gid_Dir_Basic_SFDocuments
DosName = "SFDocuments";
End
+Directory gid_Dir_Basic_SFWidgets
+ ParentID = gid_Dir_Basic;
+ DosName = "SFWidgets";
+End
+
Directory gid_Dir_Basic_Importwiz
ParentID = gid_Dir_Basic;
DosName = "ImportWizard";