FifeGUI 0.3.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::MenuBar fcn::MenuPopup fcn::ModalBackdrop fcn::Panel 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 23 of file mouselistener.hpp.

Constructor & Destructor Documentation

◆ MouseListener()

fcn::MouseListener::MouseListener ( )
protecteddefault

Protected default 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 95 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 151 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::ActivityBarItem, fcn::Button, fcn::MenuPopup, fcn::ModalBackdrop, and fcn::Tab.

Definition at line 53 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::ActivityBarItem, fcn::Button, fcn::MenuPopup, fcn::ModalBackdrop, and fcn::Tab.

Definition at line 62 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 141 of file mouselistener.hpp.

◆ mousePressed()

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

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

Note
A mouse press is NOT equal to a mouse click. Use mouseClicked() for "pressed AND released" (full click) on a widget.
See also
mouseClicked
Parameters
mouseEventDescribes the event.

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

Definition at line 76 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::MenuPopup, fcn::ModalBackdrop, fcn::ScrollArea, fcn::ToggleButton, and fcn::Window.

Definition at line 85 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 113 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 131 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 122 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 104 of file mouselistener.hpp.


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