VTK
9.2.6
Interaction
Widgets
vtkBorderWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkBorderWidget.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
=========================================================================*/
75
76
#ifndef vtkBorderWidget_h
77
#define vtkBorderWidget_h
78
79
#include "
vtkAbstractWidget.h
"
80
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_2_0
81
#include "vtkInteractionWidgetsModule.h"
// For export macro
82
83
class
vtkBorderRepresentation
;
84
85
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
86
{
87
public
:
91
static
vtkBorderWidget
*
New
();
92
94
97
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
98
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
100
102
108
vtkSetMacro(
Selectable
,
vtkTypeBool
);
109
vtkGetMacro(
Selectable
,
vtkTypeBool
);
110
vtkBooleanMacro(
Selectable
,
vtkTypeBool
);
112
114
119
vtkSetMacro(
Resizable
,
vtkTypeBool
);
120
vtkGetMacro(
Resizable
,
vtkTypeBool
);
121
vtkBooleanMacro(
Resizable
,
vtkTypeBool
);
123
129
void
SetRepresentation
(
vtkBorderRepresentation
* r)
130
{
131
this->
Superclass::SetWidgetRepresentation
(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
132
}
133
137
vtkBorderRepresentation
*
GetBorderRepresentation
()
138
{
139
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
140
}
141
145
void
CreateDefaultRepresentation
()
override
;
146
151
vtkTypeBool
GetProcessEvents
()
override
;
152
153
protected
:
154
vtkBorderWidget
();
155
~vtkBorderWidget
()
override
;
156
162
virtual
void
SelectRegion
(
double
eventPos[2]);
163
164
// enable the selection of the region interior to the widget
165
vtkTypeBool
Selectable
;
166
vtkTypeBool
Resizable
;
167
168
// processes the registered events
169
static
void
SelectAction
(
vtkAbstractWidget
*);
170
static
void
TranslateAction
(
vtkAbstractWidget
*);
171
static
void
EndSelectAction
(
vtkAbstractWidget
*);
172
static
void
MoveAction
(
vtkAbstractWidget
*);
173
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
174
175
// Special internal methods to support subclasses handling events.
176
// If a non-zero value is returned, the subclass is handling the event.
177
virtual
int
SubclassSelectAction
() {
return
0; }
178
virtual
int
SubclassTranslateAction
() {
return
0; }
179
virtual
int
SubclassEndSelectAction
() {
return
0; }
180
virtual
int
SubclassMoveAction
() {
return
0; }
181
182
// helper methods for cursoe management
183
void
SetCursor
(
int
State)
override
;
184
185
// widget state
186
int
WidgetState
;
187
enum
WidgetStateType
188
{
189
Start
= 0,
190
Define
,
191
Manipulate
,
192
Selected
193
};
194
#if !defined(VTK_LEGACY_REMOVE)
195
VTK_DEPRECATED_IN_9_2_0
(
"because leading underscore is reserved"
)
196
typedef
WidgetStateType
_WidgetState
;
197
#endif
198
199
private
:
200
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
201
void
operator=(
const
vtkBorderWidget
&) =
delete
;
202
};
203
204
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkAbstractWidget::SetWidgetRepresentation
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:180
vtkBorderRepresentation
represent a vtkBorderWidget
Definition
vtkBorderRepresentation.h:59
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition
vtkBorderWidget.h:166
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::_WidgetState
WidgetStateType _WidgetState
Definition
vtkBorderWidget.h:196
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::WidgetState
int WidgetState
Definition
vtkBorderWidget.h:186
vtkBorderWidget::SelectRegion
virtual void SelectRegion(double eventPos[2])
Subclasses generally implement this method.
vtkBorderWidget::~vtkBorderWidget
~vtkBorderWidget() override
vtkBorderWidget::SetCursor
void SetCursor(int State) override
vtkBorderWidget::vtkBorderWidget
vtkBorderWidget()
vtkBorderWidget::Selectable
vtkTypeBool Selectable
Definition
vtkBorderWidget.h:165
vtkBorderWidget::WidgetStateType
WidgetStateType
Definition
vtkBorderWidget.h:188
vtkBorderWidget::Start
@ Start
Definition
vtkBorderWidget.h:189
vtkBorderWidget::Selected
@ Selected
Definition
vtkBorderWidget.h:192
vtkBorderWidget::Define
@ Define
Definition
vtkBorderWidget.h:190
vtkBorderWidget::Manipulate
@ Manipulate
Definition
vtkBorderWidget.h:191
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition
vtkBorderWidget.h:177
vtkBorderWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkBorderWidget::HoverLeaveAction
static void HoverLeaveAction(vtkAbstractWidget *)
vtkBorderWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkBorderWidget::SubclassMoveAction
virtual int SubclassMoveAction()
Definition
vtkBorderWidget.h:180
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition
vtkBorderWidget.h:179
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition
vtkBorderWidget.h:178
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkBorderWidget.h:129
vtkBorderWidget::GetProcessEvents
vtkTypeBool GetProcessEvents() override
Reimplement ProcessEvents to disable it when using relative location with windowLocation.
vtkBorderWidget::GetBorderRepresentation
vtkBorderRepresentation * GetBorderRepresentation()
Return the representation as a vtkBorderRepresentation.
Definition
vtkBorderWidget.h:137
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:34
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition
vtkWidgetRepresentation.h:60
vtkTypeBool
int vtkTypeBool
Definition
vtkABI.h:69
vtkAbstractWidget.h
vtkDeprecation.h
VTK_DEPRECATED_IN_9_2_0
#define VTK_DEPRECATED_IN_9_2_0(reason)
Definition
vtkDeprecation.h:116
Generated on Sun Mar 2 2025 00:00:00 for VTK by
1.13.2