Public Member Functions

editor::editor_action_extendable Class Reference

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...

#include <action.hpp>

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

List of all members.

Public Member Functions

 editor_action_extendable ()
virtual void extend (const editor_map &map, const std::set< map_location > &locs)=0
 The crux of the extendable contract.
const char * get_name () const

Detailed Description

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.

Definition at line 59 of file action.hpp.


Constructor & Destructor Documentation

editor::editor_action_extendable::editor_action_extendable (  )  [inline]

Definition at line 62 of file action.hpp.


Member Function Documentation

virtual void editor::editor_action_extendable::extend ( const editor_map map,
const std::set< map_location > &  locs 
) [pure 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.

Implemented in editor::editor_action_area, editor::editor_action_paste, editor::editor_action_select, and editor::editor_action_deselect.

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

Reimplemented from editor::editor_action.

Reimplemented in editor::editor_action_area, editor::editor_action_paste, editor::editor_action_paint_area, editor::editor_action_select, editor::editor_action_deselect, and editor::editor_action_shuffle_area.

Definition at line 72 of file action.hpp.


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

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