FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::IMouseListener Class Referenceabstract

Listener of mouse events. More...

#include <imouselistener.h>

+ Inheritance diagram for FIFE::IMouseListener:
+ Collaboration diagram for FIFE::IMouseListener:

Public Member Functions

virtual void mouseEntered (MouseEvent &evt)=0
 Called when the mouse has entered into the event source area. More...
 
virtual void mouseExited (MouseEvent &evt)=0
 Called when the mouse has exited the event source area. More...
 
virtual void mousePressed (MouseEvent &evt)=0
 Called when a mouse button has been pressed on the event source area. More...
 
virtual void mouseReleased (MouseEvent &evt)=0
 Called when a mouse button has been released on the event source area. More...
 
virtual void mouseClicked (MouseEvent &evt)=0
 Called when a mouse button is pressed and released (clicked) on the event source area. More...
 
virtual void mouseWheelMovedUp (MouseEvent &evt)=0
 Called when the mouse wheel has moved up on the event source area. More...
 
virtual void mouseWheelMovedDown (MouseEvent &evt)=0
 Called when the mouse wheel has moved down on the event source area. More...
 
virtual void mouseWheelMovedRight (MouseEvent &evt)=0
 Called when the mouse wheel has moved right on the event source area. More...
 
virtual void mouseWheelMovedLeft (MouseEvent &evt)=0
 Called when the mouse wheel has moved left on the event source area. More...
 
virtual void mouseMoved (MouseEvent &evt)=0
 Called when the mouse has moved in the event source area and no mouse button has been pressed. More...
 
virtual void mouseDragged (MouseEvent &evt)=0
 Called when the mouse has moved and the mouse has previously been pressed on the event source. More...
 
virtual bool isGlobalListener () const
 Indicates if this is a global listener Global listener can also receive events that are consumed by widgets / gui. More...
 
virtual void setGlobalListener (bool global)
 Changes the behaviour of the listener to be global or not. More...
 
virtual ~IMouseListener ()
 
- Public Member Functions inherited from FIFE::IListener
virtual bool isActive ()
 Indicates if the listener is active. More...
 
virtual void setActive (bool active)
 Changes the listener status. More...
 
virtual ~IListener ()
 

Protected Member Functions

 IMouseListener ()
 
- Protected Member Functions inherited from FIFE::IListener
 IListener ()
 

Private Attributes

bool m_global
 

Detailed Description

Listener of mouse events.

To be able to listen for mouse events you must make a class which inherits from this class and implements its functions.

Definition at line 45 of file imouselistener.h.

Constructor & Destructor Documentation

◆ ~IMouseListener()

virtual FIFE::IMouseListener::~IMouseListener ( )
inlinevirtual

Definition at line 129 of file imouselistener.h.

◆ IMouseListener()

FIFE::IMouseListener::IMouseListener ( )
inlineprotected

Definition at line 132 of file imouselistener.h.

References m_global.

Member Function Documentation

◆ isGlobalListener()

virtual bool FIFE::IMouseListener::isGlobalListener ( ) const
inlinevirtual

Indicates if this is a global listener Global listener can also receive events that are consumed by widgets / gui.

Default value is false.

Definition at line 121 of file imouselistener.h.

References m_global.

◆ mouseClicked()

virtual void FIFE::IMouseListener::mouseClicked ( MouseEvent evt)
pure virtual

Called when a mouse button is pressed and released (clicked) on the event source area.

Parameters
evtdescribes the event.

◆ mouseDragged()

virtual void FIFE::IMouseListener::mouseDragged ( MouseEvent evt)
pure virtual

Called when the mouse has moved and the mouse has previously been pressed on the event source.

Parameters
evtdescribes the event.

◆ mouseEntered()

virtual void FIFE::IMouseListener::mouseEntered ( MouseEvent evt)
pure virtual

Called when the mouse has entered into the event source area.

Parameters
evtdescribes the event.

◆ mouseExited()

virtual void FIFE::IMouseListener::mouseExited ( MouseEvent evt)
pure virtual

Called when the mouse has exited the event source area.

Parameters
evtdescribes the event.

◆ mouseMoved()

virtual void FIFE::IMouseListener::mouseMoved ( MouseEvent evt)
pure virtual

Called when the mouse has moved in the event source area and no mouse button has been pressed.

Parameters
evtdescribes the event.

◆ mousePressed()

virtual void FIFE::IMouseListener::mousePressed ( MouseEvent evt)
pure virtual

Called when a mouse button has been pressed on the event source area.

NOTE: A mouse press is NOT equal to a mouse click.

Parameters
evtdescribes the event.

◆ mouseReleased()

virtual void FIFE::IMouseListener::mouseReleased ( MouseEvent evt)
pure virtual

Called when a mouse button has been released on the event source area.

Parameters
evtdescribes the event.

◆ mouseWheelMovedDown()

virtual void FIFE::IMouseListener::mouseWheelMovedDown ( MouseEvent evt)
pure virtual

Called when the mouse wheel has moved down on the event source area.

Parameters
evtMouseEvent that describes the event.

◆ mouseWheelMovedLeft()

virtual void FIFE::IMouseListener::mouseWheelMovedLeft ( MouseEvent evt)
pure virtual

Called when the mouse wheel has moved left on the event source area.

Parameters
evtMouseEvent that describes the event.

◆ mouseWheelMovedRight()

virtual void FIFE::IMouseListener::mouseWheelMovedRight ( MouseEvent evt)
pure virtual

Called when the mouse wheel has moved right on the event source area.

Parameters
evtdescribes the event.

◆ mouseWheelMovedUp()

virtual void FIFE::IMouseListener::mouseWheelMovedUp ( MouseEvent evt)
pure virtual

Called when the mouse wheel has moved up on the event source area.

Parameters
evtdescribes the event.

◆ setGlobalListener()

virtual void FIFE::IMouseListener::setGlobalListener ( bool  global)
inlinevirtual

Changes the behaviour of the listener to be global or not.

Global listener can also receive events that are consumed by widgets / gui.

Parameters
globalThe value to change the behaviour of this listener.

Definition at line 127 of file imouselistener.h.

References m_global.

Member Data Documentation

◆ m_global

bool FIFE::IMouseListener::m_global
private

Definition at line 135 of file imouselistener.h.

Referenced by IMouseListener(), isGlobalListener(), and setGlobalListener().


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