VTK
9.2.6
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
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
=========================================================================*/
79
#ifndef vtkBorderWidget_h
80
#define vtkBorderWidget_h
81
82
#include "
vtkAbstractWidget.h
"
83
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_2_0
84
#include "vtkInteractionWidgetsModule.h"
// For export macro
85
86
class
vtkBorderRepresentation
;
87
88
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
89
{
90
public
:
94
static
vtkBorderWidget
*
New
();
95
97
100
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
101
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
103
105
111
vtkSetMacro(Selectable,
vtkTypeBool
);
112
vtkGetMacro(Selectable,
vtkTypeBool
);
113
vtkBooleanMacro(Selectable,
vtkTypeBool
);
115
117
122
vtkSetMacro(Resizable,
vtkTypeBool
);
123
vtkGetMacro(Resizable,
vtkTypeBool
);
124
vtkBooleanMacro(Resizable,
vtkTypeBool
);
126
132
void
SetRepresentation
(
vtkBorderRepresentation
* r)
133
{
134
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
135
}
136
140
vtkBorderRepresentation
*
GetBorderRepresentation
()
141
{
142
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
143
}
144
148
void
CreateDefaultRepresentation
()
override
;
149
154
vtkTypeBool
GetProcessEvents
()
override
;
155
156
protected
:
157
vtkBorderWidget
();
158
~vtkBorderWidget
()
override
;
159
165
virtual
void
SelectRegion
(
double
eventPos[2]);
166
167
// enable the selection of the region interior to the widget
168
vtkTypeBool
Selectable
;
169
vtkTypeBool
Resizable
;
170
171
// processes the registered events
172
static
void
SelectAction
(
vtkAbstractWidget
*);
173
static
void
TranslateAction
(
vtkAbstractWidget
*);
174
static
void
EndSelectAction
(
vtkAbstractWidget
*);
175
static
void
MoveAction
(
vtkAbstractWidget
*);
176
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
177
178
// Special internal methods to support subclasses handling events.
179
// If a non-zero value is returned, the subclass is handling the event.
180
virtual
int
SubclassSelectAction
() {
return
0; }
181
virtual
int
SubclassTranslateAction
() {
return
0; }
182
virtual
int
SubclassEndSelectAction
() {
return
0; }
183
virtual
int
SubclassMoveAction
() {
return
0; }
184
185
// helper methods for cursoe management
186
void
SetCursor
(
int
State)
override
;
187
188
// widget state
189
int
WidgetState
;
190
enum
WidgetStateType
191
{
192
Start = 0,
193
Define
,
194
Manipulate
,
195
Selected
196
};
197
#if !defined(VTK_LEGACY_REMOVE)
198
VTK_DEPRECATED_IN_9_2_0
(
"because leading underscore is reserved"
)
199
typedef
WidgetStateType
_WidgetState
;
200
#endif
201
202
private
:
203
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
204
void
operator=(
const
vtkBorderWidget
&) =
delete
;
205
};
206
207
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:66
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:180
vtkBorderRepresentation
represent a vtkBorderWidget
Definition
vtkBorderRepresentation.h:62
vtkBorderWidget
place a border around a 2D rectangular region
Definition
vtkBorderWidget.h:89
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition
vtkBorderWidget.h:169
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::WidgetState
int WidgetState
Definition
vtkBorderWidget.h:189
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:168
vtkBorderWidget::WidgetStateType
WidgetStateType
Definition
vtkBorderWidget.h:191
vtkBorderWidget::Define
@ Define
Definition
vtkBorderWidget.h:193
vtkBorderWidget::Manipulate
@ Manipulate
Definition
vtkBorderWidget.h:194
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition
vtkBorderWidget.h:180
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:183
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition
vtkBorderWidget.h:182
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition
vtkBorderWidget.h:181
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkBorderWidget.h:132
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:140
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:40
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 Mon May 13 2024 00:00:00 for VTK by
1.10.0