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

Classes

struct  tbuilder_button
 
struct  tbuilder_combobox
 
struct  tbuilder_control
 
struct  tbuilder_drawing
 
struct  tbuilder_horizontal_listbox
 
struct  tbuilder_horizontal_scrollbar
 
struct  tbuilder_image
 
struct  tbuilder_instance
 
struct  tbuilder_label
 
struct  tbuilder_listbox
 
struct  tbuilder_matrix
 
struct  tbuilder_minimap
 
struct  tbuilder_multi_page
 
struct  tbuilder_pane
 
struct  tbuilder_panel
 
struct  tbuilder_password_box
 
struct  tbuilder_progress_bar
 
struct  tbuilder_repeating_button
 
struct  tbuilder_scroll_label
 
struct  tbuilder_scrollbar_panel
 
struct  tbuilder_slider
 
struct  tbuilder_spacer
 
struct  tbuilder_stacked_widget
 
struct  tbuilder_text_box
 
struct  tbuilder_toggle_button
 
struct  tbuilder_toggle_panel
 
struct  tbuilder_tree_view
 
struct  tbuilder_unit_preview_pane
 
struct  tbuilder_vertical_scrollbar
 
struct  tbuilder_viewport
 
class  tbuilder_window
 
class  tplacer_horizontal_list
 The placement class for a horizontal list. More...
 
class  tplacer_vertical_list
 The placement class for a vertical list. More...
 
struct  ttree_node
 

Functions

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...
 
tscrollbar_container::tscrollbar_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...
 

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 60 of file helper.cpp.

References gui2::tgrid::BORDER_ALL, gui2::tgrid::BORDER_BOTTOM, gui2::tgrid::BORDER_LEFT, gui2::tgrid::BORDER_RIGHT, and gui2::tgrid::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 45 of file helper.cpp.

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

Referenced by read_flags().

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 131 of file helper.cpp.

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

Referenced by gui2::implementation::tbuilder_button::build(), gui2::implementation::tbuilder_toggle_button::build(), gui2::implementation::tbuilder_combobox::build(), and gui2::implementation::tbuilder_toggle_panel::build().

tscrollbar_container::tscrollbar_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 114 of file helper.cpp.

References gui2::tscrollbar_container::always_invisible, gui2::tscrollbar_container::always_visible, gui2::tscrollbar_container::auto_visible, gui2::tscrollbar_container::auto_visible_first_run, and ERR_GUI_E.

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 30 of file helper.cpp.

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

Referenced by read_flags().

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 80 of file helper.cpp.

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

Referenced by gui2::tbuilder_grid::tbuilder_grid().