Introduction and Overview
The Window module has been extended with Window 1.85 to track the focus of gadgets and to list the gadgets known to the system.
Technical Details
Changes with Window 1.85
Focus tracking
In order to allow the tracking of the focus the Window module will now issue a new event, Window_GadgetLostFocus when the focus moves from a gadget. This facility is necessary for the implementation of the new Number Range input mechanism.
Window_GadgetLostFocus is toolbox event &82891. The event does not contain any data except the toolbox header.
#define Window_GadgetLostFocus (Window_SWIChunkBase + 17)
typedef struct
{
ToolboxEventHeader hdr;
} WindowGadgetLostFocusEvent;
It may be necessary for external gadgets losing the focus to issue this event should they lose the focus. Gadgets which are provided entirely through Wimp icons within the parent Window should be automatically tracked by the Window module and the necessary event raised. Gadgets which are provided through nested windows will need to issue the event when the focus is lost (as indicated by Wimp Event Caret Lost). Gadgets which are not provided through nested windows or through icons may need to detect the focus being lost in some other manner.
Failure by external Gadgets to issue this message may prevent applications from detecting focus loss from their gadgets. It is not expected that the Window or other Toolbox modules will suffer from this lack at this time.
Gadget information
For the benefit of gadget developers it is now possible to list the gadgets currently known to the system through the command *Window_Gadgets. This will list the gadget identifiers, together with their size, as registered with the Window module.
Toolbox Events
Commands
Lists the gadget identifiers, together with their size, as registered with the Window module.