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

GUI/Client/vtkPVTrackEditor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVTrackEditor.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 =========================================================================*/
00022 #ifndef __vtkPVTrackEditor_h
00023 #define __vtkPVTrackEditor_h
00024 
00025 #include "vtkPVTracedWidget.h"
00026 
00027 class vtkKWFrame;
00028 class vtkKWFrameWithLabel;
00029 class vtkKWLabel;
00030 class vtkKWPushButton;
00031 class vtkKWMenuButton;
00032 class vtkKWScaleWithEntry;
00033 class vtkPVSimpleAnimationCue;
00034 class vtkPVKeyFrame;
00035 class vtkPVTrackEditorObserver;
00036 
00037 class VTK_EXPORT vtkPVTrackEditor : public vtkPVTracedWidget
00038 {
00039 public:
00040   static vtkPVTrackEditor* New();
00041   vtkTypeRevisionMacro(vtkPVTrackEditor, vtkPVTracedWidget);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045   virtual void Create(vtkKWApplication* app);
00046 
00048 
00050   vtkGetObjectMacro(PropertiesFrame, vtkKWFrame);
00052 
00054   void SetAnimationCue(vtkPVSimpleAnimationCue*);
00055  
00057   void SetKeyFrameIndex(int index);
00058 
00062   void SetKeyFrameType(int type);
00063 
00065 
00066   void IndexChangedCallback();
00067   void AddKeyFrameButtonCallback();
00068   void DeleteKeyFrameButtonCallback();
00070 
00072   void Update();
00073 
00075 
00076   vtkGetObjectMacro(TitleLabel, vtkKWLabel);
00078 
00079   virtual void UpdateEnableState();
00080 
00081   //BTX
00082   // Flags used to specify which of the keyframes have fixed times.
00083   // By default FIRST_KEYFRAME_TIME_NOTCHANGABLE is true.
00084   // These flags can be OR-ed together to combine more than one flag.
00085   enum
00086     {
00087     ALL_TIMES_CHANGABLE = 0x00,
00088     FIRST_KEYFRAME_TIME_NOTCHANGABLE = 0x01,
00089     LAST_KEYFRAME_TIME_NOTCHANGABLE  = 0x02
00090     };
00091   //ETX
00092 
00094 
00096   vtkSetMacro(FixedTimeKeyframeFlag, int);
00097   vtkGetMacro(FixedTimeKeyframeFlag, int);
00099 protected:
00100   vtkPVTrackEditor();
00101   ~vtkPVTrackEditor();
00102 
00103   vtkPVSimpleAnimationCue* SimpleAnimationCue;
00104   vtkPVKeyFrame* ActiveKeyFrame;
00105   
00106   vtkKWFrameWithLabel* KeyFramePropertiesFrame;
00107   vtkKWLabel* TitleLabelLabel;
00108   vtkKWLabel* TitleLabel; // label to show the cue text representation.
00109   vtkKWFrame* PropertiesFrame;
00110   vtkKWFrame* TypeFrame; // frame containing the selection for differnt 
00111                          // types of waveforms.
00112   vtkKWPushButton* TypeImage;
00113   vtkKWMenuButton* TypeMenuButton;
00114   vtkKWPushButton* AddKeyFrameButton;
00115   vtkKWPushButton* DeleteKeyFrameButton;
00116   vtkKWLabel* TypeLabel;
00117   vtkKWScaleWithEntry* IndexScale;
00118   vtkKWLabel* SelectKeyFrameLabel;
00119 
00120 
00121   // flag indicating if the Interpolation should be enabled for the
00122   // current key frame. It is disabled for the last key frame.
00123   int InterpolationValid; 
00124   
00125 
00126   // flag used to determine which of the keyframes have fixed times.
00127   int FixedTimeKeyframeFlag;
00128   
00129   void BuildTypeMenu();
00130   void UpdateTypeImage(vtkPVKeyFrame*);
00131   void SetActiveKeyFrame(vtkPVKeyFrame* kf);
00132 
00135   void ShowKeyFrame(int index);
00136   
00137   void SetAddDeleteButtonVisibility(int visible);
00138 
00139   vtkPVTrackEditorObserver* Observer;
00140 private:
00141   vtkPVTrackEditor(const vtkPVTrackEditor&); // Not implemented.
00142   void operator=(const vtkPVTrackEditor&); // Not implemented.
00143 };
00144 
00145 
00146 #endif
00147 
00148 

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