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 76 of file mouselistener.h.

Constructor & Destructor Documentation

◆ ~MouseListener()

virtual MouseListener::~MouseListener ( )
inlinevirtual

Destructor.

Definition at line 84 of file mouselistener.h.

85  { }

◆ MouseListener()

MouseListener::MouseListener ( )
inlineprotected

Constructor.

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

Definition at line 181 of file mouselistener.h.

182  { }

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 CheckBox, RadioButton, InventoryWindow, ServerDialog, and MailWindow.

Definition at line 132 of file mouselistener.h.

Referenced by InventoryWindow::mouseClicked().

133  {
134  }

◆ 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 Window, SkillRectangleListBox, TextBox, Button, TextField, SkillListBox, CheckBox, ScrollArea, RadioButton, ChatWindow, GuiTable, ListBox, Slider, Viewport, Viewport, DropDown, ItemContainer, ShortcutWindow, OutfitWindow, ShortcutContainer, EmoteShortcutContainer, VirtShortcutContainer, ItemShortcutContainer, and SpellShortcutContainer.

Definition at line 170 of file mouselistener.h.

171  {
172  }

◆ mouseEntered()

virtual void MouseListener::mouseEntered ( MouseEvent event)
inlinevirtual

Called when the mouse has entered into the widget area.

Parameters
eventDescribes the event.

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

Definition at line 92 of file mouselistener.h.

93  {
94  }

◆ 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 Window, SkillRectangleListBox, ChatWindow, SkillListBox, ScrollArea, InventoryWindow, Viewport, BrowserBox, Viewport, StaticBrowserBox, EquipmentWindow, Popup, ItemContainer, ShopListBox, CharacterDisplay, VirtShortcutContainer, MiniStatusWindow, TextPopup, EmoteShortcutContainer, ItemShortcutContainer, SpellShortcutContainer, ItemPopup, Minimap, ItemAmountWindow, SkillPopup, WindowMenu, SpellPopup, TextBoxPopup, and ToolTipListener.

Definition at line 160 of file mouselistener.h.

Referenced by SkillListBox::mouseMoved().

161  {
162  }

◆ 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 Window, SkillRectangleListBox, TextBox, Button, SkillListBox, NpcDialog, TabbedArea, TextField, ScrollArea, ChatWindow, GuiTable, Slider, ListBox, BrowserBox, StaticBrowserBox, Viewport, DropDown, Viewport, ItemContainer, CharacterDisplay, EquipmentWindow, MiniStatusWindow, Minimap, PopupList, ShortcutContainer, EmoteShortcutContainer, ShortcutWindow, VirtShortcutContainer, ItemShortcutContainer, SpellShortcutContainer, WindowMenu, OutfitWindow, AvatarListBox, and EmotePage.

Definition at line 113 of file mouselistener.h.

114  {
115  }

◆ 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 SkillRectangleListBox, Window, SkillListBox, ScrollArea, Button, ListBox, Viewport, Viewport, PlayerBox, EquipmentWindow, DropDown, ItemContainer, ShopListBox, ShortcutContainer, PopupList, EmoteShortcutContainer, VirtShortcutContainer, Minimap, ItemShortcutContainer, SpellShortcutContainer, OutfitWindow, and AvatarListBox.

Definition at line 122 of file mouselistener.h.

123  {
124  }

◆ 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 ScrollArea, GuiTable, Slider, ListBox, DropDown, and SliderList.

Definition at line 150 of file mouselistener.h.

151  {
152  }

◆ 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 ScrollArea, GuiTable, Slider, ListBox, DropDown, and SliderList.

Definition at line 141 of file mouselistener.h.

142  {
143  }

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