Processes events for XML-loaded controls and returns the event handler function name to call.
Takes collectionID (Int).
Returns value storage.
BGI GUI
Parameters & Returns
Parameters
collectionIDInt
Returns
String
Quick Summary
Processes events for XML-loaded controls and returns the event handler function name to call.
Takes collectionID (Int).
Returns value storage.
Technical Exegesis...
Processes events for XML-loaded controls and returns the event handler function name to call. Uses static string handlerName for return value storage. Searches gizmoCollections map for collectionID. If collection not found, returns empty string "". Calls bgiGetEventMessage() to get current event type. If no event (msg == 0), returns empty string. Calls bgiGetEventSource() to get source control handle.
Processes events for XML-loaded controls and returns the event handler function name to call. Uses static string handlerName for return value storage. Searches gizmoCollections map for collectionID. If collection not found, returns empty string "". Calls bgiGetEventMessage() to get current event type. If no event (msg == 0), returns empty string. Calls bgiGetEventSource() to get source control handle. For BGI_EVENT_COMMAND_CLOSE (window close), searches collection for matching handle with non-empty onClose attribute, returns onClose handler name. For BGI_EVENT_COMMAND_CLICK (button/control click), searches collection for matching handle with non-empty onClick attribute, returns onClick handler name. For BGI_EVENT_COMMAND_UPDATE (change/select events), calls bgiGetEventID() to determine control type. For ListBox/TabControl/ListView (BGI_EVENT_ID_LIST/TABCONTROL/LISTVIEW), returns onSelect handler if present. For other controls (TextBox/Trackbar/Spinner/etc.), returns onChange handler if present. Returns handler name as string, or empty string "" if no handler registered or event not found.
This function implements event dispatching for XML-based GUIs. Returns handler function name as string - caller must implement function dispatch logic (GOSUB, function call, or lookup table). Static string ensures returned pointer remains valid after function returns. Event matching uses handle comparison (source == entry.handle). Handler priority for UPDATE events: onSelect for selection controls (lists/tabs), onChange for value controls (textbox/trackbar). Empty string return indicates no handler registered or no current event. Does NOT call handlers automatically - just identifies which handler to call. Common pattern: poll in main loop, if result non-empty, use SELECT/CASE or function lookup to call appropriate handler subroutine. Handler functions receive no direct parameters - use bgiGetEventSource/bgiGetEventData to query event details. onClick fires for buttons, menu items, links. onChange fires for textboxes, trackbars, spinners when value changes. onSelect fires for listboxes, comboboxes, tabcontrols, listviews when selection changes. onClose fires when dialog window is closed. Multiple controls can share the same handler name.