OnBrowserClick

OnBrowserClick

OnBrowserClick picture event


Declaration

Global handler:

ENTRY OnBrowserClick(IN INT _refId, IN INT _mouseBtn, IN BOOL _dblClick, IN INT _row, IN INT _col, IN BOOL _bShift, IN BOOL _bCTRL[, IN BOOL _bButton[, BOOL _bDoDefault]]) ; script actions END OnBrowserClick


Special handler:

ENTRY XXX_OnBrowserClick(IN INT _mouseBtn, IN BOOL _dblClick, IN INT _row, IN INT _col, IN BOOL _bShift, IN BOOL _bCtrl[, IN BOOL _bButton[, BOOL _bDoDefault]]) ; script actions END XXX_OnBrowserClick

Parameters

_refId

Parameter of INT type (required for global handler).

XXX

Name of the reference variable connected to graphic object (without the character "_").

_mouseBtn

Input parameter of INT type - determines the pressed mouse button.

_dblClick

Parameter of BOOL type.

  • @TRUE - event is generated by double-clicking the graphic object of Browser type

  • @FALSE - event is generated by clicking the graphic object of Browser type

_row

Row of the item above which the event was executed.

_col

Column of the item above which the event was executed.

_bShift

Attribute of the SHIFT key state when the mouse button is pressed.

_bCtrl

Attribute of the CTRL key state when the mouse button is pressed.

_bButton

Attribute that indicates whether the user clicked the button in given item or not (for the items with the parameter Display set to the Text+Button type). Possible values:

  • @TRUE - the user clicked the button in item

  • @FALSE - the user didn't click the button in item

_bDoDefault

Allows to control the default behaviour of the browser after clicking the right mouse button. Possible values:

  • @TRUE - opens the popup menu

  • @FALSE - doesn't open the popup menu

The default value of the parameter is @TRUE.

Description

The picture event is being generated by the defined displayer of Browser type, when the user click an item of the browser. The item is identified by its row (the parameter _row) and its column (the parameter _col).
The parameter _btnNr identifies the pressed mouse button according to the following table:
 

_mouseBtn

Mouse button

1

Left

2

Middle

3

Right

Example

Special picture event handler:

 

ENTRY brw1_OnBrowserClick(IN INT _mouseBtn, IN BOOL _dblClick, IN INT _row, IN INT _col, IN BOOL _bShift, IN BOOL _bCtrl) %HI_AddItem(_lst, "brw1_OnBrowserClick") %HI_AddItem(_lst, " _mouseBtn = " + %IToStr(_mouseBtn)) IF _dblClick THEN %HI_AddItem(_lst, " _dblClick = TRUE") ELSE %HI_AddItem(_lst, " _dblClick = FALSE") ENDIF %HI_AddItem(_lst, " _row = " + %IToStr(_row)) %HI_AddItem(_lst, " _col = " + %IToStr(_col)) IF _bShift THEN %HI_AddItem(_lst, " _bShift = TRUE") ELSE %HI_AddItem(_lst, " _bShift = FALSE") ENDIF IF _bCtrl THEN %HI_AddItem(_lst, " _bCtrl = TRUE") ELSE %HI_AddItem(_lst, " _bCtrl = FALSE") ENDIF END brw1_OnBrowserClick

Note

If both the handlers are defined in picture script, the global handler will never be called for _refId=_brw1, because a special handler is already defined.