The Battle for Wesnoth  1.19.7+dev
Namespaces | Macros | Typedefs | Functions | Variables
lua_widget_attributes.cpp File Reference
#include "gui/auxiliary/iterator/iterator.hpp"
#include "gui/widgets/clickable_item.hpp"
#include "gui/widgets/helper.hpp"
#include "gui/widgets/styled_widget.hpp"
#include "gui/widgets/combobox.hpp"
#include "gui/widgets/label.hpp"
#include "gui/widgets/listbox.hpp"
#include "gui/widgets/multi_page.hpp"
#include "gui/widgets/progress_bar.hpp"
#include "gui/widgets/rich_label.hpp"
#include "gui/widgets/scroll_label.hpp"
#include "gui/widgets/scroll_text.hpp"
#include "gui/widgets/selectable_item.hpp"
#include "gui/widgets/slider.hpp"
#include "gui/widgets/stacked_widget.hpp"
#include "gui/widgets/text_box.hpp"
#include "gui/widgets/tree_view.hpp"
#include "gui/widgets/tree_view_node.hpp"
#include "gui/widgets/unit_preview_pane.hpp"
#include "gui/widgets/widget.hpp"
#include "gui/widgets/window.hpp"
#include "log.hpp"
#include "scripting/lua_common.hpp"
#include "scripting/lua_kernel_base.hpp"
#include "scripting/lua_unit.hpp"
#include "scripting/lua_unit_type.hpp"
#include "scripting/push_check.hpp"
#include "scripting/lua_widget.hpp"
#include "scripting/lua_attributes.hpp"
#include "scripting/lua_widget_attributes.hpp"
#include "serialization/string_utils.hpp"
#include <functional>
#include <boost/preprocessor/cat.hpp>
#include <map>
#include <utility>
#include <vector>
Include dependency graph for lua_widget_attributes.cpp:

Go to the source code of this file.

Namespaces

 lua_widget
 

Macros

#define ERR_LUA   LOG_STREAM(err, log_scripting_lua)
 
#define WIDGET_GETTER4(name, value_type, widgt_type, id)
 
#define WIDGET_SETTER4(name, value_type, widgt_type, id)
 
#define WIDGET_GETTER(name, value_type, widgt_type)   WIDGET_GETTER4(name, value_type, widgt_type, __LINE__)
 
#define WIDGET_SETTER(name, value_type, widgt_type)   WIDGET_SETTER4(name, value_type, widgt_type, __LINE__)
 

Typedefs

using tgetters = std::map< std::string, std::vector< std::function< bool(lua_State *, gui2::widget &, bool)> >>
 
using tsetters = std::map< std::string, std::vector< std::function< bool(lua_State *, int, gui2::widget &, bool)> >>
 

Functions

static void try_invalidate_layout (gui2::widget &w)
 
static gui2::widgetfind_child_by_index (gui2::widget &w, int i)
 
static gui2::widgetfind_child_by_name (gui2::widget &w, const std::string &m)
 
template<typename widget_type , typename value_type , typename action_type , bool setter>
void register_widget_attribute (const char *name)
 
 WIDGET_GETTER ("value_compat,selected_index", int, gui2::listbox)
 CLASSIC. More...
 
 WIDGET_SETTER ("value_compat,selected_index", int, gui2::listbox)
 
 WIDGET_GETTER ("value_compat,selected_index", int, gui2::multi_page)
 
 WIDGET_SETTER ("value_compat,selected_index", int, gui2::multi_page)
 
 WIDGET_GETTER ("value_compat,selected_index", int, gui2::stacked_widget)
 
 WIDGET_SETTER ("value_compat,selected_index", int, gui2::stacked_widget)
 
 WIDGET_GETTER ("selected_index", int, gui2::selectable_item)
 
 WIDGET_SETTER ("selected_index", int, gui2::selectable_item)
 
 WIDGET_GETTER ("value_compat,selected", bool, gui2::selectable_item)
 
 WIDGET_SETTER ("value_compat,selected", bool, gui2::selectable_item)
 
 WIDGET_GETTER ("value_compat,text", std::string, gui2::text_box)
 
 WIDGET_SETTER ("value_compat,text", std::string, gui2::text_box)
 
 WIDGET_GETTER ("value_compat,value", int, gui2::slider)
 
 WIDGET_SETTER ("value_compat,value", int, gui2::slider)
 
 WIDGET_GETTER ("best_slider_length", int, gui2::slider)
 
 WIDGET_SETTER ("best_slider_length", int, gui2::slider)
 
 WIDGET_GETTER ("max_value", int, gui2::slider)
 
 WIDGET_SETTER ("max_value", int, gui2::slider)
 
 WIDGET_GETTER ("maximum_value_label", t_string, gui2::slider)
 
 WIDGET_SETTER ("maximum_value_label", t_string, gui2::slider)
 
 WIDGET_GETTER ("min_value", int, gui2::slider)
 
 WIDGET_SETTER ("min_value", int, gui2::slider)
 
 WIDGET_GETTER ("minimum_value_label", t_string, gui2::slider)
 
 WIDGET_SETTER ("minimum_value_label", t_string, gui2::slider)
 
 WIDGET_GETTER ("value_compat,percentage", int, gui2::progress_bar)
 
 WIDGET_SETTER ("value_compat,percentage", int, gui2::progress_bar)
 
 WIDGET_GETTER ("value_compat,selected_item_path", std::vector< int >, gui2::tree_view)
 
 WIDGET_GETTER ("path", std::vector< int >, gui2::tree_view_node)
 
 WIDGET_GETTER ("unfolded", bool, gui2::tree_view)
 
 WIDGET_SETTER ("value_compat,unfolded", bool, gui2::tree_view)
 
 WIDGET_GETTER ("unfolded", bool, gui2::tree_view_node)
 
 WIDGET_SETTER ("value_compat,unfolded", bool, gui2::tree_view_node)
 
 WIDGET_SETTER ("value_compat,unit", lua_index_raw, gui2::unit_preview_pane)
 
 WIDGET_GETTER ("item_count", int, gui2::combobox)
 
 WIDGET_GETTER ("item_count", int, gui2::listbox)
 
 WIDGET_GETTER ("item_count", int, gui2::multi_page)
 
 WIDGET_GETTER ("item_count", int, gui2::stacked_widget)
 
 WIDGET_GETTER ("item_count", int, gui2::tree_view)
 
 WIDGET_GETTER ("item_count", int, gui2::tree_view_node)
 
 WIDGET_GETTER ("use_markup", bool, gui2::styled_widget)
 
 WIDGET_SETTER ("use_markup", bool, gui2::styled_widget)
 
 WIDGET_SETTER ("marked_up_text", t_string, gui2::styled_widget)
 
 WIDGET_GETTER ("characters_per_line", int, gui2::label)
 
 WIDGET_SETTER ("characters_per_line", int, gui2::label)
 
 WIDGET_GETTER ("editable", bool, gui2::text_box)
 
 WIDGET_SETTER ("editable", bool, gui2::text_box)
 
 WIDGET_GETTER ("ellipsize_mode", std::string, gui2::styled_widget)
 
 WIDGET_SETTER ("ellipsize_mode", std::string, gui2::styled_widget)
 
 WIDGET_GETTER ("enabled", bool, gui2::styled_widget)
 
 WIDGET_SETTER ("enabled", bool, gui2::styled_widget)
 
 WIDGET_GETTER ("help", t_string, gui2::styled_widget)
 
 WIDGET_SETTER ("help", t_string, gui2::styled_widget)
 
 WIDGET_GETTER ("hint_image", std::string, gui2::combobox)
 
 WIDGET_SETTER ("hint_image", std::string, gui2::combobox)
 
 WIDGET_GETTER ("hint_text", t_string, gui2::combobox)
 
 WIDGET_SETTER ("hint_text", t_string, gui2::combobox)
 
 WIDGET_GETTER ("hint_image", std::string, gui2::text_box)
 
 WIDGET_SETTER ("hint_image", std::string, gui2::text_box)
 
 WIDGET_GETTER ("hint_text", t_string, gui2::text_box)
 
 WIDGET_SETTER ("hint_text", t_string, gui2::text_box)
 
 WIDGET_SETTER ("history", std::string, gui2::text_box)
 
 WIDGET_GETTER ("indentation_step_size", int, gui2::tree_view)
 
 WIDGET_SETTER ("indentation_step_size", int, gui2::tree_view)
 
 WIDGET_GETTER ("link_aware", bool, gui2::label)
 
 WIDGET_SETTER ("link_aware", bool, gui2::label)
 
 WIDGET_GETTER ("link_aware", bool, gui2::rich_label)
 
 WIDGET_SETTER ("link_aware", bool, gui2::rich_label)
 
 WIDGET_GETTER ("link_aware", bool, gui2::scroll_label)
 
 WIDGET_SETTER ("link_aware", bool, gui2::scroll_label)
 
 WIDGET_GETTER ("link_aware", bool, gui2::scroll_text)
 
 WIDGET_SETTER ("link_aware", bool, gui2::scroll_text)
 
 WIDGET_GETTER ("link_color", std::string, gui2::label)
 
 WIDGET_GETTER ("link_color", std::string, gui2::rich_label)
 
 WIDGET_GETTER ("max_input_length", int, gui2::combobox)
 
 WIDGET_SETTER ("max_input_length", int, gui2::combobox)
 
 WIDGET_GETTER ("max_input_length", int, gui2::text_box)
 
 WIDGET_SETTER ("max_input_length", int, gui2::text_box)
 
 WIDGET_GETTER ("step_size", int, gui2::slider)
 
 WIDGET_SETTER ("step_size", int, gui2::slider)
 
 WIDGET_GETTER ("text_alignment", std::string, gui2::styled_widget)
 
 WIDGET_SETTER ("text_alignment", std::string, gui2::styled_widget)
 
 WIDGET_GETTER ("tooltip", t_string, gui2::styled_widget)
 
 WIDGET_SETTER ("tooltip", t_string, gui2::styled_widget)
 
 WIDGET_GETTER ("overflow_to_tooltip", bool, gui2::styled_widget)
 
 WIDGET_SETTER ("overflow_to_tooltip", bool, gui2::styled_widget)
 
 WIDGET_GETTER ("wrap", bool, gui2::label)
 
 WIDGET_SETTER ("wrap", bool, gui2::label)
 
 WIDGET_GETTER ("wrap", bool, gui2::rich_label)
 
 WIDGET_SETTER ("wrap", bool, gui2::rich_label)
 
 WIDGET_SETTER ("callback", lua_index_raw, gui2::widget)
 
 WIDGET_GETTER ("visible", std::string, gui2::styled_widget)
 
 WIDGET_SETTER ("visible", lua_index_raw, gui2::styled_widget)
 
 WIDGET_GETTER ("value_compat,label", t_string, gui2::styled_widget)
 
 WIDGET_SETTER ("value_compat,label", t_string, gui2::styled_widget)
 
 WIDGET_GETTER ("type", std::string, gui2::widget)
 
int lua_widget::impl_widget_get (lua_State *L)
 
int lua_widget::impl_widget_set (lua_State *L)
 
int lua_widget::impl_widget_dir (lua_State *L)
 

Variables

static lg::log_domain log_scripting_lua ("scripting/lua")
 
static tgetters getters
 
static tsetters setters
 

Macro Definition Documentation

◆ ERR_LUA

#define ERR_LUA   LOG_STREAM(err, log_scripting_lua)

Definition at line 57 of file lua_widget_attributes.cpp.

◆ WIDGET_GETTER

#define WIDGET_GETTER (   name,
  value_type,
  widgt_type 
)    WIDGET_GETTER4(name, value_type, widgt_type, __LINE__)
Parameters
namestring comma seperated list
value_typethe type of the attribute, for example int or std::string
widgt_typethe type of the widget, for example gui2::listbox

Definition at line 185 of file lua_widget_attributes.cpp.

◆ WIDGET_GETTER4

#define WIDGET_GETTER4 (   name,
  value_type,
  widgt_type,
  id 
)
Value:
struct BOOST_PP_CAT(getter_, id) : public lua_getter<widgt_type, value_type> { \
value_type get(lua_State* L, const widgt_type& w) const override; \
}; \
struct BOOST_PP_CAT(getter_adder_, id) { \
BOOST_PP_CAT(getter_adder_, id) () \
{ \
register_widget_attribute<widgt_type, value_type, BOOST_PP_CAT(getter_, id), false>(name); \
} \
}; \
static BOOST_PP_CAT(getter_adder_, id) BOOST_PP_CAT(getter_adder_instance_, id) ; \
value_type BOOST_PP_CAT(getter_, id)::get([[maybe_unused]] lua_State* L, const widgt_type& w) const
int w
std::string id
Text to match against addon_info.tags()
Definition: manager.cpp:198
CURSOR_TYPE get()
Definition: cursor.cpp:216

Definition at line 152 of file lua_widget_attributes.cpp.

◆ WIDGET_SETTER

#define WIDGET_SETTER (   name,
  value_type,
  widgt_type 
)    WIDGET_SETTER4(name, value_type, widgt_type, __LINE__)

Definition at line 187 of file lua_widget_attributes.cpp.

◆ WIDGET_SETTER4

#define WIDGET_SETTER4 (   name,
  value_type,
  widgt_type,
  id 
)
Value:
struct BOOST_PP_CAT(setter_, id) : public lua_setter<widgt_type, value_type> { \
void set(lua_State* L, widgt_type& w, const value_type& value) const override; \
}; \
struct BOOST_PP_CAT(setter_adder_, id) { \
BOOST_PP_CAT(setter_adder_, id) ()\
{ \
register_widget_attribute<widgt_type, value_type, BOOST_PP_CAT(setter_, id), true>(name); \
} \
}; \
static BOOST_PP_CAT(setter_adder_, id) BOOST_PP_CAT(setter_adder_instance_, id); \
void BOOST_PP_CAT(setter_, id)::set([[maybe_unused]] lua_State* L, widgt_type& w, const value_type& value) const
void set(CURSOR_TYPE type)
Use the default parameter to reset cursors.
Definition: cursor.cpp:176

Definition at line 166 of file lua_widget_attributes.cpp.

Typedef Documentation

◆ tgetters

using tgetters = std::map<std::string, std::vector<std::function<bool(lua_State*, gui2::widget&, bool)> >>

Definition at line 113 of file lua_widget_attributes.cpp.

◆ tsetters

using tsetters = std::map<std::string, std::vector<std::function<bool(lua_State*, int, gui2::widget&, bool)> >>

Definition at line 116 of file lua_widget_attributes.cpp.

Function Documentation

◆ find_child_by_index()

static gui2::widget* find_child_by_index ( gui2::widget w,
int  i 
)
static

◆ find_child_by_name()

static gui2::widget* find_child_by_name ( gui2::widget w,
const std::string &  m 
)
static

Definition at line 108 of file lua_widget_attributes.cpp.

References w.

Referenced by lua_widget::impl_widget_get().

◆ register_widget_attribute()

template<typename widget_type , typename value_type , typename action_type , bool setter>
void register_widget_attribute ( const char *  name)

Definition at line 120 of file lua_widget_attributes.cpp.

References getters, lua_push(), setter, setters, utils::split_foreach(), and w.

◆ try_invalidate_layout()

static void try_invalidate_layout ( gui2::widget w)
static

Definition at line 59 of file lua_widget_attributes.cpp.

References w.

Referenced by WIDGET_SETTER().

◆ WIDGET_GETTER() [1/51]

WIDGET_GETTER ( "best_slider_length"  ,
int  ,
gui2::slider   
)

Definition at line 268 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [2/51]

WIDGET_GETTER ( "characters_per_line"  ,
int  ,
gui2::label   
)

Definition at line 437 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [3/51]

WIDGET_GETTER ( "editable"  ,
bool  ,
gui2::text_box   
)

Definition at line 451 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [4/51]

WIDGET_GETTER ( "ellipsize_mode"  ,
std::string  ,
gui2::styled_widget   
)

Definition at line 461 of file lua_widget_attributes.cpp.

References gui2::encode_ellipsize_mode(), and w.

◆ WIDGET_GETTER() [5/51]

WIDGET_GETTER ( "enabled"  ,
bool  ,
gui2::styled_widget   
)

Definition at line 472 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [6/51]

WIDGET_GETTER ( "help"  ,
t_string  ,
gui2::styled_widget   
)

Definition at line 482 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [7/51]

WIDGET_GETTER ( "hint_image"  ,
std::string  ,
gui2::combobox   
)

Definition at line 492 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [8/51]

WIDGET_GETTER ( "hint_image"  ,
std::string  ,
gui2::text_box   
)

Definition at line 514 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [9/51]

WIDGET_GETTER ( "hint_text"  ,
t_string  ,
gui2::combobox   
)

Definition at line 503 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [10/51]

WIDGET_GETTER ( "hint_text"  ,
t_string  ,
gui2::text_box   
)

Definition at line 525 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [11/51]

WIDGET_GETTER ( "indentation_step_size"  ,
int  ,
gui2::tree_view   
)

Definition at line 541 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [12/51]

WIDGET_GETTER ( "item_count"  ,
int  ,
gui2::combobox   
)

Definition at line 386 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [13/51]

WIDGET_GETTER ( "item_count"  ,
int  ,
gui2::listbox   
)

Definition at line 391 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [14/51]

WIDGET_GETTER ( "item_count"  ,
int  ,
gui2::multi_page   
)

Definition at line 396 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [15/51]

WIDGET_GETTER ( "item_count"  ,
int  ,
gui2::stacked_widget   
)

Definition at line 401 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [16/51]

WIDGET_GETTER ( "item_count"  ,
int  ,
gui2::tree_view   
)

Definition at line 406 of file lua_widget_attributes.cpp.

References gui2::tree_view_node::count_children(), and w.

◆ WIDGET_GETTER() [17/51]

WIDGET_GETTER ( "item_count"  ,
int  ,
gui2::tree_view_node   
)

Definition at line 412 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [18/51]

WIDGET_GETTER ( "link_aware"  ,
bool  ,
gui2::label   
)

Definition at line 555 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [19/51]

WIDGET_GETTER ( "link_aware"  ,
bool  ,
gui2::rich_label   
)

Definition at line 566 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [20/51]

WIDGET_GETTER ( "link_aware"  ,
bool  ,
gui2::scroll_label   
)

Definition at line 577 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [21/51]

WIDGET_GETTER ( "link_aware"  ,
bool  ,
gui2::scroll_text   
)

Definition at line 588 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [22/51]

WIDGET_GETTER ( "link_color"  ,
std::string  ,
gui2::label   
)

Definition at line 599 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [23/51]

WIDGET_GETTER ( "link_color"  ,
std::string  ,
gui2::rich_label   
)

Definition at line 604 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [24/51]

WIDGET_GETTER ( "max_input_length"  ,
int  ,
gui2::combobox   
)

Definition at line 609 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [25/51]

WIDGET_GETTER ( "max_input_length"  ,
int  ,
gui2::text_box   
)

Definition at line 623 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [26/51]

WIDGET_GETTER ( "max_value"  ,
int  ,
gui2::slider   
)

Definition at line 281 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [27/51]

WIDGET_GETTER ( "maximum_value_label"  ,
t_string  ,
gui2::slider   
)

Definition at line 291 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [28/51]

WIDGET_GETTER ( "min_value"  ,
int  ,
gui2::slider   
)

Definition at line 302 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [29/51]

WIDGET_GETTER ( "minimum_value_label"  ,
t_string  ,
gui2::slider   
)

Definition at line 312 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [30/51]

WIDGET_GETTER ( "overflow_to_tooltip"  ,
bool  ,
gui2::styled_widget   
)

Definition at line 670 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [31/51]

WIDGET_GETTER ( "path"  ,
std::vector< int >  ,
gui2::tree_view_node   
)

Definition at line 340 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [32/51]

WIDGET_GETTER ( "selected_index"  ,
int  ,
gui2::selectable_item   
)

Definition at line 222 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [33/51]

WIDGET_GETTER ( "step_size"  ,
int  ,
gui2::slider   
)

Definition at line 637 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [34/51]

WIDGET_GETTER ( "text_alignment"  ,
std::string  ,
gui2::styled_widget   
)

Definition at line 650 of file lua_widget_attributes.cpp.

References gui2::encode_text_alignment(), and w.

◆ WIDGET_GETTER() [35/51]

WIDGET_GETTER ( "tooltip"  ,
t_string  ,
gui2::styled_widget   
)

Definition at line 660 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [36/51]

WIDGET_GETTER ( "type"  ,
std::string  ,
gui2::widget   
)

Definition at line 787 of file lua_widget_attributes.cpp.

References sw, and w.

◆ WIDGET_GETTER() [37/51]

WIDGET_GETTER ( "unfolded"  ,
bool  ,
gui2::tree_view   
)

Definition at line 347 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [38/51]

WIDGET_GETTER ( "unfolded"  ,
bool  ,
gui2::tree_view_node   
)

Definition at line 361 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [39/51]

WIDGET_GETTER ( "use_markup"  ,
bool  ,
gui2::styled_widget   
)

Definition at line 417 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [40/51]

WIDGET_GETTER ( value_compat,
label ,
t_string  ,
gui2::styled_widget   
)

Definition at line 772 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [41/51]

WIDGET_GETTER ( value_compat,
percentage"  ,
int  ,
gui2::progress_bar   
)

Definition at line 323 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [42/51]

WIDGET_GETTER ( value_compat,
selected"  ,
bool  ,
gui2::selectable_item   
)

Definition at line 235 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [43/51]

WIDGET_GETTER ( value_compat,
selected_index"  ,
int  ,
gui2::listbox   
)

CLASSIC.

Definition at line 192 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [44/51]

WIDGET_GETTER ( value_compat,
selected_index"  ,
int  ,
gui2::multi_page   
)

Definition at line 202 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [45/51]

WIDGET_GETTER ( value_compat,
selected_index"  ,
int  ,
gui2::stacked_widget   
)

Definition at line 212 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [46/51]

WIDGET_GETTER ( value_compat,
selected_item_path"  ,
std::vector< int >  ,
gui2::tree_view   
)

Definition at line 333 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [47/51]

WIDGET_GETTER ( value_compat,
text"  ,
std::string  ,
gui2::text_box   
)

Definition at line 248 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [48/51]

WIDGET_GETTER ( value_compat,
value"  ,
int  ,
gui2::slider   
)

Definition at line 258 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [49/51]

WIDGET_GETTER ( "visible"  ,
std::string  ,
gui2::styled_widget   
)

◆ WIDGET_GETTER() [50/51]

WIDGET_GETTER ( "wrap"  ,
bool  ,
gui2::label   
)

Definition at line 681 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_GETTER() [51/51]

WIDGET_GETTER ( "wrap"  ,
bool  ,
gui2::rich_label   
)

Definition at line 691 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [1/44]

WIDGET_SETTER ( "best_slider_length"  ,
int  ,
gui2::slider   
)

Definition at line 273 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [2/44]

WIDGET_SETTER ( "callback"  ,
lua_index_raw  ,
gui2::widget   
)

Definition at line 701 of file lua_widget_attributes.cpp.

References ERR_LUA, luaW_getglobal(), luaW_pushwidget(), and w.

◆ WIDGET_SETTER() [3/44]

WIDGET_SETTER ( "characters_per_line"  ,
int  ,
gui2::label   
)

Definition at line 442 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [4/44]

WIDGET_SETTER ( "editable"  ,
bool  ,
gui2::text_box   
)

Definition at line 456 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [5/44]

WIDGET_SETTER ( "ellipsize_mode"  ,
std::string  ,
gui2::styled_widget   
)

◆ WIDGET_SETTER() [6/44]

WIDGET_SETTER ( "enabled"  ,
bool  ,
gui2::styled_widget   
)

Definition at line 477 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [7/44]

WIDGET_SETTER ( "help"  ,
t_string  ,
gui2::styled_widget   
)

Definition at line 487 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [8/44]

WIDGET_SETTER ( "hint_image"  ,
std::string  ,
gui2::combobox   
)

Definition at line 497 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [9/44]

WIDGET_SETTER ( "hint_image"  ,
std::string  ,
gui2::text_box   
)

Definition at line 519 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [10/44]

WIDGET_SETTER ( "hint_text"  ,
t_string  ,
gui2::combobox   
)

Definition at line 508 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [11/44]

WIDGET_SETTER ( "hint_text"  ,
t_string  ,
gui2::text_box   
)

Definition at line 530 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [12/44]

WIDGET_SETTER ( "history"  ,
std::string  ,
gui2::text_box   
)

Definition at line 536 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [13/44]

WIDGET_SETTER ( "indentation_step_size"  ,
int  ,
gui2::tree_view   
)

Definition at line 546 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [14/44]

WIDGET_SETTER ( "link_aware"  ,
bool  ,
gui2::label   
)

Definition at line 560 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [15/44]

WIDGET_SETTER ( "link_aware"  ,
bool  ,
gui2::rich_label   
)

Definition at line 571 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [16/44]

WIDGET_SETTER ( "link_aware"  ,
bool  ,
gui2::scroll_label   
)

Definition at line 582 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [17/44]

WIDGET_SETTER ( "link_aware"  ,
bool  ,
gui2::scroll_text   
)

Definition at line 593 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [18/44]

WIDGET_SETTER ( "marked_up_text"  ,
t_string  ,
gui2::styled_widget   
)

Definition at line 431 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [19/44]

WIDGET_SETTER ( "max_input_length"  ,
int  ,
gui2::combobox   
)

Definition at line 614 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [20/44]

WIDGET_SETTER ( "max_input_length"  ,
int  ,
gui2::text_box   
)

Definition at line 628 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [21/44]

WIDGET_SETTER ( "max_value"  ,
int  ,
gui2::slider   
)

Definition at line 286 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [22/44]

WIDGET_SETTER ( "maximum_value_label"  ,
t_string  ,
gui2::slider   
)

Definition at line 296 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [23/44]

WIDGET_SETTER ( "min_value"  ,
int  ,
gui2::slider   
)

Definition at line 307 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [24/44]

WIDGET_SETTER ( "minimum_value_label"  ,
t_string  ,
gui2::slider   
)

Definition at line 317 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [25/44]

WIDGET_SETTER ( "overflow_to_tooltip"  ,
bool  ,
gui2::styled_widget   
)

Definition at line 675 of file lua_widget_attributes.cpp.

References try_invalidate_layout(), and w.

◆ WIDGET_SETTER() [26/44]

WIDGET_SETTER ( "selected_index"  ,
int  ,
gui2::selectable_item   
)

Definition at line 227 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [27/44]

WIDGET_SETTER ( "step_size"  ,
int  ,
gui2::slider   
)

Definition at line 642 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [28/44]

WIDGET_SETTER ( "text_alignment"  ,
std::string  ,
gui2::styled_widget   
)

Definition at line 655 of file lua_widget_attributes.cpp.

References gui2::decode_text_alignment(), and w.

◆ WIDGET_SETTER() [29/44]

WIDGET_SETTER ( "tooltip"  ,
t_string  ,
gui2::styled_widget   
)

Definition at line 665 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [30/44]

WIDGET_SETTER ( "use_markup"  ,
bool  ,
gui2::styled_widget   
)

Definition at line 422 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [31/44]

WIDGET_SETTER ( value_compat,
label ,
t_string  ,
gui2::styled_widget   
)

Definition at line 778 of file lua_widget_attributes.cpp.

References gui2::window::invalidate_layout(), and w.

◆ WIDGET_SETTER() [32/44]

WIDGET_SETTER ( value_compat,
percentage"  ,
int  ,
gui2::progress_bar   
)

Definition at line 328 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [33/44]

WIDGET_SETTER ( value_compat,
selected"  ,
bool  ,
gui2::selectable_item   
)

Definition at line 243 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [34/44]

WIDGET_SETTER ( value_compat,
selected_index"  ,
int  ,
gui2::listbox   
)

Definition at line 197 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [35/44]

WIDGET_SETTER ( value_compat,
selected_index"  ,
int  ,
gui2::multi_page   
)

Definition at line 207 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [36/44]

WIDGET_SETTER ( value_compat,
selected_index"  ,
int  ,
gui2::stacked_widget   
)

Definition at line 217 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [37/44]

WIDGET_SETTER ( value_compat,
text"  ,
std::string  ,
gui2::text_box   
)

Definition at line 253 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [38/44]

WIDGET_SETTER ( value_compat,
unfolded"  ,
bool  ,
gui2::tree_view   
)

Definition at line 352 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [39/44]

WIDGET_SETTER ( value_compat,
unfolded"  ,
bool  ,
gui2::tree_view_node   
)

Definition at line 366 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [40/44]

WIDGET_SETTER ( value_compat,
unit ,
lua_index_raw  ,
gui2::unit_preview_pane   
)

Definition at line 375 of file lua_widget_attributes.cpp.

References luaW_tounit(), luaW_tounittype(), luaW_type_error(), and w.

◆ WIDGET_SETTER() [41/44]

WIDGET_SETTER ( value_compat,
value"  ,
int  ,
gui2::slider   
)

Definition at line 263 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [42/44]

WIDGET_SETTER ( "visible"  ,
lua_index_raw  ,
gui2::styled_widget   
)

◆ WIDGET_SETTER() [43/44]

WIDGET_SETTER ( "wrap"  ,
bool  ,
gui2::label   
)

Definition at line 686 of file lua_widget_attributes.cpp.

References w.

◆ WIDGET_SETTER() [44/44]

WIDGET_SETTER ( "wrap"  ,
bool  ,
gui2::rich_label   
)

Definition at line 696 of file lua_widget_attributes.cpp.

References w.

Variable Documentation

◆ getters

tgetters getters
static

◆ log_scripting_lua

lg::log_domain log_scripting_lua("scripting/lua") ( "scripting/lua"  )
static

◆ setters

tsetters setters
static