$treeview $search $mathjax
Stratagus
2.2.6
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <mouselistener.h>
Public Member Functions | |
virtual | ~MouseListener () |
virtual void | mouseIn () |
virtual void | mouseOut () |
virtual void | mousePress (int, int, int) |
virtual void | mouseRelease (int, int, int) |
virtual void | mouseClick (int, int, int, int) |
virtual void | mouseWheelUp (int, int) |
virtual void | mouseWheelDown (int, int) |
virtual void | mouseMotion (int, int) |
Protected Member Functions | |
MouseListener () |
virtual gcn::MouseListener::~MouseListener | ( | ) | [inline, virtual] |
Destructor.
gcn::MouseListener::MouseListener | ( | ) | [inline, protected] |
Constructor.
You should not be able to make an instance of MouseListener, therefore its constructor is protected. To use MouseListener you must inherit from this class and implement it's functions.
virtual void gcn::MouseListener::mouseIn | ( | ) | [inline, virtual] |
Called when the mouse enters into the widget area.
virtual void gcn::MouseListener::mouseOut | ( | ) | [inline, virtual] |
Called when the mouse leaves the Widget area.
virtual void gcn::MouseListener::mousePress | ( | int | , | |
int | , | |||
int | ||||
) | [inline, virtual] |
Called when a mouse button is pressed when the mouse is in the Widget area or if the Widget has focus.
NOTE: A mouse press is NOT equal to a mouse click. Use mouseClickMessage to check for mouse clicks.
x | the x coordinate of the mouse relative to the Widget itself. | |
y | the y coordinate of the mouse relative to the Widget itself. | |
button | the button pressed. |
Reimplemented in gcn::Button, gcn::DropDown, gcn::ListBox, gcn::ScrollArea, gcn::Slider, gcn::TextBox, gcn::TextField, gcn::Window, ImageRadioButton, and ImageCheckBox.
virtual void gcn::MouseListener::mouseRelease | ( | int | , | |
int | , | |||
int | ||||
) | [inline, virtual] |
Called when a mouse button is released when the mouse is in the Widget area or if the Widget has focus.
x | the x coordinate of the mouse relative to the Widget itself. | |
y | the y coordinate of the mouse relative to the Widget itself. | |
button | the button released. |
Reimplemented in gcn::Button, gcn::DropDown, gcn::ScrollArea, gcn::Slider, gcn::Window, ImageRadioButton, and ImageCheckBox.
virtual void gcn::MouseListener::mouseClick | ( | int | , | |
int | , | |||
int | , | |||
int | ||||
) | [inline, virtual] |
Called when a mouse button is pressed and released (clicked) when the mouse is in the Widget area or if the Widget has focus.
x | the x coordinate of the mouse relative to the Widget itself. | |
y | the y coordinate of the mouse relative to the Widget itself. | |
button | the button clicked. | |
count | the number of clicks. |
Reimplemented in gcn::Button, gcn::CheckBox, gcn::RadioButton, ImageRadioButton, and ImageCheckBox.
virtual void gcn::MouseListener::mouseWheelUp | ( | int | , | |
int | ||||
) | [inline, virtual] |
Called on a mouse wheel up when the mouse is in the Widget area or if the Widget has focus.
x | the x coordinate of the mouse relative to the Widget itself. | |
y | the y coordinate of the mouse relative to the Widget itself. |
Reimplemented in gcn::ScrollArea.
virtual void gcn::MouseListener::mouseWheelDown | ( | int | , | |
int | ||||
) | [inline, virtual] |
Called on a mouse wheel down when the mouse is in the Widget area or if the Widget has focus.
x | the x coordinate of the mouse relative to the Widget itself. | |
y | the y coordinate of the mouse relative to the Widget itself. |
Reimplemented in gcn::ScrollArea.
virtual void gcn::MouseListener::mouseMotion | ( | int | , | |
int | ||||
) | [inline, virtual] |
Called when the mouse moves and the mouse is in the Widget area or if the Widget has focus.
x | the x coordinate of the mouse relative to the Widget itself. | |
y | the y coordinate of the mouse relative to the Widget itself. |
Reimplemented in gcn::ScrollArea, gcn::Slider, gcn::TextField, and gcn::Window.