_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

List of all members
LuaActionListener Class Reference

#include <widgets.h>

Inheritance diagram for LuaActionListener:
gcn::ActionListener gcn::KeyListener gcn::MouseListener

Public Member Functions

widgets.cpp - The stratagus ui widgets.
 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 ()
 
- Public Member Functions inherited from gcn::ActionListener
virtual ~ActionListener ()
 
- Public Member Functions inherited from gcn::KeyListener
virtual ~KeyListener ()
 
- Public Member Functions inherited from gcn::MouseListener
virtual ~MouseListener ()
 

Additional Inherited Members

- Protected Member Functions inherited from gcn::KeyListener
 KeyListener ()
 
- Protected Member Functions inherited from gcn::MouseListener
 MouseListener ()
 

Constructor & Destructor Documentation

◆ LuaActionListener()

LuaActionListener::LuaActionListener ( lua_State *  l,
lua_Object  f 
)

LuaActionListener constructor

Parameters
lLua state
fListener function

◆ ~LuaActionListener()

LuaActionListener::~LuaActionListener ( )
virtual

LuaActionListener destructor

Member Function Documentation

◆ 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
eventIdthe identifier of the Widget

Implements gcn::ActionListener.

◆ hotKeyPress()

void LuaActionListener::hotKeyPress ( const gcn::Key key)
virtual

Reimplemented from gcn::KeyListener.

◆ hotKeyRelease()

void LuaActionListener::hotKeyRelease ( const gcn::Key key)
virtual

Reimplemented from gcn::KeyListener.

◆ 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
keythe key pressed.

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
keythe key released.

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
xthe x coordinate of the mouse relative to the Widget itself.
ythe y coordinate of the mouse relative to the Widget itself.
buttonthe button clicked.
countthe number of clicks.

Reimplemented from gcn::MouseListener.

◆ mouseIn()

void LuaActionListener::mouseIn ( )
virtual

Called when the mouse enters into the widget area.

Reimplemented from gcn::MouseListener.

◆ 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
xthe x coordinate of the mouse relative to the Widget itself.
ythe y coordinate of the mouse relative to the Widget itself.

Reimplemented from gcn::MouseListener.

◆ mouseOut()

void LuaActionListener::mouseOut ( )
virtual

Called when the mouse leaves the Widget area.

Reimplemented from gcn::MouseListener.

◆ 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
xthe x coordinate of the mouse relative to the Widget itself.
ythe y coordinate of the mouse relative to the Widget itself.
buttonthe 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
xthe x coordinate of the mouse relative to the Widget itself.
ythe y coordinate of the mouse relative to the Widget itself.
buttonthe 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
xthe x coordinate of the mouse relative to the Widget itself.
ythe 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
xthe x coordinate of the mouse relative to the Widget itself.
ythe 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 Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.