____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"#include <luacallback.h>
Public Member Functions | |
| LuaCallback (lua_State *lua, lua_Object luaref) | |
| virtual | ~LuaCallback () |
| virtual void | pushPreamble () |
| virtual void | pushInteger (int value) |
| virtual void | pushString (const std::string &eventId) |
| virtual void | run () |
Definition at line 36 of file luacallback.h.
| LuaCallback::LuaCallback | ( | lua_State * | l, | |
| lua_Object | f | |||
| ) |
LuaCallback constructor
| l | Lua state | |
| f | Listener function |
Definition at line 43 of file luacallback.cpp.
| LuaCallback::~LuaCallback | ( | ) | [virtual] |
LuaActionListener destructor
Definition at line 116 of file luacallback.cpp.
| void LuaCallback::pushPreamble | ( | ) | [virtual] |
Push the preamble on the stack to call the callback. Call this function before pushing the arguments on the lua stack.
Definition at line 58 of file luacallback.cpp.
Referenced by LuaActionListener::action(), LetUnitDie(), and MissileHit().
| void LuaCallback::pushInteger | ( | int | value | ) | [virtual] |
Push a string argument for the callback on the stack.
| value | the integer to push on the stack |
Definition at line 72 of file luacallback.cpp.
Referenced by LetUnitDie(), and MissileHit().
| void LuaCallback::pushString | ( | const std::string & | s | ) | [virtual] |
Push a string argument for the callback on the stack.
| s | the string to push on the stack |
Definition at line 84 of file luacallback.cpp.
Referenced by LuaActionListener::action().
| void LuaCallback::run | ( | ) | [virtual] |
Called when an action is recieved from a Widget. It is used to be able to recieve a notification that an action has occured.
Definition at line 96 of file luacallback.cpp.
Referenced by LuaActionListener::action(), LetUnitDie(), and MissileHit().
1.5.6