summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-05-05 18:01:10 +0200
committerJean-Pierre Ledure <jp@ledure.be>2021-05-06 14:46:19 +0200
commit53230b495407ea7e26cd3c01509bc773dad0bc7a (patch)
treeb4ca98512ebfd2c3b6f15ccfc10e2b4cdae69a21
parent645cb7eda4fbe83ed748aafa41d210db274e22fc (diff)
ScriptForge - (scriptforge.py)Non-modal dialogs and OK/Cancel buttons
In the SFDialogs.SF_Dialog class: - Fix the comments describing the behaviour of non-modal dialogs - Add the OKBUTTON and CANCELBUTTON definitions Change-Id: I2d3abc1c610b0c60949987feb1a9d66e21abfdc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115152 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
-rw-r--r--wizards/source/scriptforge/python/scriptforge.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/wizards/source/scriptforge/python/scriptforge.py b/wizards/source/scriptforge/python/scriptforge.py
index 767cb9ae60ae..048caf97d2e5 100644
--- a/wizards/source/scriptforge/python/scriptforge.py
+++ b/wizards/source/scriptforge/python/scriptforge.py
@@ -1521,10 +1521,15 @@ class SFDialogs:
class SF_Dialog(SFServices):
"""
Each instance of the current class represents a single dialog box displayed to the user.
- From a Python script, a dialog box can be displayed in modal mode only.
+ The dialog box must have been designed and defined with the Basic IDE previously.
+ From a Python script, a dialog box can be displayed in modal or in non-modal modes.
+
In modal mode, the box is displayed and the execution of the macro process is suspended
until one of the OK or Cancel buttons is pressed. In the meantime, other user actions
executed on the box can trigger specific actions.
+
+ In non-modal mode, the floating dialog remains displayed until the dialog is terminated
+ by code (Terminate()) or until the LibreOffice application stops.
"""
# Mandatory class properties for service registration
serviceimplementation = 'basic'
@@ -1536,6 +1541,8 @@ class SFDialogs:
OnMouseExited = False, OnMouseMoved = False, OnMousePressed = False,
OnMouseReleased = False,
Page = True, Visible = True, Width = True, XDialogModel = False, XDialogView = False)
+ # Class constants used together with the Execute() method
+ OKBUTTON, CANCELBUTTON = 1, 0
@classmethod
def PreProcessArgs(cls, args):