various click-handling improvements/fixes
[potlatch2.git] / net / systemeD / potlatch2 / controller / ControllerState.as
1 package net.systemeD.potlatch2.controller {
2         import flash.events.*;
3     import net.systemeD.halcyon.Map;
4     import net.systemeD.halcyon.connection.*;
5     import net.systemeD.potlatch2.EditController;
6
7     public class ControllerState {
8
9         protected var controller:EditController;
10         protected var previousState:ControllerState;
11
12         public function ControllerState() {}
13  
14         public function setController(controller:EditController):void {
15             this.controller = controller;
16         }
17
18         public function setPreviousState(previousState:ControllerState):void {
19             if ( this.previousState == null )
20                 this.previousState = previousState;
21         }
22    
23         public function processMouseEvent(event:MouseEvent, entity:Entity):ControllerState {
24             return this;
25         }
26         
27         public function processKeyboardEvent(event:KeyboardEvent):ControllerState {
28             return this;
29         }
30
31                 public function get map():Map {
32                         return controller.map;
33                 }
34
35         public function enterState():void {}
36         public function exitState():void {}
37
38                 public function toString():String {
39                         return "(No state)";
40                 }
41
42     }
43 }