_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
#include <widgets.h>
|
|
| LuaActionListener (lua_State *lua, lua_Object function) |
|
virtual void | action (const std::string &eventId) |
|
virtual bool | keyPress (const gcn::Key &) |
|
virtual bool | keyRelease (const gcn::Key &) |
|
virtual void | hotKeyPress (const gcn::Key &) |
|
virtual void | hotKeyRelease (const gcn::Key &) |
|
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) |
|
virtual | ~LuaActionListener () |
|
virtual | ~ActionListener () |
|
virtual | ~KeyListener () |
|
virtual | ~MouseListener () |
|
◆ LuaActionListener()
LuaActionListener::LuaActionListener |
( |
lua_State * |
l, |
|
|
lua_Object |
f |
|
) |
| |
◆ ~LuaActionListener()
LuaActionListener::~LuaActionListener |
( |
| ) |
|
|
virtual |
◆ action()
void LuaActionListener::action |
( |
const std::string & |
eventId | ) |
|
|
virtual |
Called when an action is received from a Widget. It is used to be able to receive a notification that an action has occurred.
- Parameters
-
eventId | the identifier of the Widget |
Implements gcn::ActionListener.
◆ hotKeyPress()
◆ hotKeyRelease()
void LuaActionListener::hotKeyRelease |
( |
const gcn::Key & |
key | ) |
|
|
virtual |
◆ keyPress()
bool LuaActionListener::keyPress |
( |
const gcn::Key & |
| ) |
|
|
virtual |
Called if a key is pressed when the widget has keyboard focus. If a key is held down the widget will generate multiple key presses.
- Parameters
-
Reimplemented from gcn::KeyListener.
◆ keyRelease()
bool LuaActionListener::keyRelease |
( |
const gcn::Key & |
| ) |
|
|
virtual |
Called if a key is released when the widget has keyboard focus.
- Parameters
-
Reimplemented from gcn::KeyListener.
◆ mouseClick()
void LuaActionListener::mouseClick |
( |
int |
, |
|
|
int |
, |
|
|
int |
, |
|
|
int |
|
|
) |
| |
|
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.
- Parameters
-
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 from gcn::MouseListener.
◆ mouseIn()
void LuaActionListener::mouseIn |
( |
| ) |
|
|
virtual |
◆ mouseMotion()
void LuaActionListener::mouseMotion |
( |
int |
, |
|
|
int |
|
|
) |
| |
|
virtual |
Called when the mouse moves and the mouse is in the Widget area or if the Widget has focus.
- Parameters
-
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 from gcn::MouseListener.
◆ mouseOut()
void LuaActionListener::mouseOut |
( |
| ) |
|
|
virtual |
◆ mousePress()
void LuaActionListener::mousePress |
( |
int |
, |
|
|
int |
, |
|
|
int |
|
|
) |
| |
|
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.
- Parameters
-
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 from gcn::MouseListener.
◆ mouseRelease()
void LuaActionListener::mouseRelease |
( |
int |
, |
|
|
int |
, |
|
|
int |
|
|
) |
| |
|
virtual |
Called when a mouse button is released when the mouse is in the Widget area or if the Widget has focus.
- Parameters
-
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 from gcn::MouseListener.
◆ mouseWheelDown()
void LuaActionListener::mouseWheelDown |
( |
int |
, |
|
|
int |
|
|
) |
| |
|
virtual |
Called on a mouse wheel down when the mouse is in the Widget area or if the Widget has focus.
- Parameters
-
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 from gcn::MouseListener.
◆ mouseWheelUp()
void LuaActionListener::mouseWheelUp |
( |
int |
, |
|
|
int |
|
|
) |
| |
|
virtual |
Called on a mouse wheel up when the mouse is in the Widget area or if the Widget has focus.
- Parameters
-
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 from gcn::MouseListener.
The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The