78db0dcfb6
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>
26 lines
No EOL
1.8 KiB
XML
26 lines
No EOL
1.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="__License" script:language="StarBasic" script:moduleType="normal">
|
|
''' Copyright 2019-2022 Jean-Pierre LEDURE, Rafael LIMA, Alain ROMEDENNE
|
|
|
|
REM =======================================================================================================================
|
|
REM === The ScriptForge library and its associated libraries are part of the LibreOffice project. ===
|
|
REM === The SFWidgets library is one of the associated libraries. ===
|
|
REM === Full documentation is available on https://help.libreoffice.org/ ===
|
|
REM =======================================================================================================================
|
|
|
|
''' ScriptForge is distributed in the hope that it will be useful,
|
|
''' but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
''' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
''' ScriptForge is free software; you can redistribute it and/or modify it under the terms of either (at your option):
|
|
|
|
''' 1) The Mozilla Public License, v. 2.0. If a copy of the MPL was not
|
|
''' distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/ .
|
|
|
|
''' 2) The GNU Lesser General Public License as published by
|
|
''' the Free Software Foundation, either version 3 of the License, or
|
|
''' (at your option) any later version. If a copy of the LGPL was not
|
|
''' distributed with this file, see http://www.gnu.org/licenses/ .
|
|
|
|
</script:module> |