Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef __vtkPVAxesWidget_h
00039 #define __vtkPVAxesWidget_h
00040
00041 #include "SVTK.h"
00042 #include "vtkInteractorObserver.h"
00043
00044 class vtkActor2D;
00045 class vtkKWApplication;
00046 class vtkPolyData;
00047 class vtkPVAxesActor;
00048 class vtkPVAxesWidgetObserver;
00049 class vtkRenderer;
00050
00051 class SVTK_EXPORT vtkPVAxesWidget : public vtkInteractorObserver
00052 {
00053 public:
00054 static vtkPVAxesWidget* New();
00055 vtkTypeRevisionMacro(vtkPVAxesWidget, vtkInteractorObserver);
00056 void PrintSelf(ostream& os, vtkIndent indent);
00057
00058
00059
00060 void SetAxesActor(vtkPVAxesActor *actor);
00061 vtkGetObjectMacro(AxesActor, vtkPVAxesActor);
00062
00063
00064
00065 virtual void SetEnabled(int);
00066
00067
00068
00069
00070 void SetParentRenderer(vtkRenderer *ren);
00071 vtkRenderer* GetParentRenderer();
00072
00073
00074
00075
00076
00077 void ExecuteEvent(vtkObject *o, unsigned long event, void *calldata);
00078
00079
00080
00081 void SetInteractive(int state);
00082 vtkGetMacro(Interactive, int);
00083 vtkBooleanMacro(Interactive, int);
00084
00085
00086
00087
00088 void SetOutlineColor(double r, double g, double b);
00089 double *GetOutlineColor();
00090
00091
00092
00093 void SetAxisLabelColor(double r, double g, double b);
00094 double *GetAxisLabelColor();
00095
00096
00097
00098 void SetViewport(double minX, double minY, double maxX, double maxY);
00099 double* GetViewport();
00100
00101 protected:
00102 vtkPVAxesWidget();
00103 ~vtkPVAxesWidget();
00104
00105 vtkRenderer *Renderer;
00106 vtkRenderer *ParentRenderer;
00107
00108 vtkPVAxesActor *AxesActor;
00109 vtkPolyData *Outline;
00110 vtkActor2D *OutlineActor;
00111
00112 static void ProcessEvents(vtkObject *object, unsigned long event,
00113 void *clientdata, void *calldata);
00114
00115 vtkPVAxesWidgetObserver *Observer;
00116 int StartTag;
00117
00118 int MouseCursorState;
00119 int Moving;
00120 int StartPosition[2];
00121
00122 int Interactive;
00123
00124 void UpdateCursorIcon();
00125 void SetMouseCursor(int cursorState);
00126
00127
00128 int State;
00129
00130 enum AxesWidgetState
00131 {
00132 Outside = 0,
00133 Inside,
00134 TopLeft,
00135 TopRight,
00136 BottomLeft,
00137 BottomRight
00138 };
00139
00140
00141 void OnButtonPress();
00142 void OnMouseMove();
00143 void OnButtonRelease();
00144
00145 void MoveWidget();
00146 void ResizeTopLeft();
00147 void ResizeTopRight();
00148 void ResizeBottomLeft();
00149 void ResizeBottomRight();
00150
00151 void SquareRenderer();
00152
00153 unsigned long StartEventObserverId;
00154 private:
00155 vtkPVAxesWidget(const vtkPVAxesWidget&);
00156 void operator=(const vtkPVAxesWidget&);
00157 };
00158
00159 #endif