VTK
9.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Interaction
Widgets
vtkButtonWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkButtonWidget.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
=========================================================================*/
84
#ifndef vtkButtonWidget_h
85
#define vtkButtonWidget_h
86
87
#include "
vtkAbstractWidget.h
"
88
#include "vtkInteractionWidgetsModule.h"
// For export macro
89
90
class
vtkButtonRepresentation
;
91
92
class
VTKINTERACTIONWIDGETS_EXPORT
vtkButtonWidget
:
public
vtkAbstractWidget
93
{
94
public
:
98
static
vtkButtonWidget
*
New
();
99
101
104
vtkTypeMacro(
vtkButtonWidget
,
vtkAbstractWidget
);
105
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
107
113
void
SetRepresentation
(
vtkButtonRepresentation
* r)
114
{
115
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
116
}
117
121
vtkButtonRepresentation
*
GetSliderRepresentation
()
122
{
123
return
reinterpret_cast<
vtkButtonRepresentation
*
>
(this->
WidgetRep
);
124
}
125
129
void
CreateDefaultRepresentation
()
override
;
130
138
void
SetEnabled
(
int
)
override
;
139
140
protected
:
141
vtkButtonWidget
();
142
~vtkButtonWidget
()
override
=
default
;
143
144
// These are the events that are handled
145
static
void
SelectAction
(
vtkAbstractWidget
*);
146
static
void
MoveAction
(
vtkAbstractWidget
*);
147
static
void
EndSelectAction
(
vtkAbstractWidget
*);
148
149
// Manage the state of the widget
150
int
WidgetState
;
151
enum
_WidgetState
152
{
153
Start = 0,
154
Hovering
,
155
Selecting
156
};
157
158
private
:
159
vtkButtonWidget
(
const
vtkButtonWidget
&) =
delete
;
160
void
operator=(
const
vtkButtonWidget
&) =
delete
;
161
};
162
163
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:172
vtkButtonRepresentation
abstract class defines the representation for a vtkButtonWidget
Definition:
vtkButtonRepresentation.h:45
vtkButtonWidget
activate an n-state button
Definition:
vtkButtonWidget.h:93
vtkButtonWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkButtonWidget::~vtkButtonWidget
~vtkButtonWidget() override=default
vtkButtonWidget::vtkButtonWidget
vtkButtonWidget()
vtkButtonWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkButtonWidget::WidgetState
int WidgetState
Definition:
vtkButtonWidget.h:150
vtkButtonWidget::GetSliderRepresentation
vtkButtonRepresentation * GetSliderRepresentation()
Return the representation as a vtkButtonRepresentation.
Definition:
vtkButtonWidget.h:121
vtkButtonWidget::SetEnabled
void SetEnabled(int) override
The method for activating and deactivating this widget.
vtkButtonWidget::New
static vtkButtonWidget * New()
Instantiate the class.
vtkButtonWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkButtonWidget::SetRepresentation
void SetRepresentation(vtkButtonRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkButtonWidget.h:113
vtkButtonWidget::_WidgetState
_WidgetState
Definition:
vtkButtonWidget.h:152
vtkButtonWidget::Hovering
@ Hovering
Definition:
vtkButtonWidget.h:154
vtkButtonWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
vtkButtonWidget::EndSelectAction
static void EndSelectAction(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
vtkAbstractWidget.h
Generated on Sat Feb 25 2023 08:59:35 for VTK by
1.9.4