The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Classes | Typedefs | Functions | Variables
gui2::dialogs Namespace Reference

Namespaces

 tip
 

Classes

class  addon_connect
 Addon connect dialog. More...
 
class  addon_manager
 Shows the list of addons on the server. More...
 
class  addon_uninstall_list
 
class  advanced_graphics_options
 
class  attack_predictions
 
class  bookmark_create
 
class  campaign_difficulty
 
class  campaign_selection
 
class  chat_log
 
class  core_selection
 
class  custom_tod
 
class  debug_clock
 Clock to test the draw events. More...
 
class  depcheck_confirm_change
 
class  depcheck_select_new
 
class  drop_down_menu
 Used by the menu_button widget. More...
 
class  edit_label
 
class  edit_text
 
class  editor_edit_label
 
class  editor_edit_scenario
 
class  editor_edit_side
 
class  editor_generate_map
 The dialog for selecting which random generator to use in the editor. More...
 
class  editor_new_map
 
class  editor_resize_map
 
class  editor_set_starting_position
 
class  end_credits
 
class  event_mode_controller
 
class  faction_select
 
class  file_dialog
 
class  folder_create
 
class  formula_debugger
 
class  game_cache_options
 
class  game_delete
 
class  game_load
 
class  game_save
 
class  game_save_message
 
class  game_save_oos
 
class  game_stats
 
class  game_version
 
class  gamestate_inspector
 
class  generator_settings
 
class  help_browser
 Help browser dialog. More...
 
class  hotkey_bind
 
class  install_dependencies
 
class  label_settings
 
class  language_selection
 
class  loading_screen
 
struct  lobby_delay_gamelist_update_guard
 
class  lobby_player_info
 
class  log_settings
 
class  lua_interpreter
 
class  message
 Main class to show messages to the user. More...
 
struct  message_implementation
 Helper to implement private functions without modifying the header. More...
 
class  modal_dialog
 Abstract base class for all modal dialogs. More...
 
class  modeless_dialog
 The popup class shows windows that are shown non-modal. More...
 
class  mp_alerts_options
 
class  mp_change_control
 
class  mp_connect
 
class  mp_create_game
 
class  mp_host_game_prompt
 
class  mp_join_game
 
class  mp_join_game_password_prompt
 
class  mp_lobby
 
class  mp_login
 
class  mp_method_selection
 
class  mp_options_helper
 
class  mp_staging
 
class  network_transmission
 Dialog that tracks network transmissions. More...
 
class  outro
 Dialog to display 'The End' at the end of a campaign. More...
 
struct  player_list
 
class  plugin_executor
 
class  preferences_dialog
 
class  screenshot_notification
 
class  select_orb_colors
 
class  simple_item_selector
 
class  single_mode_controller
 
class  sp_options_configure
 
class  statistics_dialog
 
class  story_viewer
 Dialog to view the storyscreen. More...
 
class  stuff_list_adder
 
struct  sub_player_list
 
class  synched_choice_wait
 
class  team_mode_controller
 
class  terrain_layers
 
class  theme_list
 
class  title_screen
 This class implements the title screen. More...
 
class  tooltip
 Class to show the tips. More...
 
class  transient_message
 Shows a transient message. More...
 
class  unit_advance
 
class  unit_attack
 
class  unit_create
 
class  unit_list
 
class  unit_mode_controller
 
class  unit_recall
 
class  unit_recruit
 
class  variable_mode_controller
 
class  wml_error
 WML preprocessor/parser error report dialog. More...
 
class  wml_message_base
 Base class for the wml generated messages. More...
 
class  wml_message_double
 Shows a dialog with two portraits, one on each side. More...
 
struct  wml_message_input
 Parameter pack for message text input options. More...
 
class  wml_message_left
 Shows a dialog with the portrait on the left side. More...
 
class  wml_message_option
 Helper class for message options. More...
 
struct  wml_message_options
 Parameter pack for message list input options. More...
 
struct  wml_message_portrait
 Parameter pack for message portrait. More...
 
class  wml_message_right
 Shows a dialog with the portrait on the right side. More...
 

Typedefs

using hp_probability_t = std::pair< int, double >
 
using hp_probability_vector = std::vector< hp_probability_t >
 
using btn_callback = std::function< void()>
 
using unit_ptr_vector = std::vector< unit_const_ptr >
 

Functions

static std::string describe_status_verbose (const addon_tracking_info &state)
 
static std::string format_addon_time (time_t time)
 
static std::string get_probability_string (const double prob)
 
config generate_difficulty_config (const config &source)
 Helper function to convert old difficulty markup. More...
 
static custom_tod::string_pair tod_getter_image (const time_of_day &tod)
 
static custom_tod::string_pair tod_getter_mask (const time_of_day &tod)
 
static custom_tod::string_pair tod_getter_sound (const time_of_day &tod)
 
static int resize_grid_xy_to_idx (const int x, const int y)
 Convert a coordinate on a 3 by 3 grid to an index, return 9 for out of bounds. More...
 
static void parse_about_tag (const config &cfg, std::stringstream &ss)
 
static bool get_dont_ask_again ()
 Helper to invert preferences::ask_delete_saves. More...
 
static void set_dont_ask_again (const bool ask_again)
 Helper to invert preferences::set_ask_delete_saves. More...
 
static std::string controller_name (const team &t)
 
static stuff_list_adder add_unit_entry (stuff_list_adder &progress, const unit &u, const display_context &dc)
 
template<class D , void(D::*)(window &) fptr>
void dialog_callback (widget &caller)
 Template for dialog callbacks. More...
 
static toggle_buttonsetup_pref_toggle_button (const std::string &id, bool def, window &window)
 
static void setup_item (const std::string &item, window &window)
 
static void set_pref_and_button (const std::string &id, bool value, window &window)
 
static void revert_to_default_pref_values (window &window)
 
static void show_server_list (window &window, field_text *host_name)
 
static bool get_do_not_show_again ()
 Helper for preferences::ask_delete_saves. More...
 
static void set_do_not_show_again (const bool do_not_show_again)
 Helper for preferences::set_ask_delete_saves. More...
 
static std::string generate_user_description (const config &side)
 
static gridget_advanced_row_grid (listbox &list, const int selected_row)
 
template<typename W >
static void disable_widget_on_toggle (window &window, widget &w, const std::string &id)
 
static int index_in_pager_range (const int &first, const stacked_widget &pager)
 
static config get_title_area_decor_config ()
 
static void register_button (window &win, const std::string &id, hotkey::HOTKEY_COMMAND hk, btn_callback callback)
 
static void launch_lua_console ()
 
static std::string format_level_string (const int level)
 
static std::string format_if_leader (unit_const_ptr u, const std::string str)
 
static std::string format_movement_string (unit_const_ptr u)
 
void show_unit_list (display &gui)
 
template<typename T >
static void dump_recall_list_to_console (const T &units)
 
static std::string format_level_string (const int level)
 
static std::string format_cost_string (int unit_recall_cost, const int team_recall_cost)
 
static std::string get_title_suffix (int side_num)
 
static std::string can_afford_unit (const std::string &text, const bool can_afford)
 
int show_wml_message (const std::string &title, const std::string &message, const wml_message_portrait *left, const wml_message_portrait *right, const wml_message_options &options, const wml_message_input &input)
 Helper function to show a portrait. More...
 
std::string unit_test_mark_as_tested (const modal_dialog &dialog)
 
std::string unit_test_mark_popup_as_tested (const modeless_dialog &dialog)
 
windowunit_test_window (const modeless_dialog &dialog)
 
modal_dialogunit_test_mp_server_list ()
 

Variables

static int max_coastal = 5
 
static int extra_size_per_player = 2
 
static int min_size = 20
 
static const int LOAD_GAME = 100
 
static bool use_campaign = false
 
static const unsigned int LAYER_BACKGROUND = 1
 
static const unsigned int LAYER_TEXT = 2
 
bool show_debug_clock_button = false
 Do we wish to show the button for the debug clock. More...
 
static listbox::order_pair sort_last {-1, listbox::SORT_NONE}
 
static listbox::order_pair sort_default { 2, listbox::SORT_DESCENDING}
 

Typedef Documentation

using gui2::dialogs::btn_callback = typedef std::function<void()>

Definition at line 151 of file title_screen.cpp.

using gui2::dialogs::hp_probability_t = typedef std::pair<int, double>

Definition at line 33 of file attack_predictions.hpp.

Definition at line 34 of file attack_predictions.hpp.

using gui2::dialogs::unit_ptr_vector = typedef std::vector<unit_const_ptr>

Definition at line 33 of file unit_list.hpp.

Function Documentation

static stuff_list_adder gui2::dialogs::add_unit_entry ( stuff_list_adder &  progress,
const unit u,
const display_context dc 
)
static
static std::string gui2::dialogs::can_afford_unit ( const std::string &  text,
const bool  can_afford 
)
static

Definition at line 58 of file unit_recruit.cpp.

Referenced by gui2::dialogs::unit_recruit::pre_show().

static std::string gui2::dialogs::controller_name ( const team t)
static

Definition at line 77 of file game_stats.cpp.

References _(), team::controller(), and names.

Referenced by gui2::dialogs::game_stats::pre_show().

static std::string gui2::dialogs::describe_status_verbose ( const addon_tracking_info state)
static
template<class D , void(D::*)(window &) fptr>
void gui2::dialogs::dialog_callback ( widget &  caller)

Template for dialog callbacks.

Example usage: widget->set_callback(dialog_callback<my_dialog_class, &my_dialog_class::member_function>);

Definition at line 32 of file helper.hpp.

References gui2::widget::dialog(), and gui2::widget::get_window().

Referenced by lua_gui2::intf_set_dialog_callback().

template<typename W >
static void gui2::dialogs::disable_widget_on_toggle ( window &  window,
widget &  w,
const std::string &  id 
)
static

Definition at line 294 of file preferences_dialog.cpp.

template<typename T >
static void gui2::dialogs::dump_recall_list_to_console ( const T &  units)
static

Definition at line 75 of file unit_recall.cpp.

References log_display, LOG_DP, and log_scope2.

Referenced by gui2::dialogs::unit_recall::dismiss_unit().

static std::string gui2::dialogs::format_addon_time ( time_t  time)
static
static std::string gui2::dialogs::format_cost_string ( int  unit_recall_cost,
const int  team_recall_cost 
)
static

Definition at line 102 of file unit_recall.cpp.

Referenced by gui2::dialogs::unit_recall::pre_show().

static std::string gui2::dialogs::format_if_leader ( unit_const_ptr  u,
const std::string  str 
)
static

Definition at line 77 of file unit_list.cpp.

Referenced by gui2::dialogs::unit_list::pre_show().

static std::string gui2::dialogs::format_level_string ( const int  level)
static
static std::string gui2::dialogs::format_level_string ( const int  level)
static

Definition at line 87 of file unit_recall.cpp.

static std::string gui2::dialogs::format_movement_string ( unit_const_ptr  u)
static

Definition at line 82 of file unit_list.cpp.

References moves_left.

Referenced by gui2::dialogs::unit_list::pre_show().

config gui2::dialogs::generate_difficulty_config ( const config source)
static std::string gui2::dialogs::generate_user_description ( const config side)
static

Definition at line 239 of file mp_join_game.cpp.

References _(), config::get(), and vgettext().

Referenced by gui2::dialogs::mp_join_game::generate_side_list().

static grid* gui2::dialogs::get_advanced_row_grid ( listbox &  list,
const int  selected_row 
)
static
static bool gui2::dialogs::get_do_not_show_again ( )
static
static bool gui2::dialogs::get_dont_ask_again ( )
static

Helper to invert preferences::ask_delete_saves.

The value stored and the way shown is inverted.

Definition at line 48 of file game_delete.cpp.

References preferences::ask_delete_saves().

Referenced by gui2::dialogs::game_delete::game_delete().

static std::string gui2::dialogs::get_probability_string ( const double  prob)
static
static config gui2::dialogs::get_title_area_decor_config ( )
static

Definition at line 40 of file story_viewer.cpp.

Referenced by gui2::dialogs::story_viewer::display_part().

static std::string gui2::dialogs::get_title_suffix ( int  side_num)
static
static int gui2::dialogs::index_in_pager_range ( const int &  first,
const stacked_widget &  pager 
)
static
static void gui2::dialogs::launch_lua_console ( )
static
static void gui2::dialogs::parse_about_tag ( const config cfg,
std::stringstream &  ss 
)
static

Definition at line 50 of file end_credits.cpp.

References config::has_child().

Referenced by gui2::dialogs::end_credits::pre_show().

static void gui2::dialogs::register_button ( window &  win,
const std::string &  id,
hotkey::HOTKEY_COMMAND  hk,
btn_callback  callback 
)
static
static int gui2::dialogs::resize_grid_xy_to_idx ( const int  x,
const int  y 
)
static

Convert a coordinate on a 3 by 3 grid to an index, return 9 for out of bounds.

Definition at line 143 of file resize_map.cpp.

Referenced by gui2::dialogs::editor_resize_map::update_expand_direction().

static void gui2::dialogs::revert_to_default_pref_values ( window &  window)
static
static void gui2::dialogs::set_do_not_show_again ( const bool  do_not_show_again)
static
static void gui2::dialogs::set_dont_ask_again ( const bool  ask_again)
static

Helper to invert preferences::set_ask_delete_saves.

The value stored and the way shown is inverted.

Definition at line 58 of file game_delete.cpp.

References preferences::set_ask_delete_saves().

Referenced by gui2::dialogs::game_delete::game_delete().

static void gui2::dialogs::set_pref_and_button ( const std::string &  id,
bool  value,
window &  window 
)
static
static void gui2::dialogs::setup_item ( const std::string &  item,
window &  window 
)
static
static toggle_button* gui2::dialogs::setup_pref_toggle_button ( const std::string &  id,
bool  def,
window &  window 
)
static
static void gui2::dialogs::show_server_list ( window &  window,
field_text *  host_name 
)
static

Definition at line 154 of file mp_connect.cpp.

References gui2::window::OK.

Referenced by gui2::dialogs::mp_connect::pre_show().

void gui2::dialogs::show_unit_list ( display gui)
int gui2::dialogs::show_wml_message ( const std::string &  title,
const std::string &  message,
const wml_message_portrait *  left,
const wml_message_portrait *  right,
const wml_message_options &  options,
const wml_message_input &  input 
)

Helper function to show a portrait.

Parameters
titleThe title of the dialog.
messageThe message to show.
leftPortrait to show on the left.
rightPortrait to show on the right.
optionsOptions to offer.
inputInfo on text input.

Definition at line 163 of file wml_message.cpp.

Referenced by lua_gui2::show_message_dialog().

static custom_tod::string_pair gui2::dialogs::tod_getter_image ( const time_of_day tod)
static

Definition at line 88 of file custom_tod.cpp.

References time_of_day::image.

Referenced by gui2::dialogs::custom_tod::pre_show().

static custom_tod::string_pair gui2::dialogs::tod_getter_mask ( const time_of_day tod)
static

Definition at line 94 of file custom_tod.cpp.

References time_of_day::image_mask.

Referenced by gui2::dialogs::custom_tod::pre_show().

static custom_tod::string_pair gui2::dialogs::tod_getter_sound ( const time_of_day tod)
static

Definition at line 100 of file custom_tod.cpp.

References time_of_day::sounds.

Referenced by gui2::dialogs::custom_tod::pre_show().

std::string gui2::dialogs::unit_test_mark_as_tested ( const modal_dialog dialog)

This is used in the unit tests, but these implementation details shouldn't be used in the normal code.

Definition at line 139 of file test_gui2.cpp.

References gui2::unit_test_registered_window_list(), and gui2::dialogs::modal_dialog::window_id().

std::string gui2::dialogs::unit_test_mark_popup_as_tested ( const modeless_dialog dialog)

This is used in the unit tests, but these implementation details shouldn't be used in the normal code.

Definition at line 146 of file test_gui2.cpp.

References gui2::unit_test_registered_window_list(), and gui2::dialogs::modeless_dialog::window_id().

modal_dialog* gui2::dialogs::unit_test_mp_server_list ( )
window* gui2::dialogs::unit_test_window ( const modeless_dialog dialog)

This is used in the unit tests, but these implementation details shouldn't be used in the normal code.

Definition at line 153 of file test_gui2.cpp.

References gui2::dialogs::modeless_dialog::window_.

Variable Documentation

int gui2::dialogs::extra_size_per_player = 2
static

Definition at line 33 of file generator_settings.cpp.

const unsigned int gui2::dialogs::LAYER_BACKGROUND = 1
static

Definition at line 53 of file story_viewer.cpp.

const unsigned int gui2::dialogs::LAYER_TEXT = 2
static

Definition at line 54 of file story_viewer.cpp.

const int gui2::dialogs::LOAD_GAME = 100
static

Definition at line 70 of file mp_create_game.cpp.

int gui2::dialogs::max_coastal = 5
static

Definition at line 32 of file generator_settings.cpp.

Referenced by default_map_generator::generate_map().

int gui2::dialogs::min_size = 20
static
bool gui2::dialogs::show_debug_clock_button = false

Do we wish to show the button for the debug clock.

Definition at line 135 of file title_screen.cpp.

Referenced by game_launcher::game_launcher(), gui2::dialogs::title_screen::pre_show(), and gui2::dialogs::title_screen::show_debug_clock_window().

listbox::order_pair gui2::dialogs::sort_default { 2, listbox::SORT_DESCENDING}
static

Definition at line 61 of file unit_recall.cpp.

Referenced by gui2::dialogs::unit_recall::pre_show().

listbox::order_pair gui2::dialogs::sort_last {-1, listbox::SORT_NONE}
static
bool gui2::dialogs::use_campaign = false
static

Definition at line 43 of file statistics_dialog.cpp.