_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
#include <luacallback.h>
◆ LuaCallback()
LuaCallback::LuaCallback |
( |
lua_State * |
l, |
|
|
lua_Object |
f |
|
) |
| |
LuaCallback constructor
- Parameters
-
l | Lua state |
f | Listener function |
◆ ~LuaCallback()
LuaCallback::~LuaCallback |
( |
| ) |
|
◆ popBoolean()
bool LuaCallback::popBoolean |
( |
| ) |
|
Pops a boolean value for the callback on the stack.
◆ popInteger()
int LuaCallback::popInteger |
( |
| ) |
|
Pops an integer value for the callback on the stack.
◆ pushInteger()
void LuaCallback::pushInteger |
( |
int |
value | ) |
|
Push a string argument for the callback on the stack.
- Parameters
-
value | the integer to push on the stack |
◆ pushIntegers()
void LuaCallback::pushIntegers |
( |
const std::vector< int > & |
values | ) |
|
Push a array of integers from callback to stack
- Parameters
-
value | the integer to push on the stack |
◆ pushPreamble()
void LuaCallback::pushPreamble |
( |
| ) |
|
Push the preamble on the stack to call the callback. Call this function before pushing the arguments on the lua stack.
◆ pushString()
void LuaCallback::pushString |
( |
const std::string & |
s | ) |
|
Push a string argument for the callback on the stack.
- Parameters
-
s | the string to push on the stack |
◆ pushTable() [1/2]
void LuaCallback::pushTable |
( |
std::initializer_list< std::pair< std::string, std::variant< std::string, int >>> |
list | ) |
|
Push a table with string keys and string or integer values.
◆ pushTable() [2/2]
void LuaCallback::pushTable |
( |
std::map< std::string, std::variant< std::string, int >> |
map | ) |
|
Push a table with string keys and string or integer values.
◆ run()
void LuaCallback::run |
( |
int |
results = 0 | ) |
|
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
-
results | the number of results to be expected in call |
The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The