VTK
9.4.20250402
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Interaction
Widgets
vtkCenteredSliderWidget.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
65
#ifndef vtkCenteredSliderWidget_h
66
#define vtkCenteredSliderWidget_h
67
68
#include "
vtkAbstractWidget.h
"
69
#include "vtkInteractionWidgetsModule.h"
// For export macro
70
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
71
72
VTK_ABI_NAMESPACE_BEGIN
73
class
vtkSliderRepresentation
;
74
75
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkCenteredSliderWidget
76
:
public
vtkAbstractWidget
77
{
78
public
:
82
static
vtkCenteredSliderWidget
*
New
();
83
85
88
vtkTypeMacro(
vtkCenteredSliderWidget
,
vtkAbstractWidget
);
89
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
91
97
void
SetRepresentation
(
vtkSliderRepresentation
* r)
98
{
99
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
100
}
101
105
vtkSliderRepresentation
*
GetSliderRepresentation
()
106
{
107
return
reinterpret_cast<
vtkSliderRepresentation
*
>
(this->
WidgetRep
);
108
}
109
113
void
CreateDefaultRepresentation
()
override
;
114
118
double
GetValue
() {
return
this->Value; }
119
120
protected
:
121
vtkCenteredSliderWidget
();
122
~vtkCenteredSliderWidget
()
override
=
default
;
123
124
// These are the events that are handled
125
static
void
SelectAction
(
vtkAbstractWidget
*);
126
static
void
EndSelectAction
(
vtkAbstractWidget
*);
127
static
void
MoveAction
(
vtkAbstractWidget
*);
128
static
void
TimerAction
(
vtkAbstractWidget
*);
129
130
// Manage the state of the widget
131
int
WidgetState
;
132
enum
WidgetStateType
133
{
134
Start = 0,
135
Sliding
136
};
137
138
int
TimerId
;
139
int
TimerDuration
;
140
double
StartTime
;
141
double
Value
;
142
143
private
:
144
vtkCenteredSliderWidget
(
const
vtkCenteredSliderWidget
&) =
delete
;
145
void
operator=(
const
vtkCenteredSliderWidget
&) =
delete
;
146
};
147
148
VTK_ABI_NAMESPACE_END
149
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:86
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:200
vtkCenteredSliderWidget
set a value by manipulating a slider
Definition
vtkCenteredSliderWidget.h:77
vtkCenteredSliderWidget::TimerDuration
int TimerDuration
Definition
vtkCenteredSliderWidget.h:139
vtkCenteredSliderWidget::TimerId
int TimerId
Definition
vtkCenteredSliderWidget.h:138
vtkCenteredSliderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
vtkCenteredSliderWidget::Value
double Value
Definition
vtkCenteredSliderWidget.h:141
vtkCenteredSliderWidget::vtkCenteredSliderWidget
vtkCenteredSliderWidget()
vtkCenteredSliderWidget::New
static vtkCenteredSliderWidget * New()
Instantiate the class.
vtkCenteredSliderWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkCenteredSliderWidget::GetValue
double GetValue()
Get the value fo this widget.
Definition
vtkCenteredSliderWidget.h:118
vtkCenteredSliderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::TimerAction
static void TimerAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::~vtkCenteredSliderWidget
~vtkCenteredSliderWidget() override=default
vtkCenteredSliderWidget::StartTime
double StartTime
Definition
vtkCenteredSliderWidget.h:140
vtkCenteredSliderWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::WidgetStateType
WidgetStateType
Definition
vtkCenteredSliderWidget.h:133
vtkCenteredSliderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::WidgetState
int WidgetState
Definition
vtkCenteredSliderWidget.h:131
vtkCenteredSliderWidget::GetSliderRepresentation
vtkSliderRepresentation * GetSliderRepresentation()
Return the representation as a vtkSliderRepresentation.
Definition
vtkCenteredSliderWidget.h:105
vtkCenteredSliderWidget::SetRepresentation
void SetRepresentation(vtkSliderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkCenteredSliderWidget.h:97
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:108
vtkSliderRepresentation
abstract class defines the representation for a vtkSliderWidget
Definition
vtkSliderRepresentation.h:132
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition
vtkWidgetRepresentation.h:68
vtkAbstractWidget.h
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:50
Generated on Wed Apr 2 2025 10:38:10 for VTK by
1.9.7