VTK
dox
Charts
Core
vtkInteractiveArea.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkInteractiveArea.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm 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
=========================================================================*/
15
23
#ifndef vtkInteractiveArea_h
24
#define vtkInteractiveArea_h
25
26
#include "vtkChartsCoreModule.h"
// For export macro
27
#include "
vtkContextArea.h
"
28
#include "
vtkNew.h
"
// For vtkNew
29
30
31
class
vtkContextTransform
;
32
class
vtkRectd
;
33
34
class
VTKCHARTSCORE_EXPORT
vtkInteractiveArea
:
public
vtkContextArea
35
{
36
public
:
37
vtkTypeMacro(
vtkInteractiveArea
,
vtkContextArea
)
38
39
static
vtkInteractiveArea
* New();
40
void
PrintSelf(ostream &os,
vtkIndent
indent) override;
41
43
46
bool
Paint(
vtkContext2D
*painter) override;
47
bool
Hit(const
vtkContextMouseEvent
& mouse) override;
48
bool
MouseWheelEvent(const
vtkContextMouseEvent
& mouse,
int
delta) override;
49
bool
MouseMoveEvent(const
vtkContextMouseEvent
&mouse) override;
50
bool
MouseButtonPressEvent(const
vtkContextMouseEvent
&mouse) override;
52
53
protected:
54
vtkInteractiveArea
();
55
~
vtkInteractiveArea
() override;
56
58
61
void
SetAxisRange(
vtkRectd
const&
data
) override;
62
63
private:
67
void
RecalculateTickSpacing(
vtkAxis
* axis,
int
const numClicks);
68
72
void
ComputeViewTransform() override;
73
74
void
ComputeZoom(
vtkVector2d
const& origin,
vtkVector2d
&
scale
,
75
vtkVector2d
& shift,
vtkVector2d
& factor);
76
77
class MouseActions;
78
MouseActions* Actions;
79
80
vtkInteractiveArea
(const
vtkInteractiveArea
&) = delete;
81
void
operator=(const
vtkInteractiveArea
&) = delete;
82
};
83
84
#endif //vtkInteractiveArea_h
vtkContextMouseEvent
data structure to represent mouse events.
Definition:
vtkContextMouseEvent.h:41
vtkX3D::scale
@ scale
Definition:
vtkX3D.h:229
vtkInteractiveArea
Implements zooming and panning in a vtkContextArea.
Definition:
vtkInteractiveArea.h:35
vtkX3D::data
@ data
Definition:
vtkX3D.h:315
vtkContextArea
Clipped, transformed area with axes for context items.
Definition:
vtkContextArea.h:58
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition:
vtkContext2D.h:59
vtkRectd
Definition:
vtkRect.h:342
vtkVector2d
Definition:
vtkVector.h:428
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:40
vtkContextArea.h
vtkContextTransform
all children of this item are transformed by the vtkTransform2D of this item.
Definition:
vtkContextTransform.h:40
vtkNew.h
vtkAxis
takes care of drawing 2D axes
Definition:
vtkAxis.h:72
Generated by
1.8.20