Paste a map fragment into the map. More...
#include <action.hpp>


Public Member Functions | |
| editor_action_paste (const map_fragment &paste, const map_location &offset=map_location(0, 0)) | |
| editor_action_paste * | clone () const |
| Action cloning. | |
| editor_action_paste * | perform (map_context &mc) const |
| Perform the action, returning an undo action that, when performed, shall reverse any effects of this action. | |
| void | perform_without_undo (map_context &mc) const |
| Perform the action without creating an undo action. | |
| void | extend (const editor_map &map, const std::set< map_location > &locs) |
| The crux of the extendable contract. | |
| const char * | get_name () const |
Protected Attributes | |
| map_location | offset_ |
| map_fragment | paste_ |
Paste a map fragment into the map.
No offset is used.
Definition at line 225 of file action.hpp.
| editor::editor_action_paste::editor_action_paste | ( | const map_fragment & | paste, | |
| const map_location & | offset = map_location(0,0) | |||
| ) | [inline] |
Definition at line 228 of file action.hpp.
Referenced by perform_without_undo().

| editor_action_paste * editor::editor_action_paste::clone | ( | ) | const [virtual] |
Action cloning.
Implements editor::editor_action.
Definition at line 154 of file action.cpp.
References editor::editor_action_area::area_.
| void editor::editor_action_paste::extend | ( | const editor_map & | map, | |
| const std::set< map_location > & | locs | |||
| ) | [virtual] |
The crux of the extendable contract.
This member function must be implemented so that the undo behaviour is consistent, exactly the same as would be with separate undo actions for every part of the drag.
Implements editor::editor_action_extendable.
Definition at line 158 of file action.cpp.
| const char* editor::editor_action_paste::get_name | ( | ) | const [inline, virtual] |
Reimplemented from editor::editor_action_extendable.
Definition at line 236 of file action.hpp.
| editor_action_paste * editor::editor_action_paste::perform | ( | map_context & | mc | ) | const [virtual] |
Perform the action, returning an undo action that, when performed, shall reverse any effects of this action.
The undo action object is owned by the caller. Default behaviour is to create a whole-map undo, call the perform_without_undo function and return the undo object.
Reimplemented from editor::editor_action.
Definition at line 162 of file action.cpp.
| void editor::editor_action_paste::perform_without_undo | ( | map_context & | ) | const [virtual] |
Perform the action without creating an undo action.
Implements editor::editor_action.
Definition at line 169 of file action.cpp.
References editor_action_paste(), editor::map_fragment::get_offset_area(), offset_, and paste_.

map_location editor::editor_action_paste::offset_ [protected] |
Definition at line 238 of file action.hpp.
Referenced by perform_without_undo().
map_fragment editor::editor_action_paste::paste_ [protected] |
Definition at line 239 of file action.hpp.
Referenced by perform_without_undo().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:25 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |