Aw toolbar click
Minimum requirements | ||
---|---|---|
Added in version 3.5 | ||
SDK | build 37 | |
World | build 63 |
int aw_toolbar_click (void)
Description
Simulates clicking on a toolbar button.
Callback
None (returns immediately)
Notes
This method triggers AW_EVENT_TOOLBAR_CLICK in all the neighbor SDK applications that have subscribed to the event. It is intended for use by the Active Worlds Browser to indicate when a user clicks on an "sdk event" toolbar button. However it is also available for use by SDK applications which may wish to simulate toolbar button actions for the purposes of testing.
Arguments
None
Argument attributes
- AW_TOOLBAR_ID
- Id of toolbar button that was clicked.
Return values
- RC_SUCCESS
- RC_NOT_INITIALIZED
- RC_NO_INSTANCE
- RC_NO_CONNECTION
- The connection to the world is down.
Returned attributes
None
Usage
Simulate toolbar #10 click.
void handle_toolbar_click (void) { printf ("Session #%d clicked toolbar #%d\n", aw_int (AW_TOOLBAR_SESSION), aw_int (AW_TOOLBAR_ID)); } aw_event_set (AW_EVENT_TOOLBAR_CLICK, handle_toolbar_click); aw_int_set (AW_TOOLBAR_ID, 10); aw_toolbar_click ();