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
=========================================================================*/
90
#ifndef vtkButtonWidget_h
91
#define vtkButtonWidget_h
92
93
#include "
vtkAbstractWidget.h
"
94
#include "vtkInteractionWidgetsModule.h"
// For export macro
95
96
class
vtkButtonRepresentation
;
97
98
class
VTKINTERACTIONWIDGETS_EXPORT
vtkButtonWidget
:
public
vtkAbstractWidget
99
{
100
public
:
104
static
vtkButtonWidget
*
New
();
105
107
110
vtkTypeMacro(
vtkButtonWidget
,
vtkAbstractWidget
);
111
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
113
119
void
SetRepresentation
(
vtkButtonRepresentation
* r)
120
{
121
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
122
}
123
127
vtkButtonRepresentation
*
GetSliderRepresentation
()
128
{
129
return
reinterpret_cast<
vtkButtonRepresentation
*
>
(this->
WidgetRep
);
130
}
131
135
void
CreateDefaultRepresentation
()
override
;
136
144
void
SetEnabled
(
int
)
override
;
145
146
protected
:
147
vtkButtonWidget
();
148
~vtkButtonWidget
()
override
=
default
;
149
150
// These are the events that are handled
151
static
void
SelectAction
(
vtkAbstractWidget
*);
152
static
void
MoveAction
(
vtkAbstractWidget
*);
153
static
void
EndSelectAction
(
vtkAbstractWidget
*);
154
155
// Manage the state of the widget
156
int
WidgetState
;
157
enum
_WidgetState
158
{
159
Start = 0,
160
Hovering
,
161
Selecting
162
};
163
164
private
:
165
vtkButtonWidget
(
const
vtkButtonWidget
&) =
delete
;
166
void
operator=(
const
vtkButtonWidget
&) =
delete
;
167
};
168
169
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:66
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:175
vtkButtonRepresentation
abstract class defines the representation for a vtkButtonWidget
Definition:
vtkButtonRepresentation.h:48
vtkButtonWidget
activate an n-state button
Definition:
vtkButtonWidget.h:99
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:156
vtkButtonWidget::GetSliderRepresentation
vtkButtonRepresentation * GetSliderRepresentation()
Return the representation as a vtkButtonRepresentation.
Definition:
vtkButtonWidget.h:127
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:119
vtkButtonWidget::_WidgetState
_WidgetState
Definition:
vtkButtonWidget.h:158
vtkButtonWidget::Hovering
@ Hovering
Definition:
vtkButtonWidget.h:160
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 Fri Apr 21 2023 10:28:52 for VTK by
1.9.6