VTK
9.1.0
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 "vtkInteractionWidgetsModule.h"
// For export macro
143
144
class
vtkBorderRepresentation
;
145
146
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
147
{
148
public
:
152
static
vtkBorderWidget
*
New
();
153
155
158
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
159
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
161
163
169
vtkSetMacro(Selectable,
vtkTypeBool
);
170
vtkGetMacro(Selectable,
vtkTypeBool
);
171
vtkBooleanMacro(Selectable,
vtkTypeBool
);
173
175
180
vtkSetMacro(Resizable,
vtkTypeBool
);
181
vtkGetMacro(Resizable,
vtkTypeBool
);
182
vtkBooleanMacro(Resizable,
vtkTypeBool
);
184
190
void
SetRepresentation
(
vtkBorderRepresentation
* r)
191
{
192
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
193
}
194
198
vtkBorderRepresentation
*
GetBorderRepresentation
()
199
{
200
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
201
}
202
206
void
CreateDefaultRepresentation
()
override
;
207
208
protected
:
209
vtkBorderWidget
();
210
~vtkBorderWidget
()
override
;
211
217
virtual
void
SelectRegion
(
double
eventPos[2]);
218
219
// enable the selection of the region interior to the widget
220
vtkTypeBool
Selectable
;
221
vtkTypeBool
Resizable
;
222
223
// processes the registered events
224
static
void
SelectAction
(
vtkAbstractWidget
*);
225
static
void
TranslateAction
(
vtkAbstractWidget
*);
226
static
void
EndSelectAction
(
vtkAbstractWidget
*);
227
static
void
MoveAction
(
vtkAbstractWidget
*);
228
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
229
230
// Special internal methods to support subclasses handling events.
231
// If a non-zero value is returned, the subclass is handling the event.
232
virtual
int
SubclassSelectAction
() {
return
0; }
233
virtual
int
SubclassTranslateAction
() {
return
0; }
234
virtual
int
SubclassEndSelectAction
() {
return
0; }
235
virtual
int
SubclassMoveAction
() {
return
0; }
236
237
// helper methods for cursoe management
238
void
SetCursor
(
int
State)
override
;
239
240
// widget state
241
int
WidgetState
;
242
enum
_WidgetState
243
{
244
Start = 0,
245
Define
,
246
Manipulate
,
247
Selected
248
};
249
250
private
:
251
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
252
void
operator=(
const
vtkBorderWidget
&) =
delete
;
253
};
254
255
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:66
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:175
vtkBorderRepresentation
represent a vtkBorderWidget
Definition:
vtkBorderRepresentation.h:117
vtkBorderWidget
place a border around a 2D rectangular region
Definition:
vtkBorderWidget.h:147
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition:
vtkBorderWidget.h:221
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::_WidgetState
_WidgetState
Definition:
vtkBorderWidget.h:243
vtkBorderWidget::Define
@ Define
Definition:
vtkBorderWidget.h:245
vtkBorderWidget::Manipulate
@ Manipulate
Definition:
vtkBorderWidget.h:246
vtkBorderWidget::WidgetState
int WidgetState
Definition:
vtkBorderWidget.h:241
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:220
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition:
vtkBorderWidget.h:232
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:235
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition:
vtkBorderWidget.h:234
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition:
vtkBorderWidget.h:233
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkBorderWidget.h:190
vtkBorderWidget::GetBorderRepresentation
vtkBorderRepresentation * GetBorderRepresentation()
Return the representation as a vtkBorderRepresentation.
Definition:
vtkBorderWidget.h:198
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
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 Fri Apr 21 2023 10:28:51 for VTK by
1.9.6