ManaPlus
Public Member Functions | Protected Member Functions
MouseListener Class Reference

#include <mouselistener.h>

Inheritance diagram for MouseListener:
BrowserBox Button CharacterDisplay DropDown EmotePage GuiTable ItemContainer ListBox PlayerBox Popup RadioButton ScrollArea ShortcutContainer SkillRectangleListBox Slider SliderList StaticBrowserBox Tab TabbedArea TextBox TextField ToolTipListener Viewport Viewport Window WindowMenu

Public Member Functions

virtual ~MouseListener ()
 
virtual void mouseEntered (MouseEvent &event)
 
virtual void mouseExited (MouseEvent &event)
 
virtual void mousePressed (MouseEvent &event)
 
virtual void mouseReleased (MouseEvent &event)
 
virtual void mouseClicked (MouseEvent &event)
 
virtual void mouseWheelMovedUp (MouseEvent &event)
 
virtual void mouseWheelMovedDown (MouseEvent &event)
 
virtual void mouseMoved (MouseEvent &event)
 
virtual void mouseDragged (MouseEvent &event)
 

Protected Member Functions

 MouseListener ()
 

Detailed Description

Interface for listening for mouse events from widgets.

See also
Widget::addMouseListener, Widget::removeMouseListener

Definition at line 77 of file mouselistener.h.

Constructor & Destructor Documentation

◆ ~MouseListener()

virtual MouseListener::~MouseListener ( )
inlinevirtual

Destructor.

Definition at line 85 of file mouselistener.h.

86  { }

◆ MouseListener()

MouseListener::MouseListener ( )
inlineprotected

Constructor.

You should not be able to make an instance of MouseListener, therefore its constructor is protected.

Definition at line 182 of file mouselistener.h.

183  { }

Member Function Documentation

◆ mouseClicked()

virtual void MouseListener::mouseClicked ( MouseEvent event)
inlinevirtual

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

Parameters
eventDescribes the event.

Reimplemented in ServerDialog, MailWindow, InventoryWindow, RadioButton, and CheckBox.

Definition at line 133 of file mouselistener.h.

134  {
135  }

Referenced by InventoryWindow::mouseClicked().

◆ mouseDragged()

virtual void MouseListener::mouseDragged ( MouseEvent event)
inlinevirtual

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

Parameters
eventDescribes the event.

Reimplemented in Viewport, Viewport, ShortcutWindow, OutfitWindow, ChatWindow, Window, VirtShortcutContainer, TextField, TextBox, SpellShortcutContainer, Slider, SkillRectangleListBox, SkillListBox, ShortcutContainer, ScrollArea, RadioButton, ListBox, ItemShortcutContainer, ItemContainer, GuiTable, EmoteShortcutContainer, DropDown, CheckBox, and Button.

Definition at line 171 of file mouselistener.h.

172  {
173  }

◆ mouseEntered()

virtual void MouseListener::mouseEntered ( MouseEvent event)
inlinevirtual

Called when the mouse has entered into the widget area.

Parameters
eventDescribes the event.

Reimplemented in ChatWindow, Window, Tab, Slider, ScrollArea, RadioButton, CheckBox, and Button.

Definition at line 93 of file mouselistener.h.

94  {
95  }

◆ mouseExited()

virtual void MouseListener::mouseExited ( MouseEvent event)
inlinevirtual

◆ mouseMoved()

virtual void MouseListener::mouseMoved ( MouseEvent event)
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
eventDescribes the event.

Reimplemented in Viewport, Viewport, ToolTipListener, MiniStatusWindow, Minimap, ItemAmountWindow, InventoryWindow, EquipmentWindow, ChatWindow, WindowMenu, Window, VirtShortcutContainer, StaticBrowserBox, SpellShortcutContainer, SkillRectangleListBox, SkillListBox, ShopListBox, ScrollArea, Popup, ItemShortcutContainer, ItemContainer, EmoteShortcutContainer, CharacterDisplay, BrowserBox, TextPopup, TextBoxPopup, SpellPopup, SkillPopup, and ItemPopup.

Definition at line 161 of file mouselistener.h.

162  {
163  }

Referenced by SkillListBox::mouseMoved().

◆ mousePressed()

virtual void MouseListener::mousePressed ( MouseEvent event)
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
eventDescribes the event.

Reimplemented in Viewport, Viewport, ShortcutWindow, OutfitWindow, NpcDialog, MiniStatusWindow, Minimap, EquipmentWindow, ChatWindow, WindowMenu, Window, VirtShortcutContainer, TextField, TextBox, TabbedArea, StaticBrowserBox, SpellShortcutContainer, Slider, SkillRectangleListBox, SkillListBox, ShortcutContainer, ScrollArea, PopupList, ListBox, ItemShortcutContainer, ItemContainer, GuiTable, EmoteShortcutContainer, EmotePage, DropDown, CharacterDisplay, Button, BrowserBox, and AvatarListBox.

Definition at line 114 of file mouselistener.h.

115  {
116  }

◆ mouseReleased()

virtual void MouseListener::mouseReleased ( MouseEvent event)
inlinevirtual

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

Parameters
eventDescribes the event.

Reimplemented in Viewport, Viewport, OutfitWindow, Minimap, EquipmentWindow, Window, VirtShortcutContainer, SpellShortcutContainer, SkillRectangleListBox, SkillListBox, ShortcutContainer, ShopListBox, ScrollArea, PopupList, PlayerBox, ListBox, ItemShortcutContainer, ItemContainer, EmoteShortcutContainer, DropDown, Button, and AvatarListBox.

Definition at line 123 of file mouselistener.h.

124  {
125  }

◆ mouseWheelMovedDown()

virtual void MouseListener::mouseWheelMovedDown ( MouseEvent event)
inlinevirtual

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

Parameters
eventDescribes the event.

Reimplemented in SliderList, Slider, ScrollArea, ListBox, GuiTable, and DropDown.

Definition at line 151 of file mouselistener.h.

152  {
153  }

◆ mouseWheelMovedUp()

virtual void MouseListener::mouseWheelMovedUp ( MouseEvent event)
inlinevirtual

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

Parameters
eventDescribes the event.

Reimplemented in SliderList, Slider, ScrollArea, ListBox, GuiTable, and DropDown.

Definition at line 142 of file mouselistener.h.

143  {
144  }

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