VTK: Charts/Core/vtkInteractiveArea.h Source File

| VTK 9.3.1

vtkInteractiveArea.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3
14 #ifndef vtkInteractiveArea_h
15 #define vtkInteractiveArea_h
16
17 #include "vtkChartsCoreModule.h" // For export macro
18 #include "vtkContextArea.h"
19 #include "vtkNew.h" // For vtkNew
20
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkContextTransform;
23 class vtkRectd;
24
25 class VTKCHARTSCORE_EXPORT vtkInteractiveArea : public vtkContextArea
26 {
27 public:
28 vtkTypeMacro(vtkInteractiveArea, vtkContextArea);
29
30 static vtkInteractiveArea* New();
31 void PrintSelf(ostream& os, vtkIndent indent) override;
32
34
37 bool Paint(vtkContext2D* painter) override;
38 bool Hit(const vtkContextMouseEvent& mouse) override;
39 bool MouseWheelEvent(const vtkContextMouseEvent& mouse, int delta) override;
40 bool MouseMoveEvent(const vtkContextMouseEvent& mouse) override;
41 bool MouseButtonPressEvent(const vtkContextMouseEvent& mouse) override;
43
44 protected:
45 vtkInteractiveArea();
46 ~vtkInteractiveArea() override;
47
49
52 void SetAxisRange(vtkRectd const& data) override;
53
54 private:
58 void RecalculateTickSpacing(vtkAxis* axis, int numClicks);
59
63 void ComputeViewTransform() override;
64
65 void ComputeZoom(
66 vtkVector2d const& origin, vtkVector2d& scale, vtkVector2d& shift, vtkVector2d& factor);
67
68 class MouseActions;
69 MouseActions* Actions;
70
71 vtkInteractiveArea(const vtkInteractiveArea&) = delete;
72 void operator=(const vtkInteractiveArea&) = delete;
73 };
74
75 VTK_ABI_NAMESPACE_END
76 #endif // vtkInteractiveArea_h
vtkAxis
takes care of drawing 2D axes
Definition: vtkAxis.h:70
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:59
vtkContextArea
Clipped, transformed area with axes for context items.
Definition: vtkContextArea.h:47
vtkContextArea::ComputeViewTransform
virtual void ComputeViewTransform()
vtkContextMouseEvent
data structure to represent mouse events.
Definition: vtkContextMouseEvent.h:39
vtkContextTransform
all children of this item are transformed by the vtkTransform2D of this item.
Definition: vtkContextTransform.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInteractiveArea
Implements zooming and panning in a vtkContextArea.
Definition: vtkInteractiveArea.h:26
vtkInteractiveArea::MouseWheelEvent
bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta) override
vtkAbstractContextItem API
vtkInteractiveArea::Hit
bool Hit(const vtkContextMouseEvent &mouse) override
vtkAbstractContextItem API
vtkInteractiveArea::~vtkInteractiveArea
~vtkInteractiveArea() override
vtkInteractiveArea::MouseButtonPressEvent
bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse) override
vtkAbstractContextItem API
vtkInteractiveArea::MouseMoveEvent
bool MouseMoveEvent(const vtkContextMouseEvent &mouse) override
vtkAbstractContextItem API
vtkInteractiveArea::New
static vtkInteractiveArea * New()
vtkInteractiveArea::vtkInteractiveArea
vtkInteractiveArea()
vtkInteractiveArea::SetAxisRange
void SetAxisRange(vtkRectd const &data) override
vtkContextArea API
vtkInteractiveArea::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractiveArea::Paint
bool Paint(vtkContext2D *painter) override
vtkAbstractContextItem API
vtkRectd
Definition: vtkRect.h:342
vtkVector2d
Definition: vtkVector.h:475
vtkX3D::scale
@ scale
Definition: vtkX3D.h:229
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkContextArea.h
vtkNew.h