00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00031 #ifndef __vtkKWStateMachineState_h
00032 #define __vtkKWStateMachineState_h
00033
00034 #include "vtkKWObject.h"
00035
00036 class KWWidgets_EXPORT vtkKWStateMachineState : public vtkKWObject
00037 {
00038
00039 public:
00040 static vtkKWStateMachineState* New();
00041 vtkTypeRevisionMacro(vtkKWStateMachineState, vtkKWObject);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00045
00046 vtkGetMacro(Id, vtkIdType);
00048
00050
00051 vtkGetStringMacro(Name);
00052 vtkSetStringMacro(Name);
00054
00056
00057 vtkGetStringMacro(Description);
00058 vtkSetStringMacro(Description);
00060
00066 virtual void Enter();
00067
00073 virtual void Leave();
00074
00076
00084 virtual void SetEnterCommand(vtkObject *object, const char *method);
00085 virtual void InvokeEnterCommand();
00086 virtual int HasEnterCommand();
00088
00090
00098 virtual void SetLeaveCommand(vtkObject *object, const char *method);
00099 virtual void InvokeLeaveCommand();
00100 virtual int HasLeaveCommand();
00102
00104
00110 enum
00111 {
00112 EnterEvent = 10000,
00113 LeaveEvent
00114 };
00115
00117
00119
00121 vtkBooleanMacro(Accepting, int);
00122 vtkGetMacro(Accepting, int);
00123 vtkSetMacro(Accepting, int);
00125
00126
00127
00128 protected:
00129 vtkKWStateMachineState();
00130 ~vtkKWStateMachineState();
00131
00132 vtkIdType Id;
00133 char *Name;
00134 char *Description;
00135 int Accepting;
00136
00137 char *EnterCommand;
00138 char *LeaveCommand;
00139
00140
00141
00142 private:
00143
00144 static vtkIdType IdCounter;
00145
00146 vtkKWStateMachineState(const vtkKWStateMachineState&);
00147 void operator=(const vtkKWStateMachineState&);
00148 };
00149
00150 #endif
00151