VTK
9.0.1
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
class
vtkContextTransform
;
31
class
vtkRectd
;
32
33
class
VTKCHARTSCORE_EXPORT
vtkInteractiveArea
:
public
vtkContextArea
34
{
35
public
:
36
vtkTypeMacro(
vtkInteractiveArea
,
vtkContextArea
);
37
38
static
vtkInteractiveArea
*
New
();
39
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
40
42
45
bool
Paint
(
vtkContext2D
* painter)
override
;
46
bool
Hit
(
const
vtkContextMouseEvent
& mouse)
override
;
47
bool
MouseWheelEvent
(
const
vtkContextMouseEvent
& mouse,
int
delta)
override
;
48
bool
MouseMoveEvent
(
const
vtkContextMouseEvent
& mouse)
override
;
49
bool
MouseButtonPressEvent
(
const
vtkContextMouseEvent
& mouse)
override
;
51
52
protected
:
53
vtkInteractiveArea
();
54
~vtkInteractiveArea
()
override
;
55
57
60
void
SetAxisRange
(
vtkRectd
const
&
data
)
override
;
61
62
private
:
66
void
RecalculateTickSpacing(
vtkAxis
* axis,
int
const
numClicks);
67
71
void
ComputeViewTransform
()
override
;
72
73
void
ComputeZoom(
74
vtkVector2d
const
& origin,
vtkVector2d
&
scale
,
vtkVector2d
& shift,
vtkVector2d
& factor);
75
76
class
MouseActions;
77
MouseActions* Actions;
78
79
vtkInteractiveArea
(
const
vtkInteractiveArea
&) =
delete
;
80
void
operator=(
const
vtkInteractiveArea
&) =
delete
;
81
};
82
83
#endif
// vtkInteractiveArea_h
vtkAxis
takes care of drawing 2D axes
Definition:
vtkAxis.h:69
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition:
vtkContext2D.h:53
vtkContextArea
Clipped, transformed area with axes for context items.
Definition:
vtkContextArea.h:55
vtkContextArea::ComputeViewTransform
virtual void ComputeViewTransform()
vtkContextMouseEvent
data structure to represent mouse events.
Definition:
vtkContextMouseEvent.h:35
vtkContextTransform
all children of this item are transformed by the vtkTransform2D of this item.
Definition:
vtkContextTransform.h:37
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:34
vtkInteractiveArea
Implements zooming and panning in a vtkContextArea.
Definition:
vtkInteractiveArea.h:34
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:341
vtkVector2d
Definition:
vtkVector.h:445
vtkX3D::scale
@ scale
Definition:
vtkX3D.h:235
vtkX3D::data
@ data
Definition:
vtkX3D.h:321
vtkContextArea.h
vtkNew.h
Generated on Tue Dec 14 2021 07:53:30 for VTK by
1.9.1