Files
loongoffice/wizards/source/sfwidgets/script.xlb
Jean-Pierre Ledure 8a4ee0fb39 ScriptForge (SFWidgets) new ContextMenu service
Complete a predefined context menu with new items
placed at its bottom.

A context menu is obtained by a right-click
on several areas of a document. Each area has
its own context menu.
Each component model has its own set of context menus.

A context menu is usually predefined at
LibreOffice installation. Customization is done
statically with the Tools + Customize dialog.
The actual new service provides a mean
to make temporary additions at the bottom of a
context menu. Those changes are lost when
the document is closed.

The name of a context menu is the last component
of the resource URL:
   "private:resource/popupmenu/the-name-here"

Context menu items are either usual items or
line separators. Checkboxes or radio buttons
are not supported.
Items run a command or a script when clicked.

The service implements 2 methods:
   AddItem() adds an entry in the menu hierarchy
   Activate() shows or hides the added entries

A context menu can be defined from both Basic
and Python user scripts.

An update of the documentation is required.

Change-Id: Id77f1f2565d75e36c09b13972330d0f83b3f1db4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172355
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
2024-08-24 18:29:12 +02:00

12 lines
688 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
<library:library xmlns:library="http://openoffice.org/2000/library" library:name="SFWidgets" library:readonly="false" library:passwordprotected="false">
<library:element library:name="__License"/>
<library:element library:name="SF_Register"/>
<library:element library:name="SF_PopupMenu"/>
<library:element library:name="SF_Menu"/>
<library:element library:name="SF_MenuListener"/>
<library:element library:name="SF_Toolbar"/>
<library:element library:name="SF_ToolbarButton"/>
<library:element library:name="SF_ContextMenu"/>
</library:library>