Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Event firing at end of commands, managedcommands working correctly. R…
…obotlegs ready Commands to move back and forward
- Loading branch information
secoif
committed
Nov 20, 2009
1 parent
ae9bd09
commit 33b193b
Showing
15 changed files
with
501 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/org/robotlegs/utilities/undoablecommand/CommandEvent.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.robotlegs.utilities.undoablecommand | ||
{ | ||
import flash.events.Event; | ||
|
||
import org.robotlegs.utilities.undoablecommand.interfaces.IUndoableCommand; | ||
|
||
/** | ||
* CommandEvents occur when commands finish executing or undoing | ||
* | ||
*/ | ||
public class CommandEvent extends Event | ||
{ | ||
/** | ||
* Defines the value of the type property of an executeComplete event object. | ||
*/ | ||
public static const EXECUTE_COMPLETE:String = "executeComplete"; | ||
/** | ||
* Defines the value of the type property of an undoExecuteComplete event object. | ||
*/ | ||
public static const UNDO_EXECUTE_COMPLETE:String = "undoExecuteComplete"; | ||
|
||
/** | ||
* The command associated with the event | ||
*/ | ||
public var command:IUndoableCommand; | ||
|
||
/** | ||
* @param type The type of event | ||
* @param command The command associated with the event | ||
*/ | ||
public function CommandEvent(type:String, command:IUndoableCommand) { | ||
super(type, false, false); | ||
this.command = command; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/org/robotlegs/utilities/undoablecommand/HistoryEvent.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.robotlegs.utilities.undoablecommand | ||
{ | ||
import org.robotlegs.utilities.undoablecommand.interfaces.IUndoableCommand; | ||
|
||
public class HistoryEvent extends CommandEvent | ||
{ | ||
/** | ||
* Defines the value of the type property of a stepBackward event object. | ||
* Map this event to StepBackwardCommand to trigger an undo action. | ||
*/ | ||
public static const STEP_BACKWARD:String = "stepBackward"; | ||
/** | ||
* Defines the value of the type property of a stepforward event object. | ||
* Map this event to StepForwardCommand to trigger a redo action. | ||
*/ | ||
public static const STEP_FORWARD:String = "stepForward"; | ||
|
||
/** | ||
* Defines the value of the type property of a stepForwardComplete event object. | ||
*/ | ||
public static const STEP_FORWARD_COMPLETE:String = "stepForwardComplete"; | ||
|
||
/** | ||
* Defines the value of the type property of a stepBackwardComplete event object. | ||
*/ | ||
public static const STEP_BACKWARD_COMPLETE:String = "stepBackwardComplete"; | ||
|
||
/** | ||
* Defines the value of the type property of a rewind event object. | ||
*/ | ||
public static const REWIND:String = "rewind"; | ||
/** | ||
* Defines the value of the type property of a fastForward event object. | ||
*/ | ||
public static const FAST_FORWARD:String = "fastForwardHistory"; | ||
|
||
/** | ||
* Defines the value of the type property of a rewindComplete event object. | ||
*/ | ||
public static const REWIND_COMPLETE:String = "rewindComplete"; | ||
/** | ||
* Defines the value of the type property of an fastForwardComplete event object. | ||
*/ | ||
public static const FAST_FORWARD_COMPLETE:String = "fastForwardComplete"; | ||
|
||
public function HistoryEvent(type:String, command:IUndoableCommand = null) { | ||
super(type, command); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.