OnMouseDown picture event


Declaration
Global handler:
 ENTRY OnMouseDown(IN INT _refId, IN INT _btnNr, IN BOOL _shift, IN INT _X, IN INT _Y)
 ; script actions
 END OnMouseDown

Special handler:
ENTRY XXX_OnMouseDown(IN INT _btnNr, IN BOOL _shift, IN INT _X, IN INT _Y)
;  script actions
 END XXX_OnMouseDown

Parameters
_refId Parameter of INT type (required for global handler).
XXX Name of Reference variable connected to graphic object (without the character "_").
_btnNr Parameter of BOOL type, that determines the pressed mouse button.
_shift Parameter of BOOL type.
_Y Parameter of INT type.
_Y Parameter of INT type.

Description
The picture event is being generated after pressing the mouse button (button down) above the picture. The parameter _shift determines whether the SHIFT key were pressed along with the mouse button. The parameters _X and _Y determines position of mouse pointer.
The parameter _btnNr identifies the pressed mouse button according to the following table:
 
_btnNr Mouse button
1 Left
2 Middle
3 Right

The parameter _refId is used for graphic objects with defined Reference variable other than 0. So it is possible to use the special event handler. For the graphic object with no defined Reference variable, it is required to use the global event handler and the parameter _refId will be 0. Also when the user press the mouse button above the picture (not above graphic object).


Note
This entry mostly performs before selection some item. Only pressing the right-mouse button over the windows control of Tree type is exception. Then the selection of tree item will make before this entry which can refer to the new selection. The meaning of this exception is in compatibility in behaviour in old version which did not get the entry OnMouseUp after the right-mouse button had been released over the Tree windows control.
Example
Special picture event handler:
 
ENTRY TV_OnMouseDown(IN  INT _btnNr, IN  BOOL _bShift, IN  INT _xPos, IN  INT _yPos)
 END TV_OnMouseDown

 
Global picture event handler:
 
ENTRY OnMouseDown(IN  INT _refId, IN  INT _btnNr, IN  BOOL _bShift, IN  INT _xPos,   IN   INT _yPos)
 END OnMouseDown
 

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ť .