The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Typedefs | Enumerations | Functions | Variables
editor Namespace Reference

Manage the empty-palette in the editor. More...


class  brush
 The brush class represents a single brush – a set of relative locations around a "hotspot", and related info such as the icon image. More...
class  brush_drag_mouse_action
 A brush-drag mouse action base class which adds brush and drag processing to a basic mouse action. More...
class  common_palette
class  context_manager
class  dummy_editor_display_context
class  editor_action
 Base class for all editor actions. More...
class  editor_action_apply_mask
class  editor_action_area
 Base class for area-affecting actions. More...
class  editor_action_chain
 Container action wrapping several actions into one. More...
class  editor_action_create_mask
class  editor_action_deselect
 Deselect the given locations. More...
struct  editor_action_exception
class  editor_action_extendable
 Base class for actions that: 1) operate on an area 2) can be used as undo for a click-drag operation 3) can be extended so one undo action undos several actual drag actions. More...
class  editor_action_fill
 Flood fill. More...
class  editor_action_item
 place a new item on the map More...
class  editor_action_item_delete
 Remove a item from the map. More...
class  editor_action_item_facing
class  editor_action_item_replace
class  editor_action_label
 Set label action. More...
class  editor_action_label_delete
class  editor_action_location
 Base class for actions which act on a specified location (and possibly on other locations that can be derived from the staring hex) More...
class  editor_action_location_terrain
 Base class for actions which in addition to acting on a hex, act with one terrain type, i.e. More...
class  editor_action_paint_area
 Paint the same terrain on a number of locations on the map. More...
class  editor_action_paste
 Paste a map fragment into the map. More...
class  editor_action_resize_map
 Resize the map. More...
class  editor_action_select
 Select the given locations. More...
class  editor_action_select_all
 Select the entire map. More...
class  editor_action_select_inverse
 Invert the selection. More...
class  editor_action_select_none
 Clear selection. More...
class  editor_action_shuffle_area
 Randomize terrain in an area. More...
class  editor_action_starting_position
 Set starting position action. More...
class  editor_action_unit
 place a new unit on the map More...
class  editor_action_unit_delete
 Remove a unit from the map. More...
class  editor_action_unit_facing
class  editor_action_unit_replace
class  editor_action_village
 Sets the ownership of a village to the current side. More...
class  editor_action_village_delete
 Clears the ownership of a village. More...
class  editor_action_whole_map
 Replace contents of the entire map, Useful as a fallback undo method when something else would be impractical. More...
class  editor_controller
 The editor_controller class contains the mouse and keyboard event handling routines for the editor. More...
class  editor_display
struct  editor_exception
struct  editor_logic_exception
class  editor_map
 This class adds extra editor-specific functionality to a normal gamemap. More...
struct  editor_map_integrity_error
struct  editor_map_load_exception
struct  editor_map_operation_exception
struct  editor_map_save_exception
class  editor_palette
struct  editor_team_info
class  editor_toolkit
class  empty_palette
 Empty palette. More...
struct  item_group
 Stores the info about the groups in a nice format. More...
class  item_palette
 Palette where the terrain to be drawn can be selected. More...
class  location_palette
class  map_context
 This class wraps around a map to provide a concise interface for the editor to work with. More...
class  map_context_refresher
 Utility class to properly refresh the display when the map context object is replaced without duplicating code. More...
class  map_fragment
 A map fragment – a collection of locations and information abut them. More...
class  mouse_action
 A mouse action receives events from the controller, and responds to them by creating an appropriate editor_action object. More...
class  mouse_action_fill
 Fill action. More...
class  mouse_action_item
 item placement action class More...
class  mouse_action_map_label
 Set map label action. More...
class  mouse_action_paint
 Brush paint mouse action. More...
class  mouse_action_paste
 Paste action. More...
class  mouse_action_select
 Select (and deselect) action, by brush or "magic wand" (via keyboard modifier) More...
class  mouse_action_starting_position
 Set starting position action. More...
class  mouse_action_unit
 Unit placement action class. More...
class  mouse_action_village
 Editor mouse action class. More...
class  palette_manager
 Empty palette. More...
class  terrain_palette
 Palette where the terrain to be drawn can be selected. More...
struct  tile_info
 This represents a tile along with information about it, namely the terrain, possibly other information. More...
class  tristate_palette
class  unit_palette
 Palette where the terrain to be drawn can be selected. More...


using editor_action_ptr = std::unique_ptr< editor_action >
 Action pointer typedef. More...
using action_stack = std::deque< editor_action_ptr >
 Action stack typedef. More...


enum  menu_type {


std::string get_left_button_function ()
const display_contextget_dummy_display_context ()
EXIT_STATUS start (const config &game_config, CVideo &video, const std::string &filename="", bool take_screenshot=false, const std::string &screenshot_filename="map_screenshot.bmp")
 Main interface for launching the editor from the title screen. More...
static const std::string get_menu_marker (const bool changed)
editor_map_load_exception wrap_exc (const char *type, const std::string &e_msg, const std::string &filename)
 Exception wrapping utility. More...
const t_translation::terrain_codeget_selected_bg_terrain ()
const t_translation::terrain_codeget_selected_fg_terrain ()
static bool is_valid_terrain (const t_translation::terrain_code &c)


static std::vector< std::string > saved_windows_

Detailed Description

Manage the empty-palette in the editor.

Manage the unit-palette in the editor.

Manage the terrain-palette in the editor.

Manages all the palettes in the editor.

Manage the item-palette in the editor.

Note: this is a near-straight rip from the old editor.

Typedef Documentation

using editor::action_stack = typedef std::deque<editor_action_ptr>

Action stack typedef.

Definition at line 72 of file editor_common.hpp.

using editor::editor_action_ptr = typedef std::unique_ptr<editor_action>

Action pointer typedef.

Definition at line 69 of file editor_common.hpp.

Enumeration Type Documentation


Definition at line 24 of file editor_main.hpp.


Definition at line 48 of file editor_controller.hpp.

Function Documentation

const display_context * editor::get_dummy_display_context ( )

Definition at line 50 of file editor_display.cpp.

std::string editor::get_left_button_function ( )
static const std::string editor::get_menu_marker ( const bool  changed)
const t_translation::terrain_code & editor::get_selected_bg_terrain ( )
const t_translation::terrain_code & editor::get_selected_fg_terrain ( )

Definition at line 37 of file terrain_palettes.cpp.

static bool editor::is_valid_terrain ( const t_translation::terrain_code c)
EXIT_STATUS editor::start ( const config game_config,
CVideo video,
const std::string &  filename = "",
bool  take_screenshot = false,
const std::string &  screenshot_filename = "map_screenshot.bmp" 

Main interface for launching the editor from the title screen.

How the editor was exited (whether the intent was to go back to the titlescreen or quit to desktop altogether)

Definition at line 28 of file editor_main.cpp.

References editor::editor_controller::context_manager_, hotkey::deactivate_all_scopes(), editor::editor_controller::do_screenshot(), e, game_config::editor, ERR_ED, EXIT_ERROR, EXIT_NORMAL, filesystem::file_exists(), editor::editor_action::get_instance_count(), filesystem::is_directory(), editor::editor_controller::main_loop(), hotkey::SCOPE_EDITOR, hotkey::set_scope_active(), and game::error::what().

Referenced by add_prefixes(), gui2::text_box_base::copy_selection(), gui2::password_box::delete_selection(), gui2::text_box::delete_selection(), do_gameloop(), events::menu_handler::do_search(), gui::textbox::draw_contents(), wfl::builtins::debug_profile_function::execute(), gui2::event::dispatcher::fire(), variable_info_implementation::get_child_range(), display::get_fog_shroud_images(), gui2::text_box_base::handle_editing(), map_location::parse_direction(), font::parse_markup(), game_launcher::play_screenshot_mode(), gui2::dialogs::gamestate_inspector::model::repaginate(), savegame::savegame::save_game(), gui2::text_box_base::set_selection(), gui2::event::distributor::signal_handler_sdl_text_editing(), gui2::event::distributor::signal_handler_sdl_text_input(), game_launcher::start_editor(), str_sub(), gui2::text_box::update_canvas(), and arrow::update_symbols().

editor_map_load_exception editor::wrap_exc ( const char *  type,
const std::string &  e_msg,
const std::string &  filename 

Exception wrapping utility.

Definition at line 31 of file editor_map.cpp.

References wfl::msg(), vgettext(), and WRN_ED.

Referenced by editor::editor_map::from_string().

Variable Documentation

std::vector<std::string> editor::saved_windows_

Definition at line 51 of file context_manager.cpp.