VTK
9.2.6
Main Page
Related Pages
Modules
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
=========================================================================*/
88
#ifndef vtkBorderWidget_h
89
#define vtkBorderWidget_h
90
91
#include "
vtkAbstractWidget.h
"
92
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_2_0
93
#include "vtkInteractionWidgetsModule.h"
// For export macro
94
95
class
vtkBorderRepresentation
;
96
97
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
98
{
99
public
:
103
static
vtkBorderWidget
*
New
();
104
106
109
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
110
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
112
114
120
vtkSetMacro(Selectable,
vtkTypeBool
);
121
vtkGetMacro(Selectable,
vtkTypeBool
);
122
vtkBooleanMacro(Selectable,
vtkTypeBool
);
124
126
131
vtkSetMacro(Resizable,
vtkTypeBool
);
132
vtkGetMacro(Resizable,
vtkTypeBool
);
133
vtkBooleanMacro(Resizable,
vtkTypeBool
);
135
141
void
SetRepresentation
(
vtkBorderRepresentation
* r)
142
{
143
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
144
}
145
149
vtkBorderRepresentation
*
GetBorderRepresentation
()
150
{
151
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
152
}
153
157
void
CreateDefaultRepresentation
()
override
;
158
163
vtkTypeBool
GetProcessEvents
()
override
;
164
165
protected
:
166
vtkBorderWidget
();
167
~vtkBorderWidget
()
override
;
168
174
virtual
void
SelectRegion
(
double
eventPos[2]);
175
176
// enable the selection of the region interior to the widget
177
vtkTypeBool
Selectable
;
178
vtkTypeBool
Resizable
;
179
180
// processes the registered events
181
static
void
SelectAction
(
vtkAbstractWidget
*);
182
static
void
TranslateAction
(
vtkAbstractWidget
*);
183
static
void
EndSelectAction
(
vtkAbstractWidget
*);
184
static
void
MoveAction
(
vtkAbstractWidget
*);
185
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
186
187
// Special internal methods to support subclasses handling events.
188
// If a non-zero value is returned, the subclass is handling the event.
189
virtual
int
SubclassSelectAction
() {
return
0; }
190
virtual
int
SubclassTranslateAction
() {
return
0; }
191
virtual
int
SubclassEndSelectAction
() {
return
0; }
192
virtual
int
SubclassMoveAction
() {
return
0; }
193
194
// helper methods for cursoe management
195
void
SetCursor
(
int
State)
override
;
196
197
// widget state
198
int
WidgetState
;
199
enum
WidgetStateType
200
{
201
Start = 0,
202
Define
,
203
Manipulate
,
204
Selected
205
};
206
#if !defined(VTK_LEGACY_REMOVE)
207
VTK_DEPRECATED_IN_9_2_0
(
"because leading underscore is reserved"
)
208
typedef
WidgetStateType
_WidgetState
;
209
#endif
210
211
private
:
212
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
213
void
operator=(
const
vtkBorderWidget
&) =
delete
;
214
};
215
216
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:75
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:189
vtkBorderRepresentation
represent a vtkBorderWidget
Definition
vtkBorderRepresentation.h:71
vtkBorderWidget
place a border around a 2D rectangular region
Definition
vtkBorderWidget.h:98
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition
vtkBorderWidget.h:178
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::WidgetState
int WidgetState
Definition
vtkBorderWidget.h:198
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:177
vtkBorderWidget::WidgetStateType
WidgetStateType
Definition
vtkBorderWidget.h:200
vtkBorderWidget::Define
@ Define
Definition
vtkBorderWidget.h:202
vtkBorderWidget::Manipulate
@ Manipulate
Definition
vtkBorderWidget.h:203
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition
vtkBorderWidget.h:189
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:192
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition
vtkBorderWidget.h:191
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition
vtkBorderWidget.h:190
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkBorderWidget.h:141
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:149
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:49
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 Sat Nov 9 2024 00:00:00 for VTK by
1.9.7