#include <context_manager.hpp>
Public Member Functions | |
bool | is_active_transitions_hotkey (const std::string &item) |
size_t | modified_maps (std::string &modified) |
void | set_update_trasitions_mode (int mode) |
bool | toggle_update_transitions () |
bool | clipboard_empty () |
map_fragment & | get_clipboard () |
void | fill_selection () |
Fill the selection with the foreground terrain. More... | |
int | current_context_index () |
Index into the map_contexts_ array. More... | |
context_manager (editor_display &gui, const config &game_config) | |
~context_manager () | |
size_t | open_maps (void) |
void | perform_refresh (const editor_action &action, bool drag_part=false) |
Perform an action on the current map_context, then refresh the display. More... | |
void | save_all_maps (bool auto_save_windows=false) |
Save all maps, open dialog if not named yet, except when using auto_save_windows which will name unnamed maps "windows_N". More... | |
void | save_map () |
Save the map, open dialog if not named yet. More... | |
editor_display & | gui () |
void | refresh_all () |
Refresh everything, i.e. More... | |
void | apply_mask_dialog () |
Display an apply mask dialog and process user input. More... | |
void | create_mask_to_dialog () |
Display an apply mask dialog and process user input. More... | |
void | rename_area_dialog () |
Display an dialog to querry a new id for an [time_area]. More... | |
void | expand_open_maps_menu (std::vector< std::string > &items) |
Menu expanding for open maps list. More... | |
void | expand_load_mru_menu (std::vector< std::string > &items) |
Menu expanding for most recent loaded list. More... | |
void | expand_sides_menu (std::vector< std::string > &items) |
Menu expanding for the map's player sides. More... | |
void | expand_areas_menu (std::vector< std::string > &items) |
Menu expanding for the map's defined areas. More... | |
void | expand_time_menu (std::vector< std::string > &items) |
Menu expanding for the map's defined areas. More... | |
void | expand_local_time_menu (std::vector< std::string > &items) |
Menu expanding for the map's defined areas. More... | |
void | load_map_dialog (bool force_same_context=false) |
Display a load map dialog and process user input. More... | |
void | load_mru_item (unsigned index, bool force_same_context=false) |
Open the specified entry from the recent files list. More... | |
void | edit_scenario_dialog () |
Display a scenario edit dialog and process user input. More... | |
void | edit_side_dialog (int side) |
TODO. More... | |
void | new_map_dialog () |
Display a new map dialog and process user input. More... | |
void | new_scenario_dialog () |
Display a new map dialog and process user input. More... | |
void | save_map_as_dialog () |
Display a save map as dialog and process user input. More... | |
void | save_scenario_as_dialog () |
Display a save map as dialog and process user input. More... | |
void | generate_map_dialog () |
Display a generate random map dialog and process user input. More... | |
void | resize_map_dialog () |
Display a load map dialog and process user input. More... | |
size_t | size () |
map_context & | get_map_context () |
Get the current map context object. More... | |
const editor_map & | get_map () const |
Get the map from the current map context object - const version. More... | |
void | set_default_dir (const std::string &str) |
Set the default dir (where the filebrowser is pointing at when there is no map file opened) More... | |
void | refresh_after_action (bool drag_part=false) |
Refresh the display after an action has been performed. More... | |
editor_map & | get_map () |
Get the map from the current map context object. More... | |
void | close_current_context () |
Closes the active map context. More... | |
void | switch_context (const int index, const bool force=false) |
Switches the context to the one under the specified index. More... | |
void | load_map (const std::string &filename, bool new_context) |
Load a map given the filename. More... | |
void | revert_map () |
Revert the map by reloading it from disk. More... | |
void | reload_map () |
Reload the map after it has significantly changed (when e.g. More... | |
Private Member Functions | |
void | replace_map_context (map_context *new_mc) |
Replace the current map context and refresh accordingly. More... | |
void | init_map_generators (const config &game_config) |
init available random map generators More... | |
bool | confirm_discard () |
Shows an are-you-sure dialog if the map was modified. More... | |
const map_context & | get_map_context () const |
Get the current map context object - const version. More... | |
int | add_map_context (map_context *mc) |
Add a map context. More... | |
void | create_default_context () |
Creates a default map context object, used to ensure there is always at least one. More... | |
bool | save_map_as (const std::string &filename) |
Save the map under a given filename. More... | |
bool | save_scenario_as (const std::string &filename) |
bool | write_map (bool display_confirmation=false) |
Save the map under a given filename. More... | |
bool | write_scenario (bool display_confirmation=false) |
void | new_map (int width, int height, const t_translation::t_terrain &fill, bool new_context) |
Create a new map. More... | |
void | new_scenario (int width, int height, const t_translation::t_terrain &fill, bool new_context) |
Create a new scenario. More... | |
size_t | check_open_map (const std::string &fn) const |
Check if a map is already open. More... | |
bool | check_switch_open_map (const std::string &fn) |
Check if a map is already open. More... | |
void | set_window_title () |
Displays the specified map name in the window titlebar. More... | |
Private Attributes | |
editor_display & | gui_ |
const config & | game_config_ |
std::string | default_dir_ |
Default directory for map load/save as dialogs. More... | |
std::vector< map_generator * > | map_generators_ |
Available random map generators. More... | |
map_generator * | last_map_generator_ |
int | current_context_index_ |
int | auto_update_transitions_ |
Flag to rebuild terrain on every terrain change. More... | |
std::vector< map_context * > | map_contexts_ |
The currently opened map context object. More... | |
map_fragment | clipboard_ |
Clipboard map_fragment – used for copy-paste. More... | |
Definition at line 27 of file context_manager.hpp.
editor::context_manager::context_manager | ( | editor_display & | gui, |
const config & | game_config | ||
) |
Definition at line 136 of file context_manager.cpp.
References create_default_context(), default_dir_, filesystem::get_dir(), filesystem::get_user_data_dir(), and init_map_generators().
editor::context_manager::~context_manager | ( | ) |
Definition at line 154 of file context_manager.cpp.
References game_config::get_default_title_string(), CVideo::get_singleton(), map_contexts_, map_generators_, and CVideo::set_window_title().
|
private |
Add a map context.
The controller assumes ownership.
Definition at line 730 of file context_manager.cpp.
References map_contexts_.
Referenced by create_default_context(), load_map(), new_map(), and new_scenario().
void editor::context_manager::apply_mask_dialog | ( | ) |
Display an apply mask dialog and process user input.
Definition at line 457 of file context_manager.cpp.
References _(), default_dir_, e, game_config_, editor::map_context::get_filename(), editor::map_context::get_map(), get_map_context(), gui_, mask, perform_refresh(), gui2::show_error_message(), dialogs::show_file_chooser_dialog(), gui2::show_transient_message(), display::video(), and game::error::what().
|
private |
Check if a map is already open.
Definition at line 888 of file context_manager.cpp.
References i, and map_contexts_.
Referenced by check_switch_open_map(), save_map_as(), and save_scenario_as().
|
private |
Check if a map is already open.
If yes, switch to it and return true, return false otherwise.
Definition at line 895 of file context_manager.cpp.
References _(), check_open_map(), gui_, i, map_contexts_, gui2::show_transient_message(), switch_context(), and display::video().
Referenced by load_map().
|
inline |
Definition at line 52 of file context_manager.hpp.
References clipboard_, and editor::map_fragment::empty().
void editor::context_manager::close_current_context | ( | ) |
Closes the active map context.
Switches to a valid context afterward or creates a dummy one.
Definition at line 760 of file context_manager.cpp.
References confirm_discard(), create_default_context(), current_context_index_, map_contexts_, and set_window_title().
|
private |
Shows an are-you-sure dialog if the map was modified.
Definition at line 719 of file context_manager.cpp.
References _(), gui2::twindow::CANCEL, get_map_context(), gui_, gui2::show_message(), display::video(), and gui2::tmessage::yes_no_buttons.
Referenced by close_current_context(), and revert_map().
|
private |
Creates a default map context object, used to ensure there is always at least one.
Except when we saved windows, in which case reopen them
Definition at line 736 of file context_manager.cpp.
References add_map_context(), game_config::default_terrain, config::find_child(), game_config_, gui_, and t_translation::read_terrain_code().
Referenced by close_current_context(), and context_manager().
void editor::context_manager::create_mask_to_dialog | ( | ) |
Display an apply mask dialog and process user input.
Definition at line 494 of file context_manager.cpp.
References _(), default_dir_, e, game_config_, editor::map_context::get_filename(), editor::map_context::get_map(), get_map_context(), gui_, perform_refresh(), gui2::show_error_message(), dialogs::show_file_chooser_dialog(), gui2::show_transient_message(), display::video(), and game::error::what().
|
inline |
Index into the map_contexts_ array.
Definition at line 64 of file context_manager.hpp.
References current_context_index_.
void editor::context_manager::edit_scenario_dialog | ( | ) |
Display a scenario edit dialog and process user input.
Definition at line 243 of file context_manager.cpp.
References gui2::teditor_edit_scenario::execute(), editor::map_context::get_description(), editor::map_context::get_id(), get_map_context(), editor::map_context::get_name(), editor::map_context::get_time_manager(), editor::map_context::get_xp_mod(), gui_, tod_manager::number_of_turns(), editor::map_context::random_start_time(), editor::map_context::set_scenario_setup(), preferences::turns(), editor::map_context::victory_defeated(), and display::video().
TODO.
Definition at line 206 of file context_manager.cpp.
References team::base_income(), team::controller(), gui2::teditor_edit_side::execute(), preferences::fog(), get_map_context(), editor::map_context::get_teams(), team::gold(), gui_, team::hidden(), team::no_leader(), editor::map_context::set_side_setup(), team::share_vision(), preferences::shroud(), team::team_name(), team::user_team_name(), team::uses_fog(), team::uses_shroud(), display::video(), team::village_gold(), preferences::village_gold(), game_config::village_support, and team::village_support().
void editor::context_manager::expand_areas_menu | ( | std::vector< std::string > & | items | ) |
Menu expanding for the map's defined areas.
Definition at line 349 of file context_manager.cpp.
References _(), tod_manager::get_area_by_index(), tod_manager::get_area_ids(), editor::map_context::get_map(), get_map_context(), editor::map_context::get_time_manager(), i, and editor::editor_map::selection().
void editor::context_manager::expand_load_mru_menu | ( | std::vector< std::string > & | items | ) |
Menu expanding for most recent loaded list.
Definition at line 319 of file context_manager.cpp.
References _(), filesystem::base_name(), i, and preferences::editor::recent_files().
void editor::context_manager::expand_local_time_menu | ( | std::vector< std::string > & | items | ) |
Menu expanding for the map's defined areas.
Definition at line 433 of file context_manager.cpp.
References get_map_context(), editor::map_context::get_time_manager(), i, IMAGE_PREFIX, IMG_TEXT_SEPARATOR, and tod_manager::times().
void editor::context_manager::expand_open_maps_menu | ( | std::vector< std::string > & | items | ) |
Menu expanding for open maps list.
Definition at line 290 of file context_manager.cpp.
References _(), i, and map_contexts_.
void editor::context_manager::expand_sides_menu | ( | std::vector< std::string > & | items | ) |
Menu expanding for the map's player sides.
Definition at line 384 of file context_manager.cpp.
References _(), get_map_context(), editor::map_context::get_teams(), i, and team::user_team_name().
void editor::context_manager::expand_time_menu | ( | std::vector< std::string > & | items | ) |
Menu expanding for the map's defined areas.
Definition at line 407 of file context_manager.cpp.
References get_map_context(), editor::map_context::get_time_manager(), i, IMAGE_PREFIX, IMG_TEXT_SEPARATOR, and tod_manager::times().
void editor::context_manager::fill_selection | ( | ) |
Fill the selection with the foreground terrain.
Definition at line 754 of file context_manager.cpp.
References get_map(), editor::get_selected_bg_terrain(), and perform_refresh().
void editor::context_manager::generate_map_dialog | ( | ) |
Display a generate random map dialog and process user input.
Definition at line 687 of file context_manager.cpp.
References _(), map_generator::create_map(), e, game_config_, get_map_context(), gui2::tdialog::get_retval(), gui2::teditor_generate_map::get_seed(), gui2::teditor_generate_map::get_selected_map_generator(), gui_, last_map_generator_, map_generators_, new_map(), gui2::twindow::OK, perform_refresh(), gui2::teditor_generate_map::select_map_generator(), gui2::teditor_generate_map::set_map_generators(), editor::map_context::set_needs_labels_reset(), gui2::tdialog::show(), gui2::show_error_message(), gui2::show_transient_message(), display::video(), and game::error::what().
|
inline |
Definition at line 56 of file context_manager.hpp.
References clipboard_.
Referenced by editor::editor_toolkit::init_mouse_actions().
|
inline |
Get the map from the current map context object - const version.
Definition at line 166 of file context_manager.hpp.
References editor::map_context::get_map(), and get_map_context().
Referenced by fill_selection(), new_map_dialog(), new_scenario_dialog(), and resize_map_dialog().
|
inline |
Get the map from the current map context object.
Definition at line 214 of file context_manager.hpp.
References editor::map_context::get_map(), and get_map_context().
|
inline |
Get the current map context object.
Definition at line 162 of file context_manager.hpp.
References current_context_index_, and map_contexts_.
Referenced by apply_mask_dialog(), confirm_discard(), create_mask_to_dialog(), edit_scenario_dialog(), edit_side_dialog(), expand_areas_menu(), expand_local_time_menu(), expand_sides_menu(), expand_time_menu(), generate_map_dialog(), get_map(), load_map(), load_map_dialog(), perform_refresh(), editor::map_context_refresher::refresh(), refresh_after_action(), refresh_all(), reload_map(), rename_area_dialog(), revert_map(), save_all_maps(), save_map(), save_map_as(), save_map_as_dialog(), save_scenario_as(), save_scenario_as_dialog(), set_window_title(), switch_context(), write_map(), and write_scenario().
|
inlineprivate |
Get the current map context object - const version.
Definition at line 189 of file context_manager.hpp.
References current_context_index_, and map_contexts_.
|
inline |
Definition at line 91 of file context_manager.hpp.
References gui_.
Referenced by editor::map_context_refresher::refresh().
init available random map generators
Definition at line 669 of file context_manager.cpp.
References config::child_range(), create_map_generator(), ERR_ED, i, and map_generators_.
Referenced by context_manager().
bool editor::context_manager::is_active_transitions_hotkey | ( | const std::string & | item | ) |
Definition at line 106 of file context_manager.cpp.
References auto_update_transitions_, preferences::editor::TransitionUpdateMode::off, preferences::editor::TransitionUpdateMode::on, and preferences::editor::TransitionUpdateMode::partial.
void editor::context_manager::load_map | ( | const std::string & | filename, |
bool | new_context | ||
) |
Load a map given the filename.
Definition at line 906 of file context_manager.cpp.
References _(), add_map_context(), check_switch_open_map(), e, ERR_ED, game_config_, editor::map_context::get_filename(), get_map_context(), editor::map_context::get_map_data_key(), gui_, editor::map_context::is_embedded(), LOG_ED, game_logic::msg(), util::unique_ptr< T >::release(), replace_map_context(), gui2::show_transient_message(), switch_context(), vgettext(), display::video(), and game::error::what().
Referenced by load_map_dialog(), load_mru_item(), and revert_map().
void editor::context_manager::load_map_dialog | ( | bool | force_same_context = false | ) |
Display a load map dialog and process user input.
Definition at line 183 of file context_manager.cpp.
References _(), default_dir_, filesystem::directory_name(), get_filename(), get_map_context(), gui_, load_map(), dialogs::show_file_chooser_dialog(), and display::video().
void editor::context_manager::load_mru_item | ( | unsigned | index, |
bool | force_same_context = false |
||
) |
Open the specified entry from the recent files list.
Definition at line 195 of file context_manager.cpp.
References load_map(), and preferences::editor::recent_files().
size_t editor::context_manager::modified_maps | ( | std::string & | modified | ) |
Definition at line 119 of file context_manager.cpp.
References _(), and map_contexts_.
|
private |
Create a new map.
Definition at line 960 of file context_manager.cpp.
References add_map_context(), config::find_child(), game_config_, gui_, replace_map_context(), and switch_context().
Referenced by generate_map_dialog(), and new_map_dialog().
void editor::context_manager::new_map_dialog | ( | ) |
Display a new map dialog and process user input.
Definition at line 270 of file context_manager.cpp.
References gui2::teditor_new_map::execute(), get_map(), editor::get_selected_bg_terrain(), gui_, gamemap::h(), new_map(), display::video(), and gamemap::w().
|
private |
Create a new scenario.
Definition at line 972 of file context_manager.cpp.
References add_map_context(), config::find_child(), game_config_, gui_, replace_map_context(), and switch_context().
Referenced by new_scenario_dialog().
void editor::context_manager::new_scenario_dialog | ( | ) |
Display a new map dialog and process user input.
Definition at line 280 of file context_manager.cpp.
References gui2::teditor_new_map::execute(), get_map(), editor::get_selected_bg_terrain(), gui_, gamemap::h(), new_scenario(), display::video(), and gamemap::w().
|
inline |
Definition at line 72 of file context_manager.hpp.
References map_contexts_.
void editor::context_manager::perform_refresh | ( | const editor_action & | action, |
bool | drag_part = false |
||
) |
Perform an action on the current map_context, then refresh the display.
Definition at line 479 of file context_manager.cpp.
References get_map_context(), editor::map_context::perform_action(), and refresh_after_action().
Referenced by apply_mask_dialog(), create_mask_to_dialog(), fill_selection(), generate_map_dialog(), and resize_map_dialog().
void editor::context_manager::refresh_after_action | ( | bool | drag_part = false | ) |
Refresh the display after an action has been performed.
The map context contains details of what needs to be refreshed.
Definition at line 516 of file context_manager.cpp.
References auto_update_transitions_, editor::map_context::changed_locations(), editor::map_context::clear_changed_locations(), get_map_context(), gui_, display::invalidate(), display::invalidate_all(), preferences::editor::TransitionUpdateMode::on, preferences::editor::TransitionUpdateMode::partial, display::rebuild_all(), editor::editor_display::rebuild_terrain(), display::recalculate_minimap(), reload_map(), editor::map_context::reset_starting_position_labels(), and editor::map_context::set_needs_terrain_rebuild().
Referenced by perform_refresh().
void editor::context_manager::refresh_all | ( | ) |
Refresh everything, i.e.
invalidate all hexes and redraw them. Does not reload the map.
Definition at line 167 of file context_manager.cpp.
References editor::map_context::clear_changed_locations(), display::create_buttons(), display::draw(), get_map_context(), gui_, display::invalidate_all(), display::rebuild_all(), display::recalculate_minimap(), and editor::map_context::set_needs_terrain_rebuild().
Referenced by reload_map().
void editor::context_manager::reload_map | ( | ) |
Reload the map after it has significantly changed (when e.g.
the dimensions changed). This is necessary to avoid issues with parts of the map being cached in the display class.
Definition at line 984 of file context_manager.cpp.
References get_map_context(), gui_, refresh_all(), display::reload_map(), editor::map_context::reset_starting_position_labels(), and editor::map_context::set_needs_reload().
Referenced by editor::map_context_refresher::refresh(), and refresh_after_action().
void editor::context_manager::rename_area_dialog | ( | ) |
Display an dialog to querry a new id for an [time_area].
Definition at line 485 of file context_manager.cpp.
References gui2::tedit_text::execute(), editor::map_context::get_active_area(), tod_manager::get_area_ids(), get_map_context(), editor::map_context::get_time_manager(), gui_, N_, tod_manager::set_area_id(), and display::video().
|
private |
Replace the current map context and refresh accordingly.
Definition at line 1008 of file context_manager.cpp.
References current_context_index_, map_contexts_, and set_window_title().
Referenced by load_map(), new_map(), and new_scenario().
void editor::context_manager::resize_map_dialog | ( | ) |
Display a load map dialog and process user input.
Definition at line 553 of file context_manager.cpp.
References gui2::teditor_resize_map::execute(), gui2::teditor_resize_map::EXPAND_BOTTOM, gui2::teditor_resize_map::EXPAND_BOTTOM_LEFT, gui2::teditor_resize_map::EXPAND_BOTTOM_RIGHT, gui2::teditor_resize_map::EXPAND_CENTER, gui2::teditor_resize_map::EXPAND_LEFT, gui2::teditor_resize_map::EXPAND_RIGHT, gui2::teditor_resize_map::EXPAND_TOP, gui2::teditor_resize_map::EXPAND_TOP_LEFT, gui2::teditor_resize_map::EXPAND_TOP_RIGHT, get_map(), editor::get_selected_bg_terrain(), gui_, gamemap::h(), h, t_translation::NONE_TERRAIN, perform_refresh(), display::video(), gamemap::w(), and WRN_ED.
void editor::context_manager::revert_map | ( | ) |
Revert the map by reloading it from disk.
Definition at line 949 of file context_manager.cpp.
References confirm_discard(), ERR_ED, editor::map_context::get_filename(), get_map_context(), and load_map().
void editor::context_manager::save_all_maps | ( | bool | auto_save_windows = false | ) |
Save all maps, open dialog if not named yet, except when using auto_save_windows which will name unnamed maps "windows_N".
Also record all filenames for future reopening.
Definition at line 779 of file context_manager.cpp.
References current_context_index_, default_dir_, editor::map_context::get_filename(), get_map_context(), i, filesystem::is_directory(), map_contexts_, save_map(), editor::map_context::set_filename(), and switch_context().
void editor::context_manager::save_map | ( | ) |
Save the map, open dialog if not named yet.
Definition at line 800 of file context_manager.cpp.
References editor::map_context::get_filename(), get_map_context(), filesystem::is_directory(), editor::map_context::is_pure_map(), save_map_as_dialog(), save_scenario_as_dialog(), write_map(), and write_scenario().
Referenced by save_all_maps().
|
private |
Save the map under a given filename.
Definition at line 838 of file context_manager.cpp.
References _(), check_open_map(), current_context_index_, editor::map_context::get_filename(), get_map_context(), gui_, editor::map_context::is_embedded(), map_contexts_, editor::map_context::set_embedded(), editor::map_context::set_filename(), gui2::show_transient_message(), display::video(), and write_map().
Referenced by save_map_as_dialog().
void editor::context_manager::save_map_as_dialog | ( | ) |
Display a save map as dialog and process user input.
Definition at line 613 of file context_manager.cpp.
References _(), gui2::twindow::CANCEL, default_dir_, filesystem::file_exists(), filesystem::get_dir(), editor::map_context::get_filename(), get_map_context(), gui_, save_map_as(), dialogs::show_file_chooser_dialog_save(), gui2::show_message(), display::video(), and gui2::tmessage::yes_no_buttons.
Referenced by save_map().
|
private |
Definition at line 816 of file context_manager.cpp.
References _(), check_open_map(), current_context_index_, editor::map_context::get_filename(), get_map_context(), gui_, editor::map_context::is_embedded(), map_contexts_, editor::map_context::set_embedded(), editor::map_context::set_filename(), gui2::show_transient_message(), display::video(), and write_scenario().
Referenced by save_scenario_as_dialog().
void editor::context_manager::save_scenario_as_dialog | ( | ) |
Display a save map as dialog and process user input.
Definition at line 641 of file context_manager.cpp.
References _(), gui2::twindow::CANCEL, default_dir_, filesystem::file_exists(), filesystem::get_dir(), editor::map_context::get_filename(), get_map_context(), gui_, save_scenario_as(), dialogs::show_file_chooser_dialog_save(), gui2::show_message(), display::video(), and gui2::tmessage::yes_no_buttons.
Referenced by save_map().
void editor::context_manager::set_default_dir | ( | const std::string & | str | ) |
Set the default dir (where the filebrowser is pointing at when there is no map file opened)
Definition at line 178 of file context_manager.cpp.
References default_dir_.
Definition at line 35 of file context_manager.hpp.
References auto_update_transitions_, and preferences::editor::set_auto_update_transitions().
|
private |
Displays the specified map name in the window titlebar.
Definition at line 1017 of file context_manager.cpp.
References _(), filesystem::base_name(), game_config::get_default_title_string(), get_filename(), get_map_context(), CVideo::get_singleton(), editor::map_context::is_pure_map(), and CVideo::set_window_title().
Referenced by close_current_context(), replace_map_context(), and switch_context().
|
inline |
Definition at line 157 of file context_manager.hpp.
References map_contexts_.
Switches the context to the one under the specified index.
Definition at line 992 of file context_manager.cpp.
References current_context_index_, editor::map_context::get_labels(), get_map_context(), map_contexts_, set_window_title(), and WRN_ED.
Referenced by check_switch_open_map(), load_map(), new_map(), new_scenario(), and save_all_maps().
|
inline |
Definition at line 40 of file context_manager.hpp.
References auto_update_transitions_, preferences::editor::TransitionUpdateMode::count, preferences::editor::TransitionUpdateMode::on, and preferences::editor::set_auto_update_transitions().
|
private |
Save the map under a given filename.
Displays an error message on failure.
Definition at line 874 of file context_manager.cpp.
References _(), e, get_map_context(), gui_, editor::map_context::save_map(), gui2::show_transient_message(), display::video(), and game::error::what().
Referenced by save_map(), and save_map_as().
|
private |
Definition at line 860 of file context_manager.cpp.
References _(), e, get_map_context(), gui_, editor::map_context::save_scenario(), gui2::show_transient_message(), display::video(), and game::error::what().
Referenced by save_map(), and save_scenario_as().
|
private |
Flag to rebuild terrain on every terrain change.
Definition at line 302 of file context_manager.hpp.
Referenced by is_active_transitions_hotkey(), refresh_after_action(), set_update_trasitions_mode(), and toggle_update_transitions().
|
private |
Clipboard map_fragment – used for copy-paste.
Definition at line 309 of file context_manager.hpp.
Referenced by clipboard_empty(), and get_clipboard().
|
private |
Definition at line 299 of file context_manager.hpp.
Referenced by close_current_context(), current_context_index(), get_map_context(), replace_map_context(), save_all_maps(), save_map_as(), save_scenario_as(), and switch_context().
|
private |
Default directory for map load/save as dialogs.
Definition at line 293 of file context_manager.hpp.
Referenced by apply_mask_dialog(), context_manager(), create_mask_to_dialog(), load_map_dialog(), save_all_maps(), save_map_as_dialog(), save_scenario_as_dialog(), and set_default_dir().
|
private |
Definition at line 290 of file context_manager.hpp.
Referenced by apply_mask_dialog(), create_default_context(), create_mask_to_dialog(), generate_map_dialog(), load_map(), new_map(), and new_scenario().
|
private |
Definition at line 288 of file context_manager.hpp.
Referenced by apply_mask_dialog(), check_switch_open_map(), confirm_discard(), create_default_context(), create_mask_to_dialog(), edit_scenario_dialog(), edit_side_dialog(), generate_map_dialog(), gui(), load_map(), load_map_dialog(), new_map(), new_map_dialog(), new_scenario(), new_scenario_dialog(), refresh_after_action(), refresh_all(), reload_map(), rename_area_dialog(), resize_map_dialog(), save_map_as(), save_map_as_dialog(), save_scenario_as(), save_scenario_as_dialog(), write_map(), and write_scenario().
|
private |
Definition at line 297 of file context_manager.hpp.
Referenced by generate_map_dialog().
|
private |
The currently opened map context object.
Definition at line 306 of file context_manager.hpp.
Referenced by add_map_context(), check_open_map(), check_switch_open_map(), close_current_context(), expand_open_maps_menu(), get_map_context(), modified_maps(), open_maps(), replace_map_context(), save_all_maps(), save_map_as(), save_scenario_as(), size(), switch_context(), and ~context_manager().
|
private |
Available random map generators.
Definition at line 296 of file context_manager.hpp.
Referenced by generate_map_dialog(), init_map_generators(), and ~context_manager().