The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | List of all members
gui2::builder_widget Struct Referenceabstract

Contains the info needed to instantiate a widget. More...

#include <window_builder.hpp>

Inheritance diagram for gui2::builder_widget:
Inheritance graph

Public Types

typedef std::map< std::string,
std::shared_ptr
< builder_widget > > 
replacements_map
 The replacements type is used to define replacement types. More...
 

Public Member Functions

 builder_widget (const config &cfg)
 
virtual ~builder_widget ()
 
virtual widgetbuild () const =0
 
virtual widgetbuild (const replacements_map &replacements) const =0
 

Public Attributes

std::string id
 Parameters for the widget. More...
 
std::string linked_group
 
int debug_border_mode
 
color_t debug_border_color
 

Detailed Description

Contains the info needed to instantiate a widget.

Definition at line 40 of file window_builder.hpp.

Member Typedef Documentation

typedef std::map<std::string, std::shared_ptr<builder_widget> > gui2::builder_widget::replacements_map

The replacements type is used to define replacement types.

Certain widgets need to build a part of themselves upon instantiation but at the time of the definition it's not yet known what exactly. By using and `[instance]' widget this decision can be postponed until instantiation.

Definition at line 51 of file window_builder.hpp.

Constructor & Destructor Documentation

gui2::builder_widget::builder_widget ( const config cfg)
explicit

Definition at line 95 of file window_builder.cpp.

virtual gui2::builder_widget::~builder_widget ( )
inlinevirtual

Definition at line 55 of file window_builder.hpp.

Member Function Documentation

virtual widget* gui2::builder_widget::build ( ) const
pure virtual

Implemented in gui2::implementation::builder_grid_listbox, gui2::implementation::builder_horizontal_listbox, gui2::implementation::builder_listbox, gui2::implementation::builder_text_box, gui2::implementation::builder_chatbox, gui2::implementation::builder_matrix, gui2::implementation::builder_slider, gui2::implementation::builder_multi_page, gui2::implementation::builder_multimenu_button, gui2::implementation::builder_toggle_panel, gui2::implementation::builder_pane, gui2::implementation::builder_tree_view, gui2::implementation::builder_addon_list, gui2::implementation::builder_stacked_widget, gui2::implementation::builder_label, gui2::implementation::builder_menu_button, gui2::implementation::builder_toggle_button, gui2::builder_grid, gui2::implementation::builder_button, gui2::implementation::builder_repeating_button, gui2::implementation::builder_scroll_label, gui2::implementation::builder_minimap, gui2::implementation::builder_unit_preview_pane, gui2::implementation::builder_drawing, gui2::implementation::builder_image, gui2::implementation::builder_size_lock, gui2::implementation::builder_spacer, gui2::implementation::builder_viewport, gui2::implementation::builder_horizontal_scrollbar, gui2::implementation::builder_panel, gui2::implementation::builder_vertical_scrollbar, gui2::implementation::builder_window, gui2::implementation::builder_progress_bar, gui2::implementation::builder_scrollbar_panel, gui2::implementation::builder_password_box, and gui2::implementation::builder_instance.

Referenced by gui2::implementation::builder_styled_widget::build().

virtual widget* gui2::builder_widget::build ( const replacements_map replacements) const
pure virtual

Member Data Documentation

color_t gui2::builder_widget::debug_border_color

Definition at line 68 of file window_builder.hpp.

int gui2::builder_widget::debug_border_mode

Definition at line 67 of file window_builder.hpp.

std::string gui2::builder_widget::id

Parameters for the widget.

Definition at line 64 of file window_builder.hpp.

std::string gui2::builder_widget::linked_group

Definition at line 65 of file window_builder.hpp.

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


The documentation for this struct was generated from the following files: