ManaPlus
|
#include <mouseevent.h>
Public Member Functions | |
MouseEvent (Widget *const source, const MouseEventTypeT type, const MouseButtonT button, const int x, const int y, const int clickCount) | |
MouseButtonT | getButton () const |
int | getX () const |
int | getY () const |
int | getClickCount () const |
MouseEventTypeT | getType () const |
void | setX (int n) |
void | setY (int n) |
Public Member Functions inherited from InputGuiEvent | |
InputGuiEvent (Widget *const source) | |
void | consume () |
bool | isConsumed () const |
Public Member Functions inherited from Event | |
Event (Widget *const source) | |
virtual | ~Event () |
Widget * | getSource () const |
Protected Attributes | |
MouseEventTypeT | mType |
MouseButtonT | mButton |
int | mX |
int | mY |
int | mClickCount |
Protected Attributes inherited from InputGuiEvent | |
bool | mIsConsumed |
Protected Attributes inherited from Event | |
Widget * | mSource |
Friends | |
class | Gui |
Represents a mouse event.
Definition at line 80 of file mouseevent.h.
|
inline |
Constructor.
source | The source widget of the mouse event. |
type | The type of the mouse event. |
button | The button of the mouse event. |
x | The x coordinate of the event relative to the source widget. |
y | The y coordinate of the event relative the source widget. |
clickCount | The number of clicks generated with the same button. It's set to zero if another button is used. |
Definition at line 94 of file mouseevent.h.
|
inline |
Gets the button of the mouse event.
Definition at line 116 of file mouseevent.h.
References mButton.
Referenced by WhoIsOnline::handleLink(), CheckBox::mouseClicked(), RadioButton::mouseClicked(), InventoryWindow::mouseClicked(), MailWindow::mouseClicked(), ServerDialog::mouseClicked(), GuiTable::mouseDragged(), ItemShortcutContainer::mouseDragged(), ListBox::mouseDragged(), SpellShortcutContainer::mouseDragged(), VirtShortcutContainer::mouseDragged(), OutfitWindow::mouseDragged(), Button::mousePressed(), DropDown::mousePressed(), GuiTable::mousePressed(), ItemShortcutContainer::mousePressed(), ScrollArea::mousePressed(), Slider::mousePressed(), TabbedArea::mousePressed(), TextBox::mousePressed(), TextField::mousePressed(), WindowMenu::mousePressed(), ChatWindow::mousePressed(), EquipmentWindow::mousePressed(), Minimap::mousePressed(), MiniStatusWindow::mousePressed(), NpcDialog::mousePressed(), OutfitWindow::mousePressed(), ShortcutWindow::mousePressed(), Button::mouseReleased(), ItemShortcutContainer::mouseReleased(), PlayerBox::mouseReleased(), ScrollArea::mouseReleased(), ShopListBox::mouseReleased(), VirtShortcutContainer::mouseReleased(), Minimap::mouseReleased(), OutfitWindow::mouseReleased(), and ListBox::mouseReleased1().
|
inline |
Gets the number of clicks generated with the same button. It's set to zero if another button is used.
Definition at line 147 of file mouseevent.h.
References mClickCount.
Referenced by MailWindow::mouseClicked(), ServerDialog::mouseClicked(), CharacterDisplay::mousePressed(), and ListBox::mouseReleased().
|
inline |
Gets the type of the event.
Definition at line 155 of file mouseevent.h.
References mType.
Referenced by ItemContainer::mouseReleased(), and ShopListBox::mouseReleased().
|
inline |
Gets the x coordinate of the mouse event. The coordinate relative to widget the mouse listener receiving the events have registered to.
Definition at line 127 of file mouseevent.h.
References mX.
Referenced by Window::getResizeHandles(), GuiTable::mouseDragged(), ItemShortcutContainer::mouseDragged(), Slider::mouseDragged(), SpellShortcutContainer::mouseDragged(), VirtShortcutContainer::mouseDragged(), Window::mouseDragged(), ChatWindow::mouseDragged(), OutfitWindow::mouseDragged(), ShortcutWindow::mouseDragged(), Viewport::mouseDragged(), BrowserBox::mouseMoved(), ItemContainer::mouseMoved(), ItemShortcutContainer::mouseMoved(), SpellShortcutContainer::mouseMoved(), StaticBrowserBox::mouseMoved(), VirtShortcutContainer::mouseMoved(), BrowserBox::mousePressed(), EmotePage::mousePressed(), GuiTable::mousePressed(), ItemContainer::mousePressed(), ItemShortcutContainer::mousePressed(), SpellShortcutContainer::mousePressed(), StaticBrowserBox::mousePressed(), TabbedArea::mousePressed(), TextBox::mousePressed(), TextField::mousePressed(), VirtShortcutContainer::mousePressed(), OutfitWindow::mousePressed(), ItemContainer::mouseReleased(), ItemShortcutContainer::mouseReleased(), SpellShortcutContainer::mouseReleased(), VirtShortcutContainer::mouseReleased(), and OutfitWindow::mouseReleased().
|
inline |
Gets the y coordinate of the mouse event. The coordinate relative to widget the mouse listener receiving the events have registered to.
Definition at line 138 of file mouseevent.h.
References mY.
Referenced by Window::getResizeHandles(), GuiTable::mouseDragged(), ItemShortcutContainer::mouseDragged(), ListBox::mouseDragged(), Slider::mouseDragged(), SpellShortcutContainer::mouseDragged(), VirtShortcutContainer::mouseDragged(), Window::mouseDragged(), ChatWindow::mouseDragged(), OutfitWindow::mouseDragged(), ShortcutWindow::mouseDragged(), Viewport::mouseDragged(), BrowserBox::mouseMoved(), ItemContainer::mouseMoved(), ItemShortcutContainer::mouseMoved(), SpellShortcutContainer::mouseMoved(), StaticBrowserBox::mouseMoved(), VirtShortcutContainer::mouseMoved(), BrowserBox::mousePressed(), EmotePage::mousePressed(), GuiTable::mousePressed(), ItemContainer::mousePressed(), ItemShortcutContainer::mousePressed(), ListBox::mousePressed(), PopupList::mousePressed(), SpellShortcutContainer::mousePressed(), StaticBrowserBox::mousePressed(), TabbedArea::mousePressed(), VirtShortcutContainer::mousePressed(), OutfitWindow::mousePressed(), ItemContainer::mouseReleased(), ItemShortcutContainer::mouseReleased(), ListBox::mouseReleased(), PopupList::mouseReleased(), ShopListBox::mouseReleased(), SpellShortcutContainer::mouseReleased(), VirtShortcutContainer::mouseReleased(), OutfitWindow::mouseReleased(), and ListBox::mouseReleased1().
|
inline |
|
inline |
|
friend |
Gui is a friend of this class in order to be able to manipulate the protected member variables of this class and at the same time keep the MouseEvent class as const as possible. Gui needs to update the x och y coordinates for the coordinates to be relative to widget the mouse listener receiving the events have registered to.
Definition at line 199 of file mouseevent.h.
|
protected |
Holds the button of the mouse event.
Definition at line 173 of file mouseevent.h.
Referenced by getButton().
|
protected |
The number of clicks generated with the same button. It's set to zero if another button is used.
Definition at line 189 of file mouseevent.h.
Referenced by getClickCount().
|
protected |
Holds the type of the mouse event.
Definition at line 168 of file mouseevent.h.
Referenced by getType().
|
protected |
Holds the x-coordinate of the mouse event.
Definition at line 178 of file mouseevent.h.
|
protected |
Holds the y-coordinate of the mouse event.
Definition at line 183 of file mouseevent.h.