91 void do_screenshot(
const std::string& screenshot_filename =
"map_screenshot.png");
100 void custom_tods_dialog();
103 void save_map()
override {context_manager_->save_map();}
112 bool do_execute_command(
const hotkey::hotkey_command& command,
int index = -1,
bool press =
true,
bool release =
false)
override;
115 void show_menu(
const std::vector<config>& items_arg,
int xloc,
int yloc,
bool context_menu,
display& disp)
override;
118 void status_table()
override;
124 void scroll_up(
bool on)
override;
125 void scroll_down(
bool on)
override;
126 void scroll_left(
bool on)
override;
127 void scroll_right(
bool on)
override;
130 void toggle_grid()
override;
132 void terrain_description()
override;
133 void unit_description()
override;
134 void change_unit_id();
135 void rename_unit()
override;
137 void unit_list()
override;
140 void copy_selection();
143 void cut_selection();
146 void export_selection_coords();
148 void update_mouse_action_highlights();
161 bool allow_mouse_wheel_scroll(
int x,
int y)
override;
162 bool right_click_show_menu(
int x,
int y,
const bool browse)
override;
163 bool left_click(
int x,
int y,
const bool browse)
override;
164 void left_drag_end(
int x,
int y,
const bool browse)
override;
165 void left_mouse_up(
int x,
int y,
const bool browse)
override;
166 bool right_click(
int x,
int y,
const bool browse)
override;
167 void right_drag_end(
int x,
int y,
const bool browse)
override;
168 void right_mouse_up(
int x,
int y,
const bool browse)
override;
174 return context_manager_->get_map_context();
179 void process_keyup_event(
const SDL_Event& event)
override;
192 void perform_delete(std::unique_ptr<editor_action> action);
198 void perform_refresh_delete(std::unique_ptr<editor_action> action,
bool drag_part =
false);
201 virtual std::vector<std::string> additional_actions_pressed()
override;
215 void load_tooltips();
218 void refresh_image_cache();
224 void display_redraw_callback(
display&);
229 void undo()
override;
234 void redo()
override;
242 const std::unique_ptr<editor_display>
gui_;
245 typedef std::map<std::string, std::pair<std::string ,std::vector<time_of_day>>>
tods_map;
void show_help(const std::string &show_topic, int xloc, int yloc)
Open the help browser, show topic with id show_topic.
std::unique_ptr< font::floating_label_context > floating_label_manager_
tooltips::manager tooltip_manager_
void save_map() override
Save the map, open dialog if not named yet.
Collection of helper functions relating to Pango formatting.
std::string get_left_button_function()
std::unique_ptr< editor_toolkit > toolkit_
editor_display & gui() override
Reference to the used display objects.
Stores all information related to functions that can be bound to hotkeys.
const mouse_action & get_mouse_action() const
Get the current mouse action.
editor_display & get_display() override
Get a reference to a display member a derived class uses.
controller_base framework: controller_base is roughly analogous to a "dialog" class in a GUI toolkit ...
The editor_controller class contains the mouse and keyboard event handling routines for the editor...
editor::menu_type active_menu_
const std::unique_ptr< editor_display > gui_
The display object used and owned by the editor.
map_context & get_current_map_context() const
Implements a quit confirmation dialog.
Modify, read and display user preferences.
int show_menu(lua_State *L)
Displays a popup menu at the current mouse position Best used from a [set_menu_item], to show a submenu.
Manage the empty-palette in the editor.
Encapsulates the map of the game.
Game configuration data as global variables.
structure which will hide all current floating labels, and cause floating labels instantiated after i...
This class wraps around a map to provide a concise interface for the editor to work with...
std::vector< sound::music_track > music_tracks_
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
std::map< std::string, std::pair< std::string,std::vector< time_of_day > > > tods_map
Pre-defined time of day lighting settings for the settings dialog.
mouse_handler_base & get_mouse_handler_base() override
Get a reference to a mouse handler member a derived class uses.
bool do_quit_
Quit main loop flag.
std::unique_ptr< help::help_manager > help_manager_
const editor_display & gui() const override
Const version of gui.
static const map_location & null_location()
A mouse action receives events from the controller, and responds to them by creating an appropriate e...
const std::unique_ptr< context_manager > context_manager_
const std::unique_ptr< reports > reports_
Reports object.
mouse_action & get_mouse_action()
Get the current mouse action.