The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Typedefs | Functions | Variables
gui2::implementation Namespace Reference

Classes

struct  builder_addon_list
 
struct  builder_button
 
struct  builder_chatbox
 
struct  builder_drawing
 
struct  builder_grid_listbox
 
struct  builder_horizontal_listbox
 
struct  builder_horizontal_scrollbar
 
struct  builder_image
 
struct  builder_instance
 
struct  builder_label
 
struct  builder_listbox
 
struct  builder_matrix
 
struct  builder_menu_button
 
struct  builder_minimap
 
struct  builder_multi_page
 
struct  builder_multimenu_button
 
struct  builder_pane
 
struct  builder_panel
 
struct  builder_password_box
 
struct  builder_progress_bar
 
struct  builder_repeating_button
 
struct  builder_scroll_label
 
struct  builder_scrollbar_panel
 
struct  builder_size_lock
 
struct  builder_slider
 
struct  builder_spacer
 
struct  builder_stacked_widget
 
struct  builder_styled_widget
 
struct  builder_text_box
 
struct  builder_toggle_button
 
struct  builder_toggle_panel
 
struct  builder_tree_view
 
struct  builder_unit_preview_pane
 
struct  builder_vertical_scrollbar
 
struct  builder_viewport
 
class  builder_window
 
class  placer_horizontal_list
 The placement class for a horizontal list. More...
 
class  placer_vertical_list
 The placement class for a vertical list. More...
 
struct  tree_node
 

Typedefs

using scrollbar_mode = scrollbar_container::scrollbar_mode
 

Functions

static std::map< std::string,
scrollbar_mode > unsigned 
get_v_align (const std::string &v_align)
 Returns the vertical alignment. More...
 
unsigned get_h_align (const std::string &h_align)
 Returns the horizontal alignment. More...
 
unsigned get_border (const std::vector< std::string > &borders)
 Returns the border flags. More...
 
unsigned read_flags (const config &cfg)
 Returns the placement/resize flags. More...
 
scrollbar_mode get_scrollbar_mode (const std::string &scrollbar_mode)
 Returns the scrollbar mode flags. More...
 
int get_retval (const std::string &retval_id, const int retval, const std::string &id)
 Returns the return value for a widget. More...
 
static widget::visibility parse_visibility (const std::string &str)
 
static std::vector< std::map
< std::string, string_map > > 
parse_list_data (const config &data, const unsigned int req_cols)
 

Variables

static std::map< std::string,
scrollbar_mode
scrollbar_mode_map { "always", scrollbar_mode::ALWAYS_VISIBLE }
 

Typedef Documentation

Definition at line 30 of file helper.hpp.

Function Documentation

unsigned gui2::implementation::get_border ( const std::vector< std::string > &  borders)

Returns the border flags.

Parameters
bordersThe string representing the border flags.
Returns
The border flags.

Definition at line 67 of file helper.cpp.

References gui2::grid::BORDER_ALL, gui2::grid::BORDER_BOTTOM, gui2::grid::BORDER_LEFT, gui2::grid::BORDER_RIGHT, and gui2::grid::BORDER_TOP.

Referenced by read_flags().

unsigned gui2::implementation::get_h_align ( const std::string &  h_align)

Returns the horizontal alignment.

Parameters
h_alignThe string representing the alignment.
Returns
The alignment.

Definition at line 52 of file helper.cpp.

References ERR_GUI_E, gui2::grid::HORIZONTAL_ALIGN_CENTER, gui2::grid::HORIZONTAL_ALIGN_LEFT, and gui2::grid::HORIZONTAL_ALIGN_RIGHT.

Referenced by read_flags(), and gui2::widget::set_horizontal_alignment().

int gui2::implementation::get_retval ( const std::string &  retval_id,
const int  retval,
const std::string &  id 
)

Returns the return value for a widget.

If there's a valid retval_id that will be returned. Else if there's a retval that's returned. Else it falls back to the id.

Definition at line 136 of file helper.cpp.

References ERR_GUI_E, and gui2::window::get_retval_by_id().

Referenced by gui2::implementation::builder_button::build(), gui2::implementation::builder_toggle_button::build(), gui2::implementation::builder_menu_button::build(), gui2::implementation::builder_toggle_panel::build(), and gui2::implementation::builder_multimenu_button::build().

scrollbar_mode gui2::implementation::get_scrollbar_mode ( const std::string &  scrollbar_mode)

Returns the scrollbar mode flags.

Parameters
scrollbar_modeThe string representing the scrollbar_mode.
Returns
The scrollbar mode flags.

Definition at line 120 of file helper.cpp.

References gui2::scrollbar_container::AUTO_VISIBLE_FIRST_RUN, ERR_GUI_E, and scrollbar_mode_map.

unsigned gui2::implementation::get_v_align ( const std::string &  v_align)

Returns the vertical alignment.

Parameters
v_alignThe string representing the alignment.
Returns
The alignment.

Definition at line 37 of file helper.cpp.

References ERR_GUI_E, gui2::grid::VERTICAL_ALIGN_BOTTOM, gui2::grid::VERTICAL_ALIGN_CENTER, and gui2::grid::VERTICAL_ALIGN_TOP.

Referenced by read_flags(), and gui2::widget::set_vertical_alignment().

static std::vector<std::map<std::string, string_map> > gui2::implementation::parse_list_data ( const config data,
const unsigned int  req_cols 
)
static
static widget::visibility gui2::implementation::parse_visibility ( const std::string &  str)
static
unsigned gui2::implementation::read_flags ( const config cfg)

Returns the placement/resize flags.

Parameters
cfgThe config to look for flags for.
Returns
The placement/resize flags.

Definition at line 87 of file helper.cpp.

References ERR_GUI_P, get_border(), get_h_align(), get_v_align(), gui2::grid::HORIZONTAL_GROW_SEND_TO_CLIENT, utils::split(), and gui2::grid::VERTICAL_GROW_SEND_TO_CLIENT.

Referenced by gui2::builder_grid::builder_grid().

Variable Documentation

std::map<std::string, scrollbar_mode> gui2::implementation::scrollbar_mode_map { "always", scrollbar_mode::ALWAYS_VISIBLE }
static

Definition at line 31 of file helper.cpp.

Referenced by get_scrollbar_mode().