Public Member Functions

editor::editor_action_select Class Reference

Select the given locations. More...

#include <action.hpp>

Inheritance diagram for editor::editor_action_select:
Inheritance graph
[legend]
Collaboration diagram for editor::editor_action_select:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 editor_action_select (const std::set< map_location > &area)
editor_action_selectclone () const
 Action cloning.
void extend (const editor_map &map, const std::set< map_location > &locs)
 The crux of the extendable contract.
editor_actionperform (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.
const char * get_name () const

Detailed Description

Select the given locations.

Definition at line 303 of file action.hpp.


Constructor & Destructor Documentation

editor::editor_action_select::editor_action_select ( const std::set< map_location > &  area  )  [inline]

Definition at line 306 of file action.hpp.

Referenced by extend().

Here is the caller graph for this function:


Member Function Documentation

editor_action_select * editor::editor_action_select::clone (  )  const [virtual]

Action cloning.

Implements editor::editor_action.

Definition at line 250 of file action.cpp.

void editor::editor_action_select::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.

Reimplemented from editor::editor_action_area.

Definition at line 254 of file action.cpp.

References editor_action_select().

Here is the call graph for this function:

const char* editor::editor_action_select::get_name (  )  const [inline, virtual]
Returns:
a short name of this action type, defaults to unknown

Reimplemented from editor::editor_action_area.

Definition at line 314 of file action.hpp.

editor_action * editor::editor_action_select::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 264 of file action.cpp.

References editor::editor_action_area::area_, and LOG_ED.

void editor::editor_action_select::perform_without_undo ( map_context  )  const [virtual]

Perform the action without creating an undo action.

Implements editor::editor_action.

Definition at line 276 of file action.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:26 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs