editor.cpp File Reference

Map-editor. More...

#include "SDL.h"
#include "SDL_keysym.h"
#include "../config.hpp"
#include "../construct_dialog.hpp"
#include "../cursor.hpp"
#include "../file_chooser.hpp"
#include "../filesystem.hpp"
#include "../font.hpp"
#include "../game_config.hpp"
#include "../gettext.hpp"
#include "../key.hpp"
#include "../language.hpp"
#include "../widgets/menu.hpp"
#include "../pathfind.hpp"
#include "../preferences.hpp"
#include "../sdl_utils.hpp"
#include "../tooltips.hpp"
#include "../team.hpp"
#include "../util.hpp"
#include "../video.hpp"
#include "../wml_separators.hpp"
#include "../wml_exception.hpp"
#include "serialization/parser.hpp"
#include "serialization/string_utils.hpp"
#include "editor.hpp"
#include "map_manip.hpp"
#include "editor_dialogs.hpp"
#include "editor_palettes.hpp"
#include <cctype>
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <cmath>

Include dependency graph for editor.cpp:

Go to the source code of this file.

Namespaces

namespace  map_editor

Functions

int starting_side_at (const gamemap &map, const gamemap::location hex)
bool map_editor::check_data (std::string &data, std::string &filename, bool &from_scenario, config &game_cfg)
 map_editor::map_editor (editor_display &gui, editormap &map, config &theme, config &game_config)
void map_editor::load_tooltips ()
 map_editor::~map_editor ()
void map_editor::handle_event (const SDL_Event &event)
void map_editor::handle_keyboard_event (const SDL_KeyboardEvent &event, const int, const int)
void map_editor::handle_mouse_button_event (const SDL_MouseButtonEvent &event, const int mousex, const int mousey)
void map_editor::left_click (const gamemap::location hex_clicked)
void map_editor::right_click (const gamemap::location hex_clicked)
void map_editor::change_language ()
 Change the language (effectively reload the editor).
void map_editor::edit_save_as ()
void map_editor::perform_set_starting_pos ()
void map_editor::edit_set_start_pos ()
void map_editor::perform_flood_fill (const t_translation::t_terrain fill_with)
void map_editor::edit_flood_fill ()
void map_editor::edit_save_map ()
void map_editor::edit_quit ()
void map_editor::edit_new_map ()
void map_editor::edit_load_map ()
void map_editor::edit_fill_selection ()
void map_editor::edit_cut ()
void map_editor::edit_copy ()
void map_editor::perform_paste ()
void map_editor::edit_paste ()
void map_editor::edit_rotate_selection ()
void map_editor::edit_revert ()
void map_editor::edit_resize ()
void map_editor::edit_flip ()
void map_editor::edit_select_all ()
void map_editor::edit_draw ()
void map_editor::edit_refresh ()
void map_editor::edit_update ()
void map_editor::edit_auto_update ()
hotkey::ACTION_STATE map_editor::get_action_state (hotkey::HOTKEY_COMMAND command) const
void map_editor::copy_buffer (map_buffer &buffer, const std::set< gamemap::location > &locs, const gamemap::location &origin)
void map_editor::paste_buffer (const map_buffer &buffer, const gamemap::location &loc, map_undo_action &undo_action)
void map_editor::insert_selection_in_clipboard ()
void map_editor::perform_fill_hexes (std::set< gamemap::location > &fill_hexes, const t_translation::t_terrain terrain, map_undo_action &undo_action)
void map_editor::perform_selection_move ()
bool map_editor::can_execute_command (hotkey::HOTKEY_COMMAND command, int) const
void map_editor::toggle_grid ()
void map_editor::save_undo_action (const map_undo_action &action)
void map_editor::undo ()
void map_editor::redo ()
void map_editor::preferences ()
void map_editor::redraw_everything ()
void map_editor::highlight_selected_hexes (const bool clear_old)
void map_editor::clear_highlighted_hexes_in_gui ()
void map_editor::set_mouseover_overlay ()
bool map_editor::changed_since_save () const
void map_editor::set_starting_position (const int player, const gamemap::location loc)
void map_editor::set_abort (const ABORT_MODE abort)
void map_editor::set_file_to_save_as (const std::string filename, bool from_scenario)
void map_editor::left_button_down (const int mousex, const int mousey)
void map_editor::draw_on_mouseover_hexes (const t_translation::t_terrain terrain, const bool one_layer_only)
void map_editor::draw_terrain (const t_translation::t_terrain terrain, const std::vector< gamemap::location > &hexes, const bool one_layer_only)
void map_editor::terrain_changed (const gamemap::location &hex)
void map_editor::right_button_down (const int, const int)
void map_editor::middle_button_down (const int mousex, const int mousey)
bool map_editor::confirm_exit_and_save ()
bool map_editor::save_map (const std::string fn, const bool display_confirmation)
bool map_editor::verify_filename (const std::string &filename, bool show_error) const
void map_editor::show_menu (const std::vector< std::string > &items, const int xloc, const int yloc, const bool)
void map_editor::execute_command (const hotkey::HOTKEY_COMMAND command)
void map_editor::recalculate_starting_pos_labels ()
void map_editor::update_mouse_over_hexes (const gamemap::location mouse_over_hex)
void map_editor::left_button_func_changed (const LEFT_BUTTON_FUNC func)
void map_editor::update_l_button_palette ()
std::string map_editor::get_action_name (const LEFT_BUTTON_FUNC func) const
bool map_editor::is_left_button_func_menu (const theme::menu &menu) const
void map_editor::main_loop ()

Variables

static std::string wm_title_string
const unsigned int sdl_delay = 20
const std::string prefs_filename


Detailed Description

Map-editor.

Definition in file editor.cpp.


Function Documentation

int @240::starting_side_at ( const gamemap map,
const gamemap::location  hex 
) [static]


Variable Documentation

const std::string prefs_filename [static]

Initial value:

 get_dir(get_user_data_dir() + "/editor")
        + "/preferences"

Definition at line 62 of file editor.cpp.

const unsigned int sdl_delay = 20 [static]

Definition at line 61 of file editor.cpp.

std::string wm_title_string [static]

Definition at line 58 of file editor.cpp.

Referenced by main().


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs