Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

GUI/Client/vtkPVVCRControl.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVVCRControl.h,v $
00005 
00006   Copyright (c) Kitware, Inc.
00007   All rights reserved.
00008   See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00025 #ifndef __vtkPVVCRControl_h
00026 #define __vtkPVVCRControl_h
00027 
00028 #include "vtkKWToolbar.h"
00029 
00030 class vtkKWPushButton;
00031 class vtkKWCheckButton;
00032 
00033 class VTK_EXPORT vtkPVVCRControl : public vtkKWToolbar
00034 {
00035 public:
00036   static vtkPVVCRControl* New();
00037   vtkTypeRevisionMacro(vtkPVVCRControl, vtkKWToolbar);
00038   void PrintSelf(ostream& os, vtkIndent indent);
00039 
00041 
00042   void SetPlayCommand(vtkKWObject* calledObject, const char* commandString);
00043   void SetStopCommand(vtkKWObject* calledObject, const char* commandString);
00044   void SetGoToBeginningCommand(vtkKWObject* calledObject, const char* commandString);
00045   void SetGoToEndCommand(vtkKWObject* calledObject, const char* commandString);
00046   void SetGoToPreviousCommand(vtkKWObject* calledObject, const char* commandString);
00047   void SetGoToNextCommand(vtkKWObject* calledObject, const char* commandString);
00048   void SetLoopCheckCommand(vtkKWObject* calledObject, const char* commandString);
00049   void SetRecordCheckCommand(vtkKWObject* calledObject, const char* commandString);
00050   void SetRecordStateCommand(vtkKWObject* calledObject, const char* commandString);
00051   void SetSaveAnimationCommand(vtkKWObject* calledObject, const char* commandString);
00053 
00055 
00056   virtual void Create(vtkKWApplication* app);
00057   virtual void UpdateEnableState();
00059 
00061 
00062   vtkSetMacro(InPlay, int);
00063   vtkGetMacro(InPlay, int);
00065 
00066   void SetLoopButtonState(int state);
00067   int GetLoopButtonState();
00068 
00069   void SetRecordCheckButtonState(int state);
00070   int GetRecordCheckButtonState();
00071     
00073 
00074   void PlayCallback();
00075   void StopCallback();
00076   void GoToBeginningCallback();
00077   void GoToEndCallback();
00078   void GoToPreviousCallback();
00079   void GoToNextCallback();
00080   void LoopCheckCallback();
00081   void RecordCheckCallback();
00082   void RecordStateCallback();
00083   void SaveAnimationCallback();
00085 
00087 
00089   vtkSetMacro(Mode, int);
00090   vtkGetMacro(Mode, int);
00091   void SetModeToPlayBack() { this->SetMode(vtkPVVCRControl::PLAYBACK); }
00092   void SetModeToRecord() { this->SetMode(vtkPVVCRControl::RECORD); }
00093   void SetModeToBoth() { this->SetMode(vtkPVVCRControl::BOTH); }
00095 //BTX
00096   enum {
00097     PLAYBACK,
00098     RECORD,
00099     BOTH
00100   };
00101 //ETX
00102   
00103 protected:
00104   vtkPVVCRControl();
00105   ~vtkPVVCRControl();
00106 
00107   int InPlay; // used to decide enable state of the buttons.
00108   vtkKWPushButton *PlayButton;
00109   vtkKWPushButton *StopButton;
00110   vtkKWPushButton *GoToBeginningButton;
00111   vtkKWPushButton *GoToEndButton;
00112   vtkKWPushButton *GoToPreviousButton;
00113   vtkKWPushButton *GoToNextButton;
00114   vtkKWCheckButton *LoopCheckButton;
00115   vtkKWCheckButton *RecordCheckButton;
00116   vtkKWPushButton *RecordStateButton;
00117   vtkKWPushButton *SaveAnimationButton;
00118 
00119   char* PlayCommand;
00120   char* StopCommand;
00121   char* GoToBeginningCommand;
00122   char* GoToEndCommand;
00123   char* GoToPreviousCommand;
00124   char* GoToNextCommand;
00125   char* LoopCheckCommand;
00126   char* RecordCheckCommand;
00127   char* RecordStateCommand;
00128   char* SaveAnimationCommand;
00129 
00130   int Mode;
00131 
00132   vtkSetStringMacro(PlayCommand);
00133   vtkSetStringMacro(StopCommand);
00134   vtkSetStringMacro(GoToBeginningCommand);
00135   vtkSetStringMacro(GoToEndCommand);
00136   vtkSetStringMacro(GoToPreviousCommand);
00137   vtkSetStringMacro(GoToNextCommand);
00138   vtkSetStringMacro(LoopCheckCommand);
00139   vtkSetStringMacro(RecordCheckCommand);
00140   vtkSetStringMacro(RecordStateCommand);
00141   vtkSetStringMacro(SaveAnimationCommand);
00142 
00143   void InvokeCommand(const char* command);
00144 private:
00145   vtkPVVCRControl(const vtkPVVCRControl&); // Not implemented.
00146   void operator=(const vtkPVVCRControl&); // Not implemented.
00147 };
00148 
00149 #endif
00150 

Generated on Tue May 30 12:31:41 2006 for ParaView by doxygen 1.3.5