Gadget Core Support
- Last UpdatedOct 30, 2024
- 1 minute read
PML defined forms may now have a mixture of PML managed and core code managed gadgets.
A new gadget qualifier attribute ‘control type’, with values PML or CORE has been introduced.
The following gadgets can be declared to be CORE controlled or PML controlled during their definition:
-
BUTTON
-
TEXTIN
-
TOGGLE
-
PARAGRAPH (doesn’t have a callback)
-
TEXTPANE (doesn’t have a callback)
-
FRAME
-
LIST (single, multi and option)
-
SELECTOR (single, multi)
Alpha and Graphical view gadgets are not candidates for this mechanism.
These gadgets' definition graphs now support the ‘CORE’ qualifier:
.-------<---.
/ |
<gadget>--+-- tagtext --| gadget tag
| |
+-- <fgpos> --| gadget position
| |
+-- CORE -----| Core managed gadget
| |
.
.
.
When a form is first displayed its gadgets are created. If a gadget is declared as core managed then F&M, builds the DRUID widget, sets its active, visible and selected states, and then calls core code to allow it to take over the gadget callback.
Core code may plug in its own callback function to DRUID so that events on that gadget will go directly to core code and will no longer go to F&M. Core code will then be responsible for managing the gadgets state in conjunction with PML AppWare. For gadgets with no callback, the core code may merely wish to read values from or write to the gadget. You must exercise great care to avoid clashes between AppWare and software management.
TEXTPANE and PARAGRAPH gadgets do not have a callback.