|
GLG Toolkit, JavaScript Library
Version 4.6
|
A custom setup handler used to implement custom object processing logic. More...
A custom setup handler used to implement custom object processing logic.
A custom setup handler can be installed via SetCustomSetupHandler. Use CreateCustomSetupHandler to create a custom setup handler.
See ProcessObject for details of object processing.
Public Member Functions | |
| void | ProcessObject (GlgObject object, GlgCustomSetupType type) |
| This method implements custom object processing logic and is invoked for objects tagged using the CustomSetup flag in the GLG drawing. More... | |
Static Public Member Functions | |
| static GlgHandler | CreateCustomSetupHandler (function handler_func) |
| Constructor. More... | |
|
static |
Constructor.
Creates an custom setup handler that can be used as a parameter of SetCustomSetupHandler. The static method is invoked on the GLG Toolkit handle obtained via a 'new GlgToolkit()' call at the application start-up.
| handler_func | A custom setup handler function that implements the handler's logic. The function's type signature must match the type signature of the ProcessObject method. |
| void ProcessObject | ( | GlgObject | object, |
| GlgCustomSetupType | type | ||
| ) |
This method implements custom object processing logic and is invoked for objects tagged using the CustomSetup flag in the GLG drawing.
The custom setup may be used to automate object data tags assignment based on the object ID, or to attach Input and Trace callbacks to objects representing custom widgets that handle user interaction.
The DEMOS_HTML/SCADAViewer directory of the GLG installation contains an elaborate example of an application framework that uses a custom setup handler to process special custom widgets.
| object | A tagged object to be processed. |
| type | Indicates when the method is invoked:
|
The execution order of the custom setup callback relative to the hierarchy callback of the containing object depends on the invocation type: