The Battle for Wesnoth  1.19.5+dev
Namespaces | Functions
lua_widget.hpp File Reference
#include "scripting/lua_ptr.hpp"
#include "serialization/string_utils.hpp"
Include dependency graph for lua_widget.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 gui2
 Generic file dialog.
 
 lua_widget
 

Functions

void lua_widget::register_metatable (lua_State *L)
 
void luaW_pushwidget (lua_State *L, gui2::widget &w)
 
bool luaW_iswidget (lua_State *L, int idx)
 
gui2::widgetluaW_checkwidget (lua_State *L, int idx)
 
lua_ptr< gui2::widget > & luaW_checkwidget_ptr (lua_State *L, int idx)
 
void luaW_pushwindowtable (lua_State *L, gui2::window *owner)
 [-0, +1, -] More...
 
void luaW_clearwindowtable (lua_State *L, gui2::window *owner)
 [-0, +0, -] More...
 
void luaW_pushwidgettable (lua_State *L, gui2::widget *wg, gui2::window *owner)
 [-0, +1, -] More...
 
bool luaW_setwidgetcallback (lua_State *L, gui2::widget *wg, gui2::window *owner, std::string_view name)
 returns true if a callback already existed. More...
 
void luaW_getwidgetcallback (lua_State *L, gui2::widget *wg, gui2::window *owner, std::string_view name)
 pushed ther callback function onoto the stack [-0, +1, -] More...
 
void luaW_callwidgetcallback (lua_State *L, gui2::widget *wg, gui2::window *owner, std::string_view name)
 callas a widgets callback [-0, +0, e] More...
 

Function Documentation

◆ luaW_callwidgetcallback()

void luaW_callwidgetcallback ( lua_State *  L,
gui2::widget wg,
gui2::window owner,
std::string_view  name 
)

callas a widgets callback [-0, +0, e]

Definition at line 174 of file lua_widget.cpp.

References luaW_getwidgetcallback(), and luaW_pushwidget().

◆ luaW_checkwidget()

gui2::widget& luaW_checkwidget ( lua_State *  L,
int  idx 
)

◆ luaW_checkwidget_ptr()

lua_ptr<gui2::widget>& luaW_checkwidget_ptr ( lua_State *  L,
int  idx 
)

Definition at line 51 of file lua_widget.cpp.

References lua_ptr< T >::get_ptr(), n, and widgetKey.

Referenced by intf_set_dialog_callback().

◆ luaW_clearwindowtable()

void luaW_clearwindowtable ( lua_State *  L,
gui2::window owner 
)

[-0, +0, -]

Definition at line 103 of file lua_widget.cpp.

References luaW_pushwidgettablecontainer().

Referenced by intf_show_dialog().

◆ luaW_getwidgetcallback()

void luaW_getwidgetcallback ( lua_State *  L,
gui2::widget wg,
gui2::window owner,
std::string_view  name 
)

pushed ther callback function onoto the stack [-0, +1, -]

Definition at line 162 of file lua_widget.cpp.

References lua_push(), and luaW_pushwidgettable().

Referenced by luaW_callwidgetcallback().

◆ luaW_iswidget()

bool luaW_iswidget ( lua_State *  L,
int  idx 
)

Definition at line 62 of file lua_widget.cpp.

References utf8::index(), and widgetKey.

◆ luaW_pushwidget()

void luaW_pushwidget ( lua_State *  L,
gui2::widget w 
)

◆ luaW_pushwidgettable()

void luaW_pushwidgettable ( lua_State *  L,
gui2::widget wg,
gui2::window owner 
)

[-0, +1, -]

Definition at line 113 of file lua_widget.cpp.

References luaW_pushwidget(), and luaW_pushwindowtable().

Referenced by luaW_getwidgetcallback(), and luaW_setwidgetcallback().

◆ luaW_pushwindowtable()

void luaW_pushwindowtable ( lua_State *  L,
gui2::window owner 
)

[-0, +1, -]

Definition at line 81 of file lua_widget.cpp.

References luaW_pushwidgettablecontainer().

Referenced by luaW_pushwidgettable().

◆ luaW_setwidgetcallback()

bool luaW_setwidgetcallback ( lua_State *  L,
gui2::widget wg,
gui2::window owner,
std::string_view  name 
)

returns true if a callback already existed.

[-1, +0, -]

Definition at line 140 of file lua_widget.cpp.

References lua_push(), and luaW_pushwidgettable().

Referenced by intf_set_dialog_callback().