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

GUI/Client/vtkPVAxesWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVAxesWidget.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 __vtkPVAxesWidget_h
00023 #define __vtkPVAxesWidget_h
00024 
00025 #include "vtkInteractorObserver.h"
00026 
00027 class vtkActor2D;
00028 class vtkKWApplication;
00029 class vtkPolyData;
00030 class vtkPVAxesActor;
00031 class vtkPVAxesWidgetObserver;
00032 class vtkRenderer;
00033 
00034 class VTK_EXPORT vtkPVAxesWidget : public vtkInteractorObserver
00035 {
00036 public:
00037   static vtkPVAxesWidget* New();
00038   vtkTypeRevisionMacro(vtkPVAxesWidget, vtkInteractorObserver);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00042 
00043   void SetAxesActor(vtkPVAxesActor *actor);
00044   vtkGetObjectMacro(AxesActor, vtkPVAxesActor);
00046 
00048   virtual void SetEnabled(int);
00049 
00050   //BTX
00052 
00053   void SetParentRenderer(vtkRenderer *ren);
00054   vtkRenderer* GetParentRenderer();
00055   //ETX
00057   
00060   void ExecuteEvent(vtkObject *o, unsigned long event, void *calldata);
00061 
00063 
00065   void SetInteractive(int state);
00066   vtkGetMacro(Interactive, int);
00067   vtkBooleanMacro(Interactive, int);
00069   
00071 
00073   void SetOutlineColor(double r, double g, double b);
00074   double *GetOutlineColor();
00076   
00078 
00079   void SetAxisLabelColor(double r, double g, double b);
00080   double *GetAxisLabelColor();
00082   
00084 
00085   void SetViewport(double minX, double minY, double maxX, double maxY);
00086   double* GetViewport();
00088   
00089 protected:
00090   vtkPVAxesWidget();
00091   ~vtkPVAxesWidget();
00092   
00093   vtkRenderer *Renderer;
00094   vtkRenderer *ParentRenderer;
00095   
00096   vtkPVAxesActor *AxesActor;
00097   vtkPolyData *Outline;
00098   vtkActor2D *OutlineActor;
00099   
00100   static void ProcessEvents(vtkObject *object, unsigned long event,
00101                             void *clientdata, void *calldata);
00102 
00103   vtkPVAxesWidgetObserver *Observer;
00104   int StartTag;
00105   
00106   int MouseCursorState;
00107   int Moving;
00108   int StartPosition[2];
00109 
00110   int Interactive;
00111   
00112   void UpdateCursorIcon();
00113   void SetMouseCursor(int cursorState);
00114   
00115 //BTX
00116   int State;
00117   
00118   enum AxesWidgetState
00119   {
00120     Outside = 0,
00121     Inside,
00122     TopLeft,
00123     TopRight,
00124     BottomLeft,
00125     BottomRight
00126   };
00127 //ETX
00128   
00129   void OnButtonPress();
00130   void OnMouseMove();
00131   void OnButtonRelease();
00132 
00133   void MoveWidget();
00134   void ResizeTopLeft();
00135   void ResizeTopRight();
00136   void ResizeBottomLeft();
00137   void ResizeBottomRight();
00138   
00139   void SquareRenderer();
00140 
00141   unsigned long StartEventObserverId;  
00142 private:
00143   vtkPVAxesWidget(const vtkPVAxesWidget&);  // Not implemented
00144   void operator=(const vtkPVAxesWidget&);  // Not implemented
00145 };
00146 
00147 #endif

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