Click Handler Functions
Abstract
Used to specify custom behavior for an application's response when a user left-clicks, middle-clicks, or double-clicks an object.
Syntax
Click Handler Function Name (obj_handle, click_type)
| Argument | Type | Description |
|---|---|---|
obj_handle |
EtsT_Obj_Handle |
Handle to the object that was clicked. |
click_type |
EtsT_Obj_Click_Type |
The type of click that occurred, as indicated by one of the following constants: - EtsC_Obj_Click_Type_Left- EtsC_Obj_Click_Type_Right- EtsC_Obj_Click_Type_Middle- EtsC_Obj_Click_Type_Double |
Return Type
EtsT_Obj_Click_Return
One of the following constants:
EtsC_Obj_Click_Continue—indicates that the application should continue handling the click.EtsC_Obj_Click_Handled—indicates that the click has been handled and the application should not do any further processing.
Details
The click handler functions allow a model developer to intercept a click and either replace or add to the ODK application's handling of it. If a click handler function is specified for an object, the application calls that function when the user left-clicks, middle-clicks, or double-clicks that object. (Right-clicks are passed to the menu display handler, if one is specified.)
Note: If an object is double-clicked, two events will be sent: a left-click event followed by a double-click event.
If the click handler returns EtsC_Obj_Click_Continue, the ODK application continues processing the click in the normal manner. If the function returns EtsC_Obj_Click_Handled, the application stops processing the click event (the click has effectively been "consumed").