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
_refIdParameter of INT type (required for global handler).
XXXName of the reference variable connected to graphic object (without the character "_").
_mouseBtnInput parameter of INT type - determines the pressed mouse button.
_dblClickParameter of BOOL type.
  • @TRUE - event is generated by double-clicking the graphic object of the Browser type
  • @FALSE - event is generated by clicking the graphic object of the Browser type
_rowRow of the item above which the event was executed.
_colColumn of the item above which the event was executed.
_bShiftAttribute of the SHIFT key state when the mouse button is pressed.
_bCtrlAttribute of the CTRL key state when the mouse button is pressed.
_bButtonAttribute 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
_bDoDefaultAllows 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:
 
_mouseBtnMouse button
1Left
2Middle
3Right
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.

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .