Shiny Language Reference
Language Reference > Handler Reference
PreDisplayConfig
Called before the plugin configuration window is shown
When the user double-clicks the plugin in the Brass main window, or selects "Configure" from the plugin's tray menu, this handler is called. At this point the configuration dialog has not been created, therefore you can manipulate any of the panel functions knowing that the changes you make will be reflected in the dialog.
You may also control what elements of the configuration dialog are enabled by using the setflags statement. Refer to the Available Flags section for details. It is best practice to call setflags as the last statement in the PreDisplayConfig handler.
Note that although the user can access the configuration dialog by double-clicking the plugin in the Brass "Available Plugins" window, this handler is only called when the plugin is loaded and active. This is because Brass maintains the standard configuration for all plugins and only notifies them when they are loaded (this allows the "offline configuration" of an unloaded plugin to work).
The handler call order is as follows:
PreDisplayConfig -> DisplayConfigOK or DisplayConfigCancel -> PostDisplayConfig
Available Flags
Brass accepts the following flags returned by the PreDisplayConfig handler. You may use these flags to control what parts of the config dialog are enabled or disabled. It is optional to call setflags, and it is optional to specify all, some or none of the following flags. If a flag is not specifically specified as disabled it is implicitly assumed to be enabled. If setflags is not called at all, all flags are assumed to be implicitly enabled. Multiple flags may be specified. Each flag must be terminated with a semi-colon (";"), including when only one flag is specified. The last flag specified must also be terminated with a semi-colon, or it will be ignored. See below for examples.bgcolour,[enable/disable]
Controls whether the transparent and solid background options are enabled.
bgbitmap,[enable/disable]
Controls whether the background bitmap options are enabled.
paneltransp,[enable/disable]
Controls whether the "Transparent window" options are enabled.
drag,[enable/disable]
Controls whether the "Show panel drag bar" option is enabled
resize,[enable/disable]
Controls whether the "Show panel resize handle" option is enabled
hotkey,[enable/disable]
Controls whether the "Enable global hotkey" option is enabled
Examples of use:
// Disable the panel transparency option only
setflags("paneltransp, disable;");
// Disable the background bitmap options and the resize handle option
setflags("bgbitmap,disable; resize, disable;");
Parameters
None