VTK
9.2.6
Main Page
Related Pages
Topics
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
=========================================================================*/
61
#ifndef vtkButtonWidget_h
62
#define vtkButtonWidget_h
63
64
#include "
vtkAbstractWidget.h
"
65
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_2_0
66
#include "vtkInteractionWidgetsModule.h"
// For export macro
67
68
class
vtkButtonRepresentation
;
69
70
class
VTKINTERACTIONWIDGETS_EXPORT
vtkButtonWidget
:
public
vtkAbstractWidget
71
{
72
public
:
76
static
vtkButtonWidget
*
New
();
77
79
82
vtkTypeMacro(
vtkButtonWidget
,
vtkAbstractWidget
);
83
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
85
91
void
SetRepresentation
(
vtkButtonRepresentation
* r)
92
{
93
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
94
}
95
99
vtkButtonRepresentation
*
GetSliderRepresentation
()
100
{
101
return
reinterpret_cast<
vtkButtonRepresentation
*
>
(this->
WidgetRep
);
102
}
103
107
void
CreateDefaultRepresentation
()
override
;
108
116
void
SetEnabled
(
int
)
override
;
117
118
protected
:
119
vtkButtonWidget
();
120
~vtkButtonWidget
()
override
=
default
;
121
122
// These are the events that are handled
123
static
void
SelectAction
(
vtkAbstractWidget
*);
124
static
void
MoveAction
(
vtkAbstractWidget
*);
125
static
void
EndSelectAction
(
vtkAbstractWidget
*);
126
127
// Manage the state of the widget
128
int
WidgetState
;
129
enum
WidgetStateType
130
{
131
Start = 0,
132
Hovering
,
133
Selecting
134
};
135
#if !defined(VTK_LEGACY_REMOVE)
136
VTK_DEPRECATED_IN_9_2_0
(
"because leading underscore is reserved"
)
137
typedef
WidgetStateType
_WidgetState
;
138
#endif
139
140
private
:
141
vtkButtonWidget
(
const
vtkButtonWidget
&) =
delete
;
142
void
operator=(
const
vtkButtonWidget
&) =
delete
;
143
};
144
145
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:66
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:180
vtkButtonRepresentation
abstract class defines the representation for a vtkButtonWidget
Definition
vtkButtonRepresentation.h:49
vtkButtonWidget
activate an n-state button
Definition
vtkButtonWidget.h:71
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:128
vtkButtonWidget::GetSliderRepresentation
vtkButtonRepresentation * GetSliderRepresentation()
Return the representation as a vtkButtonRepresentation.
Definition
vtkButtonWidget.h:99
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:91
vtkButtonWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
vtkButtonWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkButtonWidget::WidgetStateType
WidgetStateType
Definition
vtkButtonWidget.h:130
vtkButtonWidget::Hovering
@ Hovering
Definition
vtkButtonWidget.h:132
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:40
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition
vtkWidgetRepresentation.h:60
vtkAbstractWidget.h
vtkDeprecation.h
VTK_DEPRECATED_IN_9_2_0
#define VTK_DEPRECATED_IN_9_2_0(reason)
Definition
vtkDeprecation.h:116
Generated on Thu Nov 2 2023 00:00:00 for VTK by
1.9.8