15 #define GETTEXT_DOMAIN "wesnoth-lib" 32 #ifdef GUI2_EXPERIMENTAL_LISTBOX 33 #include "gui/widgets/list.hpp" 46 : initial_topic_("introduction")
53 tree_view& topic_tree = find_widget<tree_view>(&window,
"topic_tree",
false);
54 multi_page& topic_pages = find_widget<multi_page>(&window,
"topic_text_pages",
false);
59 window.keyboard_capture(&topic_tree);
64 std::map<std::string, string_map> data;
67 item[
"label"] = topic[
"title"];
68 data.emplace(
"topic_name", item);
76 item[
"label"] = topic[
"text"].empty() ?
"" : topic[
"text"].str();
77 data.emplace(
"topic_text", item);
79 topic_pages.add_page(data);
102 find_widget<multi_page>(
get_window(),
"topic_text_pages",
false).select_page(topic_i);
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
child_itors child_range(config_key_type key)
tree_view_node * selected_item()
window * get_window() const
Returns a pointer to the dialog's window.
To lexical_cast(From value)
Lexical cast converts one type to another.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
void connect_signal_notify_modified(dispatcher &dispatcher, const signal_notification_function &signal)
Connects a signal handler for getting a notification upon modification.
This file contains the settings handling of the widget library.
A tree view is a control that holds several items of the same or different types. ...
Game configuration data as global variables.
A multi page is a control that contains several 'pages' of which only one is visible.
base class of top level items, the only item which needs to store the final canvases to draw on...
tree_view_node & add_node(const std::string &id, const std::map< std::string, string_map > &data, const int index=-1)
std::pair< std::string, unsigned > item