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 
119 protected:
120  vtkPVAxesWidget();
121  ~vtkPVAxesWidget() override;
122 
125 
129 
130  static void ProcessEvents(
131  vtkObject* object, unsigned long event, void* clientdata, void* calldata);
132 
137  void UpdateCameraFromParentRenderer();
138 
140  int Moving;
141  int StartPosition[2];
142 
143  void UpdateCursorIcon();
144  void SetMouseCursor(int cursorState);
145 
147  {
148  Outside = 0,
153  BottomRight
154  };
155 
156  void OnButtonPress();
157  void OnMouseMove();
158  void OnButtonRelease();
159  void MoveWidget();
160  void ResizeTopLeft();
161  void ResizeTopRight();
162  void ResizeBottomLeft();
163  void ResizeBottomRight();
164  void SquareRenderer();
165 
166  unsigned long StartEventObserverId;
167 
168 private:
169  vtkPVAxesWidget(const vtkPVAxesWidget&) = delete;
170  void operator=(const vtkPVAxesWidget&) = delete;
171 };
172 
173 #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 &)