Logo Search packages:      
Sourcecode: wesnoth-1.7 version File versions  Download package

editor::editor_controller Class Reference

#include <editor_controller.hpp>

Inheritance diagram for editor::editor_controller:

List of all members.

Detailed Description

The editor_controller class containts the mouse and keyboard event handling routines for the editor. It also serves as the main editor class with the general logic.

Definition at line 70 of file editor_controller.hpp.

Public Member Functions

int add_map_context (map_context *mc)
virtual void add_waypoint ()
virtual void ai_formula ()
bool allow_mouse_wheel_scroll (int x, int y)
void apply_mask_dialog ()
bool can_execute_command (hotkey::HOTKEY_COMMAND, int index=-1) const
virtual void change_language ()
virtual void change_side ()
size_t check_open_map (const std::string &fn) const
bool check_switch_open_map (const std::string &fn)
virtual void clear_labels ()
virtual void clear_messages ()
void clear_mouseover_overlay ()
void close_current_context ()
bool confirm_discard ()
virtual void continue_move ()
void copy_selection ()
void create_default_context ()
void create_mask_to_dialog ()
virtual void create_unit ()
virtual void custom_command ()
void cut_selection ()
virtual void cycle_back_units ()
void cycle_brush ()
virtual void cycle_units ()
void do_screenshot (const std::string &screenshot_filename="map_screenshot.bmp")
virtual int drag_threshold () const
virtual void draw ()
 editor_controller (const config &game_config, CVideo &video, map_context *init_map_context=NULL)
void editor_settings_dialog ()
virtual void end_turn ()
virtual void end_unit_turn ()
bool execute_command (hotkey::HOTKEY_COMMAND command, int index=-1)
void expand_open_maps_menu (std::vector< std::string > &items)
void export_selection_coords ()
void fill_selection ()
void generate_map_dialog ()
virtual std::string get_action_image (hotkey::HOTKEY_COMMAND, int) const
hotkey::ACTION_STATE get_action_state (hotkey::HOTKEY_COMMAND command, int index) const
const editor_mapget_map () const
editor_mapget_map ()
const map_contextget_map_context () const
map_contextget_map_context ()
std::string get_menu_image (hotkey::HOTKEY_COMMAND command, int index=-1) const
std::vector< std::string > get_menu_images (display &, const std::vector< std::string > &items_arg)
bool get_show_menu () const
int get_ticks ()
virtual void goto_leader ()
const editor_display & gui () const
editor_display & gui ()
void hotkey_quit ()
void hotkey_set_mouse_action (hotkey::HOTKEY_COMMAND command)
bool is_dragging () const
bool is_left_click (const SDL_MouseButtonEvent &event)
bool is_middle_click (const SDL_MouseButtonEvent &event)
bool is_mouse_action_set (hotkey::HOTKEY_COMMAND command) const
bool is_right_click (const SDL_MouseButtonEvent &event)
virtual void join ()
virtual void label_terrain (bool)
virtual void leave ()
bool left_click (int x, int y, const bool browse)
void left_drag_end (int x, int y, const bool browse)
void left_mouse_up (int x, int y, const bool browse)
virtual void load_game ()
void load_map (const std::string &filename, bool new_context)
void load_map_dialog (bool force_same_context=false)
EXIT_STATUS main_loop ()
bool map_is_open (const std::string &fn) const
void mouse_motion (int x, int y, const bool browse, bool update)
bool mouse_motion_default (int x, int y, bool update)
void mouse_motion_event (const SDL_MouseMotionEvent &event, const bool browse)
virtual void mouse_press (const SDL_MouseButtonEvent &event, const bool browse)
void mouse_update (const bool browse)
void new_map (int width, int height, t_translation::t_terrain fill, bool new_context)
void new_map_dialog ()
virtual void objectives ()
virtual void play_replay ()
void play_slice (bool is_delay_enabled=true)
void preferences ()
virtual void process_event ()
virtual void process_help_string (int, int)
void quit_confirm (EXIT_STATUS status)
virtual void recall ()
virtual void recruit ()
void refresh_all ()
void reload_map ()
virtual void rename_unit ()
virtual void repeat_recruit ()
virtual void replay_next_side ()
virtual void replay_next_turn ()
virtual void replay_show_each ()
virtual void replay_show_everything ()
virtual void replay_show_team1 ()
virtual void replay_skip_animation ()
virtual bool requires_event_focus (const SDL_Event *=NULL) const
virtual void reset_replay ()
void resize_map_dialog ()
void revert_map ()
bool right_click (int x, int y, const bool browse)
bool right_click_show_menu (int x, int y, const bool browse)
void right_drag_end (int x, int y, const bool browse)
void right_mouse_up (int x, int y, const bool browse)
virtual void save_game ()
virtual void save_map ()
bool save_map (bool display_confirmation=false)
bool save_map_as (const std::string &filename)
void save_map_as_dialog ()
virtual void save_replay ()
virtual void search ()
void set_default_dir (const std::string &str)
void set_mouseover_overlay ()
virtual void shout ()
virtual void show_chat_log ()
virtual void show_enemy_moves (bool)
virtual void show_help ()
void show_menu (const std::vector< std::string > &items_arg, int xloc, int yloc, bool context_menu, display &gui)
void show_menu (const std::vector< std::string > &items_arg, int xloc, int yloc, bool context_menu)
virtual void show_statistics ()
virtual void speak ()
virtual void start_network ()
virtual void status_table ()
virtual void stop_network ()
virtual void stop_replay ()
void switch_context (const int index)
virtual void toggle_ellipses ()
void toggle_grid ()
virtual void toggle_shroud_updates ()
virtual void unit_description ()
virtual void unit_hold_position ()
virtual void unit_list ()
void update_mouse_action_highlights ()
virtual void update_shroud_now ()
virtual void user_command ()
virtual void volatile_draw ()
virtual void volatile_undraw ()
virtual void whisper ()

Protected Member Functions

void cancel_dragging ()
void clear_dragging (const SDL_MouseButtonEvent &event, bool browse)
void editor_settings_dialog_redraw_callback (int r, int g, int b)
brushget_brush ()
editor_display & get_display ()
mouse_actionget_mouse_action ()
mouse_handler_base & get_mouse_handler_base ()
const configget_theme (const config &game_config, std::string theme_name)
void handle_event (const SDL_Event &event)
bool handle_scroll (CKey &key, int mousex, int mousey, int mouse_flags)
virtual std::vector< handler * > handler_members ()
virtual bool have_keyboard_focus ()
virtual bool in_context_menu (hotkey::HOTKEY_COMMAND command) const
void init_dragging (bool &dragging_flag)
void perform_delete (editor_action *action)
void perform_refresh (const editor_action &action, bool drag_part=false)
void perform_refresh_delete (editor_action *action, bool drag_part=false)
virtual void post_mouse_press (const SDL_Event &event)
virtual void process_keydown_event (const SDL_Event &event)
void process_keyup_event (const SDL_Event &event)
virtual void slice_before_scroll ()
virtual void slice_end ()

Protected Attributes

bool browse_
map_location drag_from_hex_
int drag_from_x_
int drag_from_y_
bool dragging_left_
bool dragging_right_
bool dragging_started_
const configgame_config_
CKey key_
map_location last_hex_
bool minimap_scrolling_
bool scrolling_
bool show_menu_
bool simple_warp_
const int ticks_

Private Types

typedef std::map
mouse_action * > 
typedef std::map
std::string > 

Private Member Functions

void display_redraw_callback (display &)
void init_brushes (const config &game_config)
void init_gui (CVideo &video)
void init_map_generators (const config &game_config)
void init_mouse_actions (const config &game_config)
void init_music (const config &game_config)
void init_sidebar (const config &game_config)
void init_tods (const config &game_config)
void load_tooltips ()
void redo ()
void redraw_toolbar ()
void refresh_after_action (bool drag_part=false)
void refresh_image_cache ()
void replace_map_context (map_context *new_mc)
void undo ()

Private Attributes

int auto_update_transitions_
t_translation::t_terrain background_terrain_
boost::scoped_ptr< brush_barbrush_bar_
std::vector< brushbrushes_
map_fragment clipboard_
int current_context_index_
std::string default_dir_
bool do_quit_
< font::floating_label_context
t_translation::t_terrain foreground_terrain_
boost::scoped_ptr< editor_display > gui_
std::vector< map_context * > map_contexts_
std::vector< map_generator * > map_generators_
mouse_action_string_map mouse_action_hints_
mouse_action_map mouse_actions_
< terrain_palette
< preferences::display_manager > 
EXIT_STATUS quit_mode_
boost::scoped_ptr< rand_rng::rng > rng_
< rand_rng::set_random_generator > 
boost::scoped_ptr< size_specssize_specs_
std::vector< time_of_daytods_
bool toolbar_dirty_
tooltips::manager tooltip_manager_
bool use_mdi_

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index