Zebra API Doc

zebra.ui.MouseEvent Class

Mouse and touch screen input event class. The input event is triggered by a mouse or touch screen. It has UID property set to zebra.ui.InputEvent.MOUSE_UID value

Constructor

zebra.ui.MouseEvent

(
  • target
  • id
  • ax
  • ax
  • mask
  • clicks
)

Parameters:

  • target zebra.ui.Panel

    a source of the mouse input event

  • id Integer

    an unique ID of the mouse input event:

       zebra.ui.MouseEvent.CLICKED    
       zebra.ui.MouseEvent.PRESSED    
       zebra.ui.MouseEvent.RELEASED   
       zebra.ui.MouseEvent.ENTERED    
       zebra.ui.MouseEvent.EXITED     
       zebra.ui.MouseEvent.DRAGGED    
       zebra.ui.MouseEvent.DRAGSTARTED
       zebra.ui.MouseEvent.DRAGENDED  
       zebra.ui.MouseEvent.MOVED
  • ax Integer

    an absolute (relatively to a canvas where the source UI component is hosted) mouse pointer x coordinate

  • ax Integer

    an absolute (relatively to a canvas where the source UI component is hosted) mouse pointer y coordinate

  • mask Integer

    a bits mask of pressed mouse buttons:

        zebra.ui.MouseEvent.LEFT_BUTTON
        zebra.ui.MouseEvent.RIGHT_BUTTON
  • clicks Integer

    number of mouse button clicks

Item Index

Methods

Methods

reset

(
  • target
  • id
  • ax
  • ay
  • mask
  • clicks
)
private

Reset the event properties with new values

Parameters:

  • target zebra.ui.Panel

    a target component that triggers the event

  • id Integer

    an unique id of the event

  • ax Integer

    an absolute (relatively to a canvas where the target component is hosted) x mouse cursor coordinate

  • ay Integer

    an absolute (relatively to a canvas where the target component is hosted) y mouse cursor coordinate

  • mask Integer

    a pressed mouse buttons mask

  • clicks Integer

    number of a button clicks

Attributes

absX

Integer readonly

Absolute mouse pointer x coordinate

absY

Integer readonly

Absolute mouse pointer y coordinate

clicks

Integer readonly

Number of times a mouse button has been pressed

ID

Integer readonly

Inherited from zebra.ui.InputEvent:

Unique id of the input event

mask

Integer readonly

A bits mask of a pressed mouse button

source

zebra.ui.Panel readonly

Inherited from zebra.ui.InputEvent:

Source of the input event

touchCounter

Integer readonly

Number of fingers on a touch screen

UID

Integer readonly

Inherited from zebra.ui.InputEvent:

Class id of the input event. It helps to differentiates input events by a device it has been generated

x

Integer readonly

Mouse pointer x coordinate (relatively to source UI component)

y

Integer readonly

Mouse pointer y coordinate (relatively to source UI component)