15 #ifndef GUI_WIDGETS_PANE_HPP_INCLUDED
16 #define GUI_WIDGETS_PANE_HPP_INCLUDED
49 std::map<std::string, std::string>
tags;
70 unsigned create_item(
const std::map<std::string, string_map>& item_data,
71 const std::map<std::string, std::string>& tags);
82 int y_offset)
override;
87 const std::vector<twidget*>& call_stack)
override;
94 const bool must_be_active)
override;
98 const bool must_be_active)
const override;
105 void sort(
const tcompare_functor& compare_functor);
116 void filter(
const tfilter_functor& filter_functor);
151 const tgrid*
grid(
const unsigned id)
const;
Base class for the placement helper.
std::map< std::string, t_string > string_map
void filter(const tfilter_functor &filter_functor)
Filters the contents of the pane.
static tpane * build(const implementation::tbuilder_pane &builder)
virtual void place(const tpoint &origin, const tpoint &size) override
See twidget::place.
virtual void impl_draw_children(surface &frame_buffer, int x_offset, int y_offset) override
See twidget::impl_draw_children.
Helper to implement private functions without modifying the header.
void prepare_placement() const
Updates the placement for the child items.
std::function< bool(const titem &, const titem &)> tcompare_functor
virtual iterator::twalker_ * create_walker() override
See twidget::create_walker.
virtual tpoint calculate_best_size() const override
See twidget::calculate_best_size.
void signal_handler_request_placement(tdispatcher &dispatcher, const event::tevent event, bool &handled)
unsigned create_item(const std::map< std::string, string_map > &item_data, const std::map< std::string, std::string > &tags)
Creates a new item.
tgrid * grid(const unsigned id)
Returns a grid in the pane.
base class of top level items, the only item which needs to store the final canvases to draw on ...
A class inherited from ttext_box that displays its input as stars.
tpane(const tbuilder_grid_ptr item_builder)
tbuilder_grid_ptr item_builder_
The builer for the items in the list.
virtual twidget * find_at(const tpoint &coordinate, const bool must_be_active) override
See twidget::find_at.
std::list< titem > items_
The items in the pane.
virtual void child_populate_dirty_list(twindow &caller, const std::vector< twidget * > &call_stack) override
See twidget::child_populate_dirty_list.
tevent
The event send to the dispatcher.
std::function< bool(const titem &)> tfilter_functor
void set_origin_children()
Moves the children on the pane.
tbuilder_pane(const config &cfg)
std::map< std::string, std::string > tags
std::unique_ptr< tplacer_ > placer_
Helper to do the placement.
void place_or_set_origin_children()
Places or moves the children on the pane.
The walker abstract base class.
virtual void request_reduce_width(const unsigned maximum_width) override
See twidget::request_reduce_width.
A config object defines a single node in a WML file, with access to child nodes.
void place_children()
Places the children on the pane.
bool disable_click_dismiss() const override
See twidget::disable_click_dismiss.
Contains the implementation details for lexical_cast and shouldn't be used directly.
void sort(const tcompare_functor &compare_functor)
Sorts the contents of the pane.
virtual void layout_initialise(const bool full_initialisation) override
See twidget::layout_initialise.
tplacer_::tgrow_direction grow_direction
unsigned item_id_generator_
The id generator for the items.
tbuilder_grid_ptr item_definition