15 #define GETTEXT_DOMAIN "wesnoth-lib" 
   38     , last_real_advancement_(real)
 
   44     listbox& list = find_widget<listbox>(
"advance_choice");
 
   51         find_widget<button>(
"show_help"),
 
   60         std::string image_string, name = sample.
type_name();
 
   66             const auto& back = range.back();
 
   68             if(back.has_attribute(
"image")) {
 
   69                 image_string = back[
"image"].str();
 
   72             name = back[
"description"].str();
 
   75         if(image_string.empty()) {
 
   79         column[
"label"] = image_string;
 
   80         row_data.emplace(
"advancement_image", column);
 
   82         column[
"label"] = name;
 
   83         row_data.emplace(
"advancement_name", column);
 
   96     const int selected_row
 
   97         = find_widget<listbox>(
"advance_choice").get_selected_row();
 
   99     if(selected_row == -1) {
 
  103     find_widget<unit_preview_pane>(
"advancement_details")
 
  104         .set_display_data(*
previews_[selected_row]);
 
child_itors child_range(std::string_view key)
 
Abstract base class for all modal dialogs.
 
std::size_t last_real_advancement_
 
const std::vector< unit_const_ptr > & previews_
 
virtual void pre_show() override
Actions to be taken before showing the window.
 
std::size_t selected_index_
 
virtual void post_show() override
Actions to be taken after the window has been shown.
 
grid & add_row(const widget_item &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
 
void keyboard_capture(widget *widget)
 
void set_escape_disabled(const bool escape_disabled)
Disable the escape key.
 
const std::string & image() const
 
This class represents a single unit of a specific type.
 
const t_string & type_name() const
Gets the translatable name of this unit's type.
 
const unit_type & type() const
This unit's type, accounting for gender and variation.
 
std::string image_mods() const
Gets an IPF string containing all IPF image mods.
 
config & get_modifications()
Get the raw modifications.
 
REGISTER_DIALOG(editor_edit_unit)
 
void connect_signal_notify_modified(dispatcher &dispatcher, const signal_notification &signal)
Connects a signal handler for getting a notification upon modification.
 
void connect_signal_mouse_left_click(dispatcher &dispatcher, const signal &signal)
Connects a signal handler for a left mouse button click.
 
std::map< std::string, widget_item > widget_data
 
std::map< std::string, t_string > widget_item
 
@ OK
Dialog was closed with the OK button.
 
void show_help(const std::string &show_topic)
Open the help browser, show topic with id show_topic.
 
std::shared_ptr< const unit > unit_const_ptr