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").

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com