Contains the info needed to instantiate a widget. More...
#include <window_builder.hpp>
Public Types | |
using | replacements_map = std::map< std::string, std::shared_ptr< builder_widget > > |
The replacements type is used to define replacement types. More... | |
using | optional_replacements = utils::optional_reference< const replacements_map > |
Public Member Functions | |
builder_widget (const config &cfg) | |
virtual | ~builder_widget () |
virtual std::unique_ptr< widget > | build () const =0 |
virtual std::unique_ptr< widget > | build (const replacements_map &replacements) const =0 |
Public Attributes | |
std::string | id |
Parameters for the widget. More... | |
std::string | linked_group |
widget::debug_border | debug_border_mode |
color_t | debug_border_color |
Contains the info needed to instantiate a widget.
Definition at line 32 of file window_builder.hpp.
using gui2::builder_widget::optional_replacements = utils::optional_reference<const replacements_map> |
Definition at line 48 of file window_builder.hpp.
using gui2::builder_widget::replacements_map = std::map<std::string, std::shared_ptr<builder_widget> > |
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 42 of file window_builder.hpp.
|
explicit |
Definition at line 36 of file window_builder.cpp.
References debug_border_mode, gui2::widget::fill, gui2::widget::none, gui2::widget::outline, and WRN_GUI_P.
|
inlinevirtual |
Definition at line 52 of file window_builder.hpp.
|
pure virtual |
Implemented in gui2::implementation::builder_window, gui2::implementation::builder_viewport, gui2::implementation::builder_vertical_scrollbar, gui2::implementation::builder_unit_preview_pane, gui2::implementation::builder_tree_view, gui2::implementation::builder_toggle_panel, gui2::implementation::builder_toggle_button, gui2::implementation::builder_text_box, gui2::implementation::builder_tab_container, gui2::implementation::builder_stacked_widget, gui2::implementation::builder_spinner, gui2::implementation::builder_spacer, gui2::implementation::builder_slider, gui2::implementation::builder_size_lock, gui2::implementation::builder_scrollbar_panel, gui2::implementation::builder_scroll_text, gui2::implementation::builder_scroll_label, gui2::implementation::builder_rich_label, gui2::implementation::builder_repeating_button, gui2::implementation::builder_progress_bar, gui2::implementation::builder_password_box, gui2::implementation::builder_panel, gui2::implementation::builder_pane, gui2::implementation::builder_multimenu_button, gui2::implementation::builder_multiline_text, gui2::implementation::builder_multi_page, gui2::implementation::builder_minimap, gui2::implementation::builder_menu_button, gui2::implementation::builder_matrix, gui2::implementation::builder_listbox_base, gui2::implementation::builder_label, gui2::implementation::builder_image, gui2::implementation::builder_horizontal_scrollbar, gui2::implementation::builder_drawing, gui2::implementation::builder_combobox, gui2::implementation::builder_chatbox, gui2::implementation::builder_button, gui2::implementation::builder_addon_list, gui2::implementation::builder_instance, and gui2::builder_grid.
Referenced by gui2::size_lock::finalize().
|
pure virtual |
color_t gui2::builder_widget::debug_border_color |
Definition at line 65 of file window_builder.hpp.
widget::debug_border gui2::builder_widget::debug_border_mode |
Definition at line 64 of file window_builder.hpp.
Referenced by builder_widget().
std::string gui2::builder_widget::id |
Parameters for the widget.
Definition at line 61 of file window_builder.hpp.
std::string gui2::builder_widget::linked_group |
Definition at line 62 of file window_builder.hpp.
Referenced by gui2::builder_grid::build().