VTK
9.1.0
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
=========================================================================*/
73
#ifndef vtkBorderWidget_h
74
#define vtkBorderWidget_h
75
76
#include "
vtkAbstractWidget.h
"
77
#include "vtkInteractionWidgetsModule.h"
// For export macro
78
79
class
vtkBorderRepresentation
;
80
81
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
82
{
83
public
:
87
static
vtkBorderWidget
*
New
();
88
90
93
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
94
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
96
98
104
vtkSetMacro(Selectable,
vtkTypeBool
);
105
vtkGetMacro(Selectable,
vtkTypeBool
);
106
vtkBooleanMacro(Selectable,
vtkTypeBool
);
108
110
115
vtkSetMacro(Resizable,
vtkTypeBool
);
116
vtkGetMacro(Resizable,
vtkTypeBool
);
117
vtkBooleanMacro(Resizable,
vtkTypeBool
);
119
125
void
SetRepresentation
(
vtkBorderRepresentation
* r)
126
{
127
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
128
}
129
133
vtkBorderRepresentation
*
GetBorderRepresentation
()
134
{
135
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
136
}
137
141
void
CreateDefaultRepresentation
()
override
;
142
143
protected
:
144
vtkBorderWidget
();
145
~vtkBorderWidget
()
override
;
146
152
virtual
void
SelectRegion
(
double
eventPos[2]);
153
154
// enable the selection of the region interior to the widget
155
vtkTypeBool
Selectable
;
156
vtkTypeBool
Resizable
;
157
158
// processes the registered events
159
static
void
SelectAction
(
vtkAbstractWidget
*);
160
static
void
TranslateAction
(
vtkAbstractWidget
*);
161
static
void
EndSelectAction
(
vtkAbstractWidget
*);
162
static
void
MoveAction
(
vtkAbstractWidget
*);
163
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
164
165
// Special internal methods to support subclasses handling events.
166
// If a non-zero value is returned, the subclass is handling the event.
167
virtual
int
SubclassSelectAction
() {
return
0; }
168
virtual
int
SubclassTranslateAction
() {
return
0; }
169
virtual
int
SubclassEndSelectAction
() {
return
0; }
170
virtual
int
SubclassMoveAction
() {
return
0; }
171
172
// helper methods for cursoe management
173
void
SetCursor
(
int
State)
override
;
174
175
// widget state
176
int
WidgetState
;
177
enum
_WidgetState
178
{
179
Start = 0,
180
Define
,
181
Manipulate
,
182
Selected
183
};
184
185
private
:
186
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
187
void
operator=(
const
vtkBorderWidget
&) =
delete
;
188
};
189
190
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:172
vtkBorderRepresentation
represent a vtkBorderWidget
Definition:
vtkBorderRepresentation.h:58
vtkBorderWidget
place a border around a 2D rectangular region
Definition:
vtkBorderWidget.h:82
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition:
vtkBorderWidget.h:156
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::_WidgetState
_WidgetState
Definition:
vtkBorderWidget.h:178
vtkBorderWidget::Define
@ Define
Definition:
vtkBorderWidget.h:180
vtkBorderWidget::Manipulate
@ Manipulate
Definition:
vtkBorderWidget.h:181
vtkBorderWidget::WidgetState
int WidgetState
Definition:
vtkBorderWidget.h:176
vtkBorderWidget::SelectRegion
virtual void SelectRegion(double eventPos[2])
Subclasses generally implement this method.
vtkBorderWidget::~vtkBorderWidget
~vtkBorderWidget() override
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::SetCursor
void SetCursor(int State) override
vtkBorderWidget::vtkBorderWidget
vtkBorderWidget()
vtkBorderWidget::Selectable
vtkTypeBool Selectable
Definition:
vtkBorderWidget.h:155
vtkBorderWidget::GetBorderRepresentation
vtkBorderRepresentation * GetBorderRepresentation()
Return the representation as a vtkBorderRepresentation.
Definition:
vtkBorderWidget.h:133
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition:
vtkBorderWidget.h:167
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:170
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition:
vtkBorderWidget.h:169
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition:
vtkBorderWidget.h:168
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkBorderWidget.h:125
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
Generated on Wed Mar 9 2022 09:03:06 for VTK by
1.9.1