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
=========================================================================*/
138
#ifndef vtkBorderWidget_h
139
#define vtkBorderWidget_h
140
141
#include "
vtkAbstractWidget.h
"
142
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_2_0
143
#include "vtkInteractionWidgetsModule.h"
// For export macro
144
145
class
vtkBorderRepresentation
;
146
147
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
148
{
149
public
:
153
static
vtkBorderWidget
*
New
();
154
156
159
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
160
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
162
164
170
vtkSetMacro(Selectable,
vtkTypeBool
);
171
vtkGetMacro(Selectable,
vtkTypeBool
);
172
vtkBooleanMacro(Selectable,
vtkTypeBool
);
174
176
181
vtkSetMacro(Resizable,
vtkTypeBool
);
182
vtkGetMacro(Resizable,
vtkTypeBool
);
183
vtkBooleanMacro(Resizable,
vtkTypeBool
);
185
191
void
SetRepresentation
(
vtkBorderRepresentation
* r)
192
{
193
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
194
}
195
199
vtkBorderRepresentation
*
GetBorderRepresentation
()
200
{
201
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
202
}
203
207
void
CreateDefaultRepresentation
()
override
;
208
213
vtkTypeBool
GetProcessEvents
()
override
;
214
215
protected
:
216
vtkBorderWidget
();
217
~vtkBorderWidget
()
override
;
218
224
virtual
void
SelectRegion
(
double
eventPos[2]);
225
226
// enable the selection of the region interior to the widget
227
vtkTypeBool
Selectable
;
228
vtkTypeBool
Resizable
;
229
230
// processes the registered events
231
static
void
SelectAction
(
vtkAbstractWidget
*);
232
static
void
TranslateAction
(
vtkAbstractWidget
*);
233
static
void
EndSelectAction
(
vtkAbstractWidget
*);
234
static
void
MoveAction
(
vtkAbstractWidget
*);
235
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
236
237
// Special internal methods to support subclasses handling events.
238
// If a non-zero value is returned, the subclass is handling the event.
239
virtual
int
SubclassSelectAction
() {
return
0; }
240
virtual
int
SubclassTranslateAction
() {
return
0; }
241
virtual
int
SubclassEndSelectAction
() {
return
0; }
242
virtual
int
SubclassMoveAction
() {
return
0; }
243
244
// helper methods for cursoe management
245
void
SetCursor
(
int
State)
override
;
246
247
// widget state
248
int
WidgetState
;
249
enum
WidgetStateType
250
{
251
Start = 0,
252
Define
,
253
Manipulate
,
254
Selected
255
};
256
#if !defined(VTK_LEGACY_REMOVE)
257
VTK_DEPRECATED_IN_9_2_0
(
"because leading underscore is reserved"
)
258
typedef
WidgetStateType
_WidgetState
;
259
#endif
260
261
private
:
262
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
263
void
operator=(
const
vtkBorderWidget
&) =
delete
;
264
};
265
266
#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:121
vtkBorderWidget
place a border around a 2D rectangular region
Definition:
vtkBorderWidget.h:148
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition:
vtkBorderWidget.h:228
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::WidgetState
int WidgetState
Definition:
vtkBorderWidget.h:248
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:227
vtkBorderWidget::WidgetStateType
WidgetStateType
Definition:
vtkBorderWidget.h:250
vtkBorderWidget::Define
@ Define
Definition:
vtkBorderWidget.h:252
vtkBorderWidget::Manipulate
@ Manipulate
Definition:
vtkBorderWidget.h:253
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition:
vtkBorderWidget.h:239
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:242
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition:
vtkBorderWidget.h:241
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition:
vtkBorderWidget.h:240
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkBorderWidget.h:191
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:199
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 Sat Mar 25 2023 14:34:05 for VTK by
1.9.4