Drag[en]gine Script Module DragonScript  1.21
Dragengine.Gui.ParentWheelActionListener Class Reference

Send mouse wheel events to parent of source widget. More...

Inheritance diagram for Dragengine.Gui.ParentWheelActionListener:
Dragengine.Gui.Events.DefaultMouseListener Dragengine.Gui.Events.MouseListener

Public Member Functions

Container getParent ()
 Parent widget to send events to. More...
 
ParentWheelActionListener new ()
 Create mouse listener. More...
 
ParentWheelActionListener new (Container parent)
 Create mouse listener sending wheel event to container. More...
 
void onMouseWheel (MouseEvent event)
 Mouse wheel has moved. More...
 
void setParent (Container parent)
 Set parent widget to send events to. More...
 
- Public Member Functions inherited from Dragengine.Gui.Events.DefaultMouseListener
void onButtonPress (MouseEvent event)
 Mouse button has been pressed. More...
 
void onButtonRelease (MouseEvent event)
 Mouse button has been released. More...
 
void onMouseEnter (MouseEvent event)
 Mouse has entered widget. More...
 
void onMouseLeave (MouseEvent event)
 Mouse has left widget. More...
 
void onMouseMove (MouseEvent event)
 Mouse has moved. More...
 

Detailed Description

Send mouse wheel events to parent of source widget.

Adding mouse listeners to widgets prevents events being send to the parent. If you just want to react to a mouse click this also prevents mouse wheel events from being send to the parent. Add also this listener to rectify

Member Function Documentation

◆ getParent()

Container Dragengine.Gui.ParentWheelActionListener.getParent ( )

Parent widget to send events to.

Version
1.9

◆ new() [1/2]

ParentWheelActionListener Dragengine.Gui.ParentWheelActionListener.new ( )

Create mouse listener.

Deprecated:
Use new(Container) otherwise event loops can happen if event source is a child widget of the widget this listener is added to.

Reimplemented from Dragengine.Gui.Events.DefaultMouseListener.

◆ new() [2/2]

ParentWheelActionListener Dragengine.Gui.ParentWheelActionListener.new ( Container  parent)

Create mouse listener sending wheel event to container.

Version
1.9
Exceptions
ENullPointerparent is null.

◆ onMouseWheel()

void Dragengine.Gui.ParentWheelActionListener.onMouseWheel ( MouseEvent  event)

Mouse wheel has moved.

Reimplemented from Dragengine.Gui.Events.DefaultMouseListener.

◆ setParent()

void Dragengine.Gui.ParentWheelActionListener.setParent ( Container  parent)

Set parent widget to send events to.

Version
1.9
Exceptions
ENullPointerparent is null.

The documentation for this class was generated from the following file: