27 struct builder_tab_container;
47 virtual unsigned get_state()
const override;
91 std::vector<std::shared_ptr<builder_grid>>
builders_;
117 static const std::string&
type();
152 virtual std::unique_ptr<widget>
build()
const override;
154 std::vector<std::shared_ptr<builder_grid>>
builders;
A config object defines a single node in a WML file, with access to child nodes.
A generic container base class.
Abstract base class for the generator.
virtual grid & item(const unsigned index)=0
Gets the grid of an item.
Basic template class to generate new items.
int get_selected_row() const
Returns the first selected row.
A container widget that shows one of its pages of widgets depending on which tab the user clicked.
state_t state_
Current state of the widget.
state_t
Possible states of the widget.
virtual unsigned get_state() const override
Returns the id of the state.
void finalize(std::unique_ptr< generator_base > generator)
Finishes the building initialization of the widget.
static const std::string & type()
Static type getter that does not rely on the widget being constructed.
const grid * get_tab_grid(unsigned i) const
generator_base * generator_
Contains a pointer to the generator.
virtual bool get_active() const override
Gets the active state of the styled_widget.
unsigned get_tab_count() const
grid * get_tab_grid(unsigned i)
virtual void set_self_active(const bool active) override
Helper for set_active.
bool can_wrap() const override
See widget::can_wrap.
std::vector< std::shared_ptr< builder_grid > > builders_
void add_tab_entry(const widget_data row)
void select_tab(unsigned index)
std::vector< widget_data > list_items_
listbox & get_internal_list()
Get the listbox inside which the tabs are shown.
virtual const std::string & get_control_type() const override
Inherited from styled_widget, implemented by REGISTER_WIDGET.
tab_container(const implementation::builder_tab_container &builder)
unsigned get_active_tab_index()
std::shared_ptr< builder_grid > builder_grid_ptr
std::map< std::string, widget_item > widget_data
Contains the implementation details for lexical_cast and shouldn't be used directly.
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
builder_tab_container(const config &cfg)
virtual std::unique_ptr< widget > build() const override
std::vector< widget_data > list_items
std::vector< std::shared_ptr< builder_grid > > builders
resolution(const config &cfg)
tab_container_definition(const config &cfg)