FifeGUI 0.2.0
A C++ GUI library designed for games.
fcn::MouseListener Class Reference

#include <mouselistener.hpp>

Inheritance diagram for fcn::MouseListener:
fcn::Button fcn::DropDown fcn::ListBox fcn::ScrollArea fcn::Slider fcn::Tab fcn::TabbedArea fcn::TextBox fcn::TextField fcn::Window

Public Member Functions

virtual void mouseClicked (MouseEvent &mouseEvent)
virtual void mouseDragged (MouseEvent &mouseEvent)
virtual void mouseEntered (MouseEvent &mouseEvent)
virtual void mouseExited (MouseEvent &mouseEvent)
 MouseListener (MouseListener &&)=default
 MouseListener (MouseListener const &)=default
virtual void mouseMoved (MouseEvent &mouseEvent)
virtual void mousePressed (MouseEvent &mouseEvent)
virtual void mouseReleased (MouseEvent &mouseEvent)
virtual void mouseWheelMovedDown (MouseEvent &mouseEvent)
virtual void mouseWheelMovedLeft (MouseEvent &mouseEvent)
virtual void mouseWheelMovedRight (MouseEvent &mouseEvent)
virtual void mouseWheelMovedUp (MouseEvent &mouseEvent)
MouseListeneroperator= (MouseListener &&)=default
MouseListeneroperator= (MouseListener const &)=default

Protected Member Functions

 MouseListener ()=default

Detailed Description

Interface for listening to mouse events.

See also
Widget::addMouseListener, Widget::removeMouseListener

Definition at line 20 of file mouselistener.hpp.

Constructor & Destructor Documentation

◆ MouseListener()

fcn::MouseListener::MouseListener ( )
protecteddefault

Constructor.

Instances should not be created directly, therefore the constructor is declared protected.

Member Function Documentation

◆ mouseClicked()

virtual void fcn::MouseListener::mouseClicked ( MouseEvent & mouseEvent)
inlinevirtual

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

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::CheckBox.

Definition at line 71 of file mouselistener.hpp.

◆ mouseDragged()

virtual void fcn::MouseListener::mouseDragged ( MouseEvent & mouseEvent)
inlinevirtual

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

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::Button, fcn::DropDown, fcn::ListBox, fcn::ScrollArea, fcn::Slider, fcn::TextBox, fcn::TextField, and fcn::Window.

Definition at line 115 of file mouselistener.hpp.

◆ mouseEntered()

virtual void fcn::MouseListener::mouseEntered ( MouseEvent & mouseEvent)
inlinevirtual

Called when the mouse has entered into the widget area.

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::Button, and fcn::Tab.

Definition at line 39 of file mouselistener.hpp.

◆ mouseExited()

virtual void fcn::MouseListener::mouseExited ( MouseEvent & mouseEvent)
inlinevirtual

Called when the mouse has exited the widget area.

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::Button, and fcn::Tab.

Definition at line 46 of file mouselistener.hpp.

◆ mouseMoved()

virtual void fcn::MouseListener::mouseMoved ( MouseEvent & mouseEvent)
inlinevirtual

Called when the mouse has moved in the widget area and no mouse button has been pressed (i.e no widget is being dragged).

Parameters
mouseEventDescribes the event.

Definition at line 107 of file mouselistener.hpp.

◆ mousePressed()

virtual void fcn::MouseListener::mousePressed ( MouseEvent & mouseEvent)
inlinevirtual

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

NOTE: A mouse press is NOT equal to a mouse click. Use mouseClickMessage to check for mouse clicks.

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::Button, fcn::CheckBox, fcn::DropDown, fcn::ListBox, fcn::ScrollArea, fcn::Slider, fcn::TabbedArea, fcn::TextBox, fcn::TextField, and fcn::Window.

Definition at line 56 of file mouselistener.hpp.

◆ mouseReleased()

virtual void fcn::MouseListener::mouseReleased ( MouseEvent & mouseEvent)
inlinevirtual

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

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::Button, fcn::CheckBox, fcn::DropDown, fcn::ScrollArea, fcn::ToggleButton, and fcn::Window.

Definition at line 63 of file mouselistener.hpp.

◆ mouseWheelMovedDown()

virtual void fcn::MouseListener::mouseWheelMovedDown ( MouseEvent & mouseEvent)
inlinevirtual

Called when the mouse wheel has moved down on the widget area.

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::DropDown, fcn::ListBox, fcn::ScrollArea, and fcn::Slider.

Definition at line 85 of file mouselistener.hpp.

◆ mouseWheelMovedLeft()

virtual void fcn::MouseListener::mouseWheelMovedLeft ( MouseEvent & mouseEvent)
inlinevirtual

Called when the mouse wheel has moved left on the widget area.

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::ScrollArea, and fcn::Slider.

Definition at line 99 of file mouselistener.hpp.

◆ mouseWheelMovedRight()

virtual void fcn::MouseListener::mouseWheelMovedRight ( MouseEvent & mouseEvent)
inlinevirtual

Called when the mouse wheel has moved right on the widget area.

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::ScrollArea, and fcn::Slider.

Definition at line 92 of file mouselistener.hpp.

◆ mouseWheelMovedUp()

virtual void fcn::MouseListener::mouseWheelMovedUp ( MouseEvent & mouseEvent)
inlinevirtual

Called when the mouse wheel has moved up on the widget area.

Parameters
mouseEventDescribes the event.

Reimplemented in fcn::DropDown, fcn::ListBox, fcn::ScrollArea, and fcn::Slider.

Definition at line 78 of file mouselistener.hpp.


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