Thanks @Leo, for these answers. My version is 13.6.11.0.8930, which I forgot to mention. I am working on a desktop, Windows Pro 23H2, Build 22631.3737.
You asked me to let you know about cases. Upon further experimentation, the situation seems unfortunately to be rather more complicated, so I have tried to cover all cases. I have typed all problems in boldface, and I hope that it is constructive for you.
Item 1. Ctrl+S to save the current edits. This does need to be implemented, for safety, for convenience, and for consistency with almost all other Windows programs. For mouse devotees, a corresponding button (plus hotkey) could also be added to the button editor.
Items 2&3 (A): I launch several programs, including two instances A and B of DOpus. Then in instance A, I open for editing a BUTTON ON A TOOLBAR, and make a small change in the text.
- The editor screen remains on top of DOpus A, but not on top of DOpus B or the other programs or 'Customise'.
— The expanded menu also stays on top of everything, which is a real nuisance when the menu is long and in the middle of the screen, and you are working on the button and Alt+Tabbing to other windows.
- When I press Cancel on the editor screen, or close it by clicking X, it does indeed prompt for confirmation.
- When I instead close the DOpus A Window by clicking on X, the editing window disappears without saving the change.
- When instead I close the DOpus B window, nothing else happens.
- When instead I close the 'Customise' window with OK or by clicking the X, the button editor closes with no confirmation message, and the change is saved.
- When instead I close the 'Customise' window with Cancel, the button editor closes, there is no confirmation message, and the change is not saved.
I have two types of floating DOpus toolbars:
- Internally launched floating toolbars, launched via a DOpus global hotkey by a command such as
Toolbar @Recalculate State=FloatActive Toggle AutoClose
- Externally launched floating toolbars, launched via AutoHotkey by a command such as
DOpusrt.exe /Cmd Toolbar @LaunchX
All these hotkeys have a hotkey Ctrl+Shift+Letter, which of course interferes with the pressing of the Shift key to run a command in Customise mode.
Items 2&3 (B): Again I launch several programs, including DOpus. But this time I open for editing a button on an INTERNALLY LAUNCHED FLOATING TOOLBAR, and make a small change in the text.
- The editor screen now remains on top of every other window, including the DOpus window.
— The toolbar also remains on top of everything except the edit window, which is also a nuisance — and the toolbar cannot be moved.
- When I press Cancel on the editor screen, or close it by clicking X, again it prompts for confirmation.
- When I instead close the toolbar (it has a 'close toolbar' button), the edit window closes without confirmation and does not save the change.
- As before, when I instead close the 'Customise' window with OK or by clicking the X, the button editor closes with no confirmation message, and the change is saved.
- As before, when I instead close the 'Customise' window with Cancel, the button editor closes, there is no confirmation message, and the change is not saved.
- With the editor window open, I can open, use, and close an externally launched toolbar, and the edit window stays open.
— But I cannot open another internally launched toolbar. Perhaps because of the 'Shift' in its hotkey?
Items 2&3 (C): Again I launch several programs, including DOpus. But this time I open for editing a button on an EXTERNALLY LAUNCHED FLOATING TOOLBAR, and make a small change in the text.
- The editor screen now remains on top of every other window, including the DOpus window.
— The toolbar also remains immovable on top of everything except the edit window, which is also a nuisance.
- When I press Cancel on the editor screen, or close it by clicking X, again it prompts for confirmation.
- As before, when I instead close the 'Customise' window with OK or by clicking the X, the button editor closes with no confirmation message, and the change is saved.
- As before, when I instead close the 'Customise' window with Cancel , the button editor closes, there is no confirmation message, and the change is not saved.
- With the editor window open, I can open, use, and close an internally or externally launched toolbar, and the edit window stays open.
— With the exception of the toolbar containing the button that I am editing. When I press that hotkey, the edit windows closes without saving. This phenomenon was the occasion of my original post.
By the way, the confirmation dialogue asking 'The function has been modified — discard changes?', with its two buttons 'Yes' and 'No', should really have a third button 'Cancel'. Pressing 'Escape' does this, but having 'Cancel' would be more intuitive.