vtkPVAxesWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMProxy.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkPVAxesWidget_h
30 #define vtkPVAxesWidget_h
31 
32 #include "vtkInteractorObserver.h"
33 #include "vtkRemotingViewsModule.h" // needed for export macro
34 
35 class vtkActor2D;
36 class vtkKWApplication;
37 class vtkPolyData;
38 class vtkPVAxesActor;
39 class vtkRenderer;
40 
42 {
43 public:
44  static vtkPVAxesWidget* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
51  static const int RendererLayer = 1;
52 
54 
57  void SetAxesActor(vtkPVAxesActor* actor);
58  vtkGetObjectMacro(AxesActor, vtkPVAxesActor);
60 
62 
65  void SetParentRenderer(vtkRenderer* ren);
66  vtkRenderer* GetParentRenderer();
68 
72  void SetInteractor(vtkRenderWindowInteractor* iren) override;
73 
77  vtkGetObjectMacro(Renderer, vtkRenderer);
78 
83  void SetEnabled(int) override;
84 
86 
90  void SetVisibility(bool val);
91  bool GetVisibility();
93 
95 
99  void SetOutlineColor(double r, double g, double b);
100  double* GetOutlineColor();
102 
104 
107  void SetAxisLabelColor(double r, double g, double b);
108  double* GetAxisLabelColor();
110 
112 
115  void SetViewport(double minX, double minY, double maxX, double maxY);
116  double* GetViewport();
118 
120 
123  void SetXAxisColor(double r, double g, double b);
124  void SetYAxisColor(double r, double g, double b);
125  void SetZAxisColor(double r, double g, double b);
126 
127  void SetXAxisVisibility(bool vis);
128  void SetYAxisVisibility(bool vis);
129  void SetZAxisVisibility(bool vis);
130 
131  void SetXAxisLabelText(const char* text);
132  void SetYAxisLabelText(const char* text);
133  void SetZAxisLabelText(const char* text);
135 
136 protected:
137  vtkPVAxesWidget();
138  ~vtkPVAxesWidget() override;
139 
142 
146 
147  static void ProcessEvents(
148  vtkObject* object, unsigned long event, void* clientdata, void* calldata);
149 
154  void UpdateCameraFromParentRenderer();
155 
157  int Moving;
158  int StartPosition[2];
159 
160  void UpdateCursorIcon();
161  void SetMouseCursor(int cursorState);
162 
164  {
165  Outside = 0,
170  BottomRight
171  };
172 
173  void OnButtonPress();
174  void OnMouseMove();
175  void OnButtonRelease();
176  void MoveWidget();
177  void ResizeTopLeft();
178  void ResizeTopRight();
179  void ResizeBottomLeft();
180  void ResizeBottomRight();
181  void SquareRenderer();
182 
183  unsigned long StartEventObserverId;
184 
185 private:
186  vtkPVAxesWidget(const vtkPVAxesWidget&) = delete;
187  void operator=(const vtkPVAxesWidget&) = delete;
188 };
189 
190 #endif
virtual void SetInteractor(vtkRenderWindowInteractor *iren)
unsigned long StartEventObserverId
vtkRenderer * Renderer
#define VTKREMOTINGVIEWS_EXPORT
static void ProcessEvents(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
virtual void SetEnabled(int)
vtkPVAxesActor * AxesActor
a 3D axes representation
vtkActor2D * OutlineActor
A widget to manipulate vtkPVAxesWidget.
vtkPolyData * Outline
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
vtkRenderer * ParentRenderer
void operator=(const vtkObjectBase &)