Rev | Line | |
---|
[32df34] | 1 | /*
|
---|
| 2 | * MakroAction.hpp
|
---|
| 3 | *
|
---|
| 4 | * Created on: Dec 17, 2009
|
---|
| 5 | * Author: crueger
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #ifndef MAKROACTION_HPP_
|
---|
| 9 | #define MAKROACTION_HPP_
|
---|
| 10 |
|
---|
[3e8325] | 11 | #include <string>
|
---|
| 12 |
|
---|
[32df34] | 13 | #include "Actions/Action.hpp"
|
---|
| 14 |
|
---|
| 15 | class ActionSequence;
|
---|
| 16 |
|
---|
| 17 | /**
|
---|
| 18 | * Action to allow producing bigger Actions from sequences of small actions.
|
---|
| 19 | *
|
---|
| 20 | * Destruction of the Actions and the sequence is handled by this class.
|
---|
| 21 | */
|
---|
| 22 | class MakroAction : public Action
|
---|
| 23 | {
|
---|
| 24 | public:
|
---|
[3e8325] | 25 | MakroAction(std::string _name,ActionSequence* _actions,bool _doRegister=true);
|
---|
[32df34] | 26 | virtual ~MakroAction();
|
---|
| 27 |
|
---|
[0012e6] | 28 | bool canUndo();
|
---|
| 29 | bool shouldUndo();
|
---|
[32df34] | 30 |
|
---|
| 31 | private:
|
---|
[521e29] | 32 | virtual Action::state_ptr performCall();
|
---|
| 33 | virtual Action::state_ptr performUndo(Action::state_ptr);
|
---|
| 34 | virtual Action::state_ptr performRedo(Action::state_ptr);
|
---|
[0012e6] | 35 |
|
---|
[32df34] | 36 | ActionSequence *actions;
|
---|
| 37 | };
|
---|
| 38 |
|
---|
| 39 | #endif /* MAKROACTION_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.