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

GUI/Client/vtkPVAnimationManager.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVAnimationManager.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 =========================================================================*/
00070 #ifndef __vtkPVAnimationManager_h
00071 #define __vtkPVAnimationManager_h
00072 
00073 #include "vtkPVTracedWidget.h"
00074 
00075 class vtkPVActiveTrackSelector;
00076 class vtkPVAnimationCueTree;
00077 class vtkPVAnimationCue;
00078 class vtkPVAnimationManagerInternals;
00079 class vtkPVAnimationManagerObserver;
00080 class vtkPVAnimationScene;
00081 class vtkPVHorizontalAnimationInterface;
00082 class vtkPVSimpleAnimationCue;
00083 class vtkPVSource;
00084 class vtkPVVerticalAnimationInterface;
00085 class vtkSMProxy;
00086 class vtkSMProxyIterator;
00087 class vtkSMStringVectorProperty;
00088 
00089 class VTK_EXPORT vtkPVAnimationManager : public vtkPVTracedWidget
00090 {
00091 public:
00092   static vtkPVAnimationManager* New();
00093   vtkTypeRevisionMacro(vtkPVAnimationManager, vtkPVTracedWidget);
00094   void PrintSelf(ostream& os ,vtkIndent indent);
00095 
00097   virtual void Create(vtkKWApplication* app);
00098   
00100 
00101   void SetVerticalParent(vtkKWWidget* parent);
00102   void SetHorizontalParent(vtkKWWidget* parent);
00104 
00105   // Get the Vertical and Horizontal animation interface objects.
00106   vtkGetObjectMacro(VAnimationInterface, vtkPVVerticalAnimationInterface);
00107   vtkGetObjectMacro(HAnimationInterface, vtkPVHorizontalAnimationInterface);
00108 
00110 
00111   void ShowAnimationInterfaces();
00112   void ShowVAnimationInterface();
00113   void ShowHAnimationInterface();
00115 
00119   void Update();
00120 
00122 
00124   vtkGetObjectMacro(AnimationScene, vtkPVAnimationScene);
00126 
00128   int GetInPlay();
00129 
00135   void SetTimeMarker(double normalized_time);
00136 
00137   void SaveAnimation();
00138   void SaveGeometry();
00139 
00141   virtual void SaveInBatchScript(ofstream* file);
00142 
00145   void SaveState(ofstream* file);
00146 
00148 
00151   vtkSetMacro(RecordAll, int);
00152   vtkGetMacro(RecordAll, int);
00154  
00156   void RecordState();
00157 
00159 
00160   void StartRecording();
00161   void StopRecording();
00163 
00170   virtual void UpdateEnableState();
00171 
00174   void SetAnimationTime(double ntime);
00175 
00177   void InvalidateAllGeometries();
00178 
00182   void AddDefaultAnimation(vtkPVSource* pvSource);
00183 
00184   virtual void ValidateAndAddSpecialCues();
00185 
00187 
00188   virtual void SaveWindowGeometryToRegistry();
00189   virtual void RestoreWindowGeometryFromRegistry();
00191 
00193   void RemoveAllKeyFrames();
00194 
00196 
00199   vtkGetMacro(AdvancedView, int);
00200   void SetAdvancedView(int advanced);
00202 
00205   vtkPVAnimationCueTree* GetAnimationCueTreeForProxy(const char* proxyname);
00206 
00208 
00209   vtkGetMacro(InRecording, int);
00211 
00213 
00214   void SetCacheGeometry(int cache);
00215   int GetCacheGeometry();
00217 
00219 
00223   void EnableCacheCheck();
00224   void DisableCacheCheck();
00226 
00228   void PrepareForDelete();
00229 
00231 
00232   vtkGetObjectMacro(ActiveTrackSelector, vtkPVActiveTrackSelector);
00234 
00236   VTK_LEGACY(void SetCurrentTime(double ntime));
00237 
00238 protected:
00239   vtkPVAnimationManager();
00240   ~vtkPVAnimationManager();
00241 
00242   int RecordAll;
00243   vtkKWWidget* VerticalParent;
00244   vtkKWWidget* HorizontalParent;
00245 
00246   vtkSMProxyIterator* ProxyIterator;
00247 
00248   vtkPVVerticalAnimationInterface* VAnimationInterface;
00249   vtkPVHorizontalAnimationInterface* HAnimationInterface;
00250   vtkPVAnimationScene* AnimationScene;
00251   vtkPVActiveTrackSelector* ActiveTrackSelector;
00252 
00253   vtkPVAnimationManagerInternals* Internals;
00254 
00255   
00257 
00259   char* GetSourceListName(const char* proxyname);
00260   char* GetSourceName(const char* proxyname);
00261   char* GetSubSourceName(const char* proxyname);
00262   char* GetSourceKey(const char* proxyname);
00264 
00266 
00267   int AddProperties(vtkPVSource* pvSource, vtkSMProxy* proxy, 
00268     vtkPVAnimationCueTree* pvCueTree);
00270 
00273   void ValidateOldSources();
00274 
00278   void AddNewSources();
00279 
00280 //BTX
00281   friend class vtkPVAnimationManagerObserver;
00282   vtkPVAnimationManagerObserver* Observer;
00283   void ExecuteEvent(vtkObject* obj, unsigned long event, void* calldata);
00284 //ETX
00285 
00286   // Helper method to set up the cue for a particular property.
00287   // Returns the newly created cue.
00288   vtkPVAnimationCue* SetupCue(vtkPVSource* pvSource, 
00289     vtkPVAnimationCueTree* parent, vtkSMProxy* proxy, 
00290     const char* propertyname, const char* domainname, int element, 
00291     const char* label, vtkPVAnimationCue* cueToSetup = NULL);
00292 
00293   int AddStringVectorProperty(vtkPVSource* pvSource, vtkSMProxy* proxy, 
00294     vtkPVAnimationCueTree* pvCueTree, vtkSMStringVectorProperty* svp);
00295   
00296   void InitializeObservers(vtkPVAnimationCue* cue);
00297 
00298   vtkPVAnimationCueTree* GetAnimationCueTreeForSource(vtkPVSource* pvSource);
00299 
00300   int AdvancedView;
00301   int InRecording;
00302   double RecordingIncrement;
00303 
00304   unsigned long ObserverTag;
00305 
00306 private:
00307   vtkPVAnimationManager(const vtkPVAnimationManager&); // Not implemented.
00308   void operator=(const vtkPVAnimationManager&); // Not implemented.
00309 };
00310 
00311 #endif
00312 

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