00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWWizardWorkflow.h,v $ 00004 00005 Copyright (c) Kitware, Inc. 00006 All rights reserved. 00007 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00029 #ifndef __vtkKWWizardWorkflow_h 00030 #define __vtkKWWizardWorkflow_h 00031 00032 #include "vtkKWStateMachine.h" 00033 00034 class vtkKWWizardStep; 00035 class vtkKWStateMachineState; 00036 class vtkKWWizardWorkflowInternals; 00037 00038 class KWWidgets_EXPORT vtkKWWizardWorkflow : public vtkKWStateMachine 00039 { 00040 // @cond section_public 00041 public: 00042 static vtkKWWizardWorkflow* New(); 00043 vtkTypeRevisionMacro(vtkKWWizardWorkflow, vtkKWStateMachine); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00053 virtual int AddStep(vtkKWWizardStep *step); 00054 virtual int HasStep(vtkKWWizardStep *step); 00055 virtual int GetNumberOfSteps(); 00056 virtual vtkKWWizardStep* GetNthStep(int rank); 00058 00065 virtual int AddNextStep(vtkKWWizardStep *step); 00066 00068 00082 virtual int CreateNextTransition( 00083 vtkKWWizardStep *origin, 00084 vtkKWStateMachineInput *next_input, 00085 vtkKWWizardStep *destination); 00087 00089 00100 virtual int CreateBackTransition( 00101 vtkKWWizardStep *origin, 00102 vtkKWWizardStep *destination); 00104 00136 virtual int CreateGoToTransition( 00137 vtkKWWizardStep *origin, 00138 vtkKWWizardStep *destination); 00139 00143 virtual int CreateGoToTransitions(vtkKWWizardStep *destination); 00144 00146 00156 virtual vtkKWWizardStep* GetInitialStep(); 00157 virtual int SetInitialStep(vtkKWWizardStep*); 00159 00162 virtual vtkKWWizardStep* GetCurrentStep(); 00163 00165 00171 virtual void SetFinishStep(vtkKWWizardStep*); 00172 virtual vtkKWWizardStep* GetFinishStep(); 00174 00178 virtual int CreateGoToTransitionsToFinishStep(); 00179 00181 virtual vtkKWWizardStep* GetStepFromState(vtkKWStateMachineState*); 00182 00184 00188 virtual int GetNumberOfStepsInNavigationStack(); 00189 virtual vtkKWWizardStep* GetNthStepInNavigationStack(int rank); 00191 00193 00199 virtual void AttemptToGoToNextStep(); 00200 virtual void AttemptToGoToPreviousStep(); 00201 virtual void AttemptToGoToFinishStep(); 00203 00205 00212 virtual void SetNavigationStackedChangedCommand( 00213 vtkObject *object, const char *method); 00214 virtual void InvokeNavigationStackedChangedCommand(); 00215 virtual int HasNavigationStackedChangedCommand(); 00217 00219 00222 enum 00223 { 00224 NavigationStackedChangedEvent = 10000 00225 }; 00226 //ETX 00228 00230 00231 virtual void TryToGoToStepCallback( 00232 vtkKWWizardStep *origin, vtkKWWizardStep *destination); 00234 00239 virtual void InvokeCurrentStateChangedCommand(); 00240 00241 // @endcond 00242 // @cond section_protected 00243 protected: 00244 vtkKWWizardWorkflow(); 00245 ~vtkKWWizardWorkflow(); 00246 00248 00249 virtual void RemoveStep(vtkKWWizardStep *step); 00250 virtual void RemoveAllSteps(); 00252 00253 // PIMPL Encapsulation for STL containers 00254 //BTX 00255 vtkKWWizardWorkflowInternals *Internals; 00256 //ETX 00257 00259 00260 vtkKWStateMachineState *GoToState; 00261 virtual vtkKWStateMachineState* GetGoToState(); 00263 00264 char *NavigationStackedChangedCommand; 00265 00267 00268 virtual void PushStepToNavigationStack(vtkKWWizardStep*); 00269 virtual vtkKWWizardStep* PopStepFromNavigationStack(); 00271 00272 // @endcond 00273 // @cond section_private 00274 private: 00275 00276 vtkKWWizardStep *FinishStep; 00277 00278 vtkKWWizardWorkflow(const vtkKWWizardWorkflow&); // Not implemented 00279 void operator=(const vtkKWWizardWorkflow&); // Not implemented 00280 }; 00281 00282 #endif 00283 // @endcond
1.6.1