15 #define GETTEXT_DOMAIN "wesnoth-lib"
22 #ifdef GUI2_EXPERIMENTAL_LISTBOX
75 const int selected_row
76 = find_widget<tlistbox>(&window,
"core_list",
false)
80 = find_widget<tmulti_page>(&window,
"core_details",
false);
88 tlistbox& list = find_widget<tlistbox>(&window,
"core_list",
false);
89 #ifdef GUI2_EXPERIMENTAL_LISTBOX
100 window.keyboard_capture(&list);
104 = find_widget<tmulti_page>(&window,
"core_details",
false);
106 for(
const auto & core :
cores_)
110 std::map<std::string, string_map> list_item_item;
112 list_item[
"label"] = core[
"image"];
113 list_item_item.insert(std::make_pair(
"image", list_item));
115 list_item[
"label"] = core[
"name"];
116 list_item_item.insert(std::make_pair(
"name", list_item));
125 std::map<std::string, string_map> detail_page;
127 detail_item[
"label"] = core[
"description"];
128 detail_item[
"use_markup"] =
"true";
129 detail_page.insert(std::make_pair(
"description", detail_item));
140 choice_ = find_widget<tlistbox>(&window,
"core_list",
false)
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
const std::vector< config > & cores_
Contains the config objects for all cores.
void core_selected(twindow &window)
Called when another core is selected.
void connect_signal_notify_modified(tdispatcher &dispatcher, const tsignal_notification_function &signal)
Connects a signal handler for getting a notification upon modification.
void pre_show(twindow &window)
Inherited from tdialog.
bool select_row(const unsigned row, const bool select=true)
Selectes a row.
REGISTER_DIALOG(label_settings)
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.
unsigned get_item_count() const
Returns the number of items in the listbox.
void add_row(const string_map &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
void add_page(const string_map &item)
Adds single page to the grid.
int choice_
The chosen core.
std::map< std::string, t_string > string_map
void select_page(const unsigned page, const bool select=true)
Selectes a page.
void post_show(twindow &window)
Inherited from tdialog.
void set_callback_value_change(const std::function< void(twidget &)> &callback)
void dialog_callback(twidget &caller)
Template for dialog callbacks.
const tgrid * get_row_grid(const unsigned row) const
Returns the grid of the wanted row.