Iyonix Select Acorn RISCOS 4 Home About Toolbox Examples Maillist Downloads
AppBasic

Toolbar


General
ResEd
Objects
Components
Events
Methods
Modules

Toolbox events

Toolbox events are essentially an abstraction on Wimp events and are much easier to “handle”. They are generated by the Toolbox modules in response to user interaction with Toolbox objects, and also in response to client application operations. Toolbox events are also used to warn the client application that a particular action has been taken by the Toolbox.

Event ids

Each Toolbox event has its own event code, which is a 32-bit integer defined in a similar manner to Wimp message numbers. For example,
Menu_Selection=&828C3
is the (default) event generated when a Toolbox menu-entry is selected.

Event handlers

For an AppBasic application, all Toolbox events call the event-handling procedure
PROCDealWith_ToolboxEvent(event,object,component)
where the arguments have the meanings
event The id of the event which has occurred
object The id of the object where the event has occurred ('0' means no object)
component The id of the component where the event has occurred ('-1' means no component)
If the event has originated in an object belonging to one of the standard classes then the corresponding class handler is also called. E.g. all events associated with a Menu object, call the event handler
PROCDealWith_Menu(event,object,component)