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
=========================================================================*/
135
#ifndef vtkBorderWidget_h
136
#define vtkBorderWidget_h
137
138
#include "
vtkAbstractWidget.h
"
139
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_2_0
140
#include "vtkInteractionWidgetsModule.h"
// For export macro
141
142
class
vtkBorderRepresentation
;
143
144
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
145
{
146
public
:
150
static
vtkBorderWidget
*
New
();
151
153
156
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
157
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
159
161
167
vtkSetMacro(Selectable,
vtkTypeBool
);
168
vtkGetMacro(Selectable,
vtkTypeBool
);
169
vtkBooleanMacro(Selectable,
vtkTypeBool
);
171
173
178
vtkSetMacro(Resizable,
vtkTypeBool
);
179
vtkGetMacro(Resizable,
vtkTypeBool
);
180
vtkBooleanMacro(Resizable,
vtkTypeBool
);
182
188
void
SetRepresentation
(
vtkBorderRepresentation
* r)
189
{
190
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
191
}
192
196
vtkBorderRepresentation
*
GetBorderRepresentation
()
197
{
198
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
199
}
200
204
void
CreateDefaultRepresentation
()
override
;
205
210
vtkTypeBool
GetProcessEvents
()
override
;
211
212
protected
:
213
vtkBorderWidget
();
214
~vtkBorderWidget
()
override
;
215
221
virtual
void
SelectRegion
(
double
eventPos[2]);
222
223
// enable the selection of the region interior to the widget
224
vtkTypeBool
Selectable
;
225
vtkTypeBool
Resizable
;
226
227
// processes the registered events
228
static
void
SelectAction
(
vtkAbstractWidget
*);
229
static
void
TranslateAction
(
vtkAbstractWidget
*);
230
static
void
EndSelectAction
(
vtkAbstractWidget
*);
231
static
void
MoveAction
(
vtkAbstractWidget
*);
232
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
233
234
// Special internal methods to support subclasses handling events.
235
// If a non-zero value is returned, the subclass is handling the event.
236
virtual
int
SubclassSelectAction
() {
return
0; }
237
virtual
int
SubclassTranslateAction
() {
return
0; }
238
virtual
int
SubclassEndSelectAction
() {
return
0; }
239
virtual
int
SubclassMoveAction
() {
return
0; }
240
241
// helper methods for cursoe management
242
void
SetCursor
(
int
State)
override
;
243
244
// widget state
245
int
WidgetState
;
246
enum
WidgetStateType
247
{
248
Start = 0,
249
Define
,
250
Manipulate
,
251
Selected
252
};
253
#if !defined(VTK_LEGACY_REMOVE)
254
VTK_DEPRECATED_IN_9_2_0
(
"because leading underscore is reserved"
)
255
typedef
WidgetStateType
_WidgetState
;
256
#endif
257
258
private
:
259
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
260
void
operator=(
const
vtkBorderWidget
&) =
delete
;
261
};
262
263
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:177
vtkBorderRepresentation
represent a vtkBorderWidget
Definition:
vtkBorderRepresentation.h:121
vtkBorderWidget
place a border around a 2D rectangular region
Definition:
vtkBorderWidget.h:145
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition:
vtkBorderWidget.h:225
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::WidgetState
int WidgetState
Definition:
vtkBorderWidget.h:245
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:224
vtkBorderWidget::WidgetStateType
WidgetStateType
Definition:
vtkBorderWidget.h:247
vtkBorderWidget::Define
@ Define
Definition:
vtkBorderWidget.h:249
vtkBorderWidget::Manipulate
@ Manipulate
Definition:
vtkBorderWidget.h:250
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition:
vtkBorderWidget.h:236
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:239
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition:
vtkBorderWidget.h:238
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition:
vtkBorderWidget.h:237
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkBorderWidget.h:188
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:196
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:119
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 Thu Jun 22 2023 11:22:18 for VTK by
1.9.4