90 void do_screenshot(
const std::string& screenshot_filename =
"map_screenshot.bmp");
99 void custom_tods_dialog();
102 void save_map()
override {context_manager_->save_map();}
111 bool do_execute_command(
const hotkey::hotkey_command& command,
int index = -1,
bool press =
true,
bool release =
false)
override;
114 void show_menu(
const std::vector<config>& items_arg,
int xloc,
int yloc,
bool context_menu,
display& disp)
override;
117 void status_table()
override;
123 void scroll_up(
bool on)
override;
124 void scroll_down(
bool on)
override;
125 void scroll_left(
bool on)
override;
126 void scroll_right(
bool on)
override;
129 void toggle_grid()
override;
131 void terrain_description()
override;
132 void unit_description()
override;
133 void change_unit_id();
134 void rename_unit()
override;
136 void unit_list()
override;
139 void copy_selection();
142 void cut_selection();
145 void export_selection_coords();
147 void update_mouse_action_highlights();
160 bool allow_mouse_wheel_scroll(
int x,
int y)
override;
161 bool right_click_show_menu(
int x,
int y,
const bool browse)
override;
162 bool left_click(
int x,
int y,
const bool browse)
override;
163 void left_drag_end(
int x,
int y,
const bool browse)
override;
164 void left_mouse_up(
int x,
int y,
const bool browse)
override;
165 bool right_click(
int x,
int y,
const bool browse)
override;
166 void right_drag_end(
int x,
int y,
const bool browse)
override;
167 void right_mouse_up(
int x,
int y,
const bool browse)
override;
173 return context_manager_->get_map_context();
178 void process_keyup_event(
const SDL_Event& event)
override;
191 void perform_delete(std::unique_ptr<editor_action> action);
197 void perform_refresh_delete(std::unique_ptr<editor_action> action,
bool drag_part =
false);
200 virtual std::vector<std::string> additional_actions_pressed()
override;
214 void load_tooltips();
217 void refresh_image_cache();
223 void display_redraw_callback(
display&);
228 void undo()
override;
233 void redo()
override;
241 const std::unique_ptr<editor_display>
gui_;
244 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.
Note: Specific to sdl_ttf.
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.