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

GUI/Client/vtkPVBoxWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVBoxWidget.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 =========================================================================*/
00023 #ifndef __vtkPVBoxWidget_h
00024 #define __vtkPVBoxWidget_h
00025 
00026 #include "vtkPV3DWidget.h"
00027 
00028 class vtkPVSource;
00029 class vtkKWEntry;
00030 class vtkKWPushButton;
00031 class vtkKWWidget;
00032 class vtkKWLabel;
00033 class vtkKWThumbWheel;
00034 class vtkKWScaleWithEntry;
00035 class vtkXMProxy;
00036 class vtkPVInputMenu;
00037 
00038 class VTK_EXPORT vtkPVBoxWidget : public vtkPV3DWidget
00039 {
00040 public:
00041   static vtkPVBoxWidget* New();
00042   vtkTypeRevisionMacro(vtkPVBoxWidget, vtkPV3DWidget);
00043 
00044   void PrintSelf(ostream& os, vtkIndent indent);
00045 
00047   virtual void ResetInternal();
00048 
00049   //BTX
00052   virtual void Accept();
00053 
00055   virtual void Trace(ofstream *file);
00056 
00058 
00060   void SetTranslate();
00061   void SetOrientation();
00062   void SetScale();
00064 
00066 
00067   void SetScale(double p[3]){ this->SetScale(p[0], p[1], p[2]); }
00068   void SetScale(double px, double py, double pz);
00069   void SetScaleInternal(double x, double y, double z);
00070   void SetScaleInternal(double p[3]){this->SetScaleInternal(p[0],p[1],p[2]);}
00072 
00073   void SetTranslateInternal(double x, double y, double z);
00074   void SetTranslateInternal(double p[3]){this->SetTranslateInternal(p[0],p[1],p[2]);}
00075   void SetTranslate(double p[3]){ this->SetTranslate(p[0], p[1], p[2]); }
00076   void SetTranslate(double px, double py, double pz);
00077 
00078   void SetOrientationInternal(double px, double py, double pz);
00079   void SetOrientationInternal(double p[3]){this->SetOrientationInternal(p[0],p[1],p[2]);}
00080   void SetOrientation(double p[3]){ this->SetOrientation(p[0], p[1], p[2]); }
00081   void SetOrientation(double px, double py, double pz);
00082 
00089   virtual void UpdateEnableState();
00090 
00093   vtkSMProxy* GetProxyByName(const char* name);
00094  
00096 
00097   virtual void SetInputMenu(vtkPVInputMenu*);
00098   vtkGetObjectMacro(InputMenu, vtkPVInputMenu);
00100 
00102   virtual void Update();
00103 
00105   virtual void Initialize();
00106 
00109   virtual void EnableAnimation(){ this->RegisterAnimateableProxies();} ;
00110 
00114   virtual void DisableAnimation() { this->UnregisterAnimateableProxies();} ;
00115 
00117   virtual void Create(vtkKWApplication *app);
00118 
00119 protected:
00120   vtkPVBoxWidget();
00121   ~vtkPVBoxWidget();
00122 
00124 
00126   virtual void PlaceWidget(double bds[6]);
00127   virtual void PlaceWidget() { this->Superclass::PlaceWidget(); }
00129   
00131   virtual void ChildCreate(vtkPVApplication*);
00132 
00134   virtual void ExecuteEvent(vtkObject*, unsigned long, void*);
00135 
00137   void UpdateFromBox();
00138 
00139   vtkKWFrame*        ControlFrame;
00140   vtkKWLabel*        TranslateLabel;
00141   vtkKWThumbWheel*   TranslateThumbWheel[3];
00142   vtkKWLabel*        ScaleLabel;
00143   vtkKWThumbWheel*   ScaleThumbWheel[3];
00144   vtkKWLabel*        OrientationLabel;
00145   vtkKWScaleWithEntry* OrientationScale[3];
00146 
00147   vtkPVInputMenu*   InputMenu;
00148 
00149   vtkSMProxy *BoxProxy; //The Implicit function proxy
00150   vtkSMProxy *BoxTransformProxy;
00151 
00152   int ReadXMLAttributes(vtkPVXMLElement* element,
00153     vtkPVXMLPackageParser* parser);
00154 
00157   virtual void SaveInBatchScript(ofstream *file);
00158 
00159   //BTX
00161 
00164   virtual vtkPVWidget* ClonePrototypeInternal(
00165     vtkPVSource* pvSource,
00166     vtkArrayMap<vtkPVWidget*, 
00167     vtkPVWidget*>* map);
00168   //ETX
00170 
00171 
00173 
00177   void GetPositionInternal(double position[3]);
00178   void GetRotationInternal(double rotation[3]);
00179   void GetScaleInternal(double scale[3]);
00181   
00182   double* GetPositionFromGUI();
00183   double* GetRotationFromGUI();
00184   double* GetScaleFromGUI();
00185   vtkSetVector3Macro(PositionGUI, double);
00186   vtkSetVector3Macro(RotationGUI, double);
00187   vtkSetVector3Macro(ScaleGUI,    double);
00188   double PositionGUI[3];
00189   double RotationGUI[3];
00190   double ScaleGUI[3];
00191 
00192   void SetupPropertyObservers();
00193   void UnsetPropertyObservers();
00194 
00195   void RegisterAnimateableProxies();
00196   void UnregisterAnimateableProxies();
00197 private:
00198   vtkPVBoxWidget(const vtkPVBoxWidget&); // Not implemented
00199   void operator=(const vtkPVBoxWidget&); // Not implemented
00200 };
00201 
00202 #endif

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