VTK
9.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Interaction
Widgets
vtkCenteredSliderWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkCenteredSliderWidget.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
=========================================================================*/
77
#ifndef vtkCenteredSliderWidget_h
78
#define vtkCenteredSliderWidget_h
79
80
#include "
vtkAbstractWidget.h
"
81
#include "vtkInteractionWidgetsModule.h"
// For export macro
82
83
class
vtkSliderRepresentation
;
84
85
class
VTKINTERACTIONWIDGETS_EXPORT
vtkCenteredSliderWidget
:
public
vtkAbstractWidget
86
{
87
public
:
91
static
vtkCenteredSliderWidget
*
New
();
92
94
97
vtkTypeMacro(
vtkCenteredSliderWidget
,
vtkAbstractWidget
);
98
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
100
106
void
SetRepresentation
(
vtkSliderRepresentation
* r)
107
{
108
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
109
}
110
114
vtkSliderRepresentation
*
GetSliderRepresentation
()
115
{
116
return
reinterpret_cast<
vtkSliderRepresentation
*
>
(this->
WidgetRep
);
117
}
118
122
void
CreateDefaultRepresentation
()
override
;
123
127
double
GetValue
() {
return
this->Value; }
128
129
protected
:
130
vtkCenteredSliderWidget
();
131
~vtkCenteredSliderWidget
()
override
=
default
;
132
133
// These are the events that are handled
134
static
void
SelectAction
(
vtkAbstractWidget
*);
135
static
void
EndSelectAction
(
vtkAbstractWidget
*);
136
static
void
MoveAction
(
vtkAbstractWidget
*);
137
static
void
TimerAction
(
vtkAbstractWidget
*);
138
139
// Manage the state of the widget
140
int
WidgetState
;
141
enum
_WidgetState
142
{
143
Start = 0,
144
Sliding
145
};
146
147
int
TimerId
;
148
int
TimerDuration
;
149
double
StartTime
;
150
double
Value
;
151
152
private
:
153
vtkCenteredSliderWidget
(
const
vtkCenteredSliderWidget
&) =
delete
;
154
void
operator=(
const
vtkCenteredSliderWidget
&) =
delete
;
155
};
156
157
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:66
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:175
vtkCenteredSliderWidget
set a value by manipulating a slider
Definition:
vtkCenteredSliderWidget.h:86
vtkCenteredSliderWidget::TimerDuration
int TimerDuration
Definition:
vtkCenteredSliderWidget.h:148
vtkCenteredSliderWidget::_WidgetState
_WidgetState
Definition:
vtkCenteredSliderWidget.h:142
vtkCenteredSliderWidget::TimerId
int TimerId
Definition:
vtkCenteredSliderWidget.h:147
vtkCenteredSliderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
vtkCenteredSliderWidget::Value
double Value
Definition:
vtkCenteredSliderWidget.h:150
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:127
vtkCenteredSliderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::TimerAction
static void TimerAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::~vtkCenteredSliderWidget
~vtkCenteredSliderWidget() override=default
vtkCenteredSliderWidget::StartTime
double StartTime
Definition:
vtkCenteredSliderWidget.h:149
vtkCenteredSliderWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::WidgetState
int WidgetState
Definition:
vtkCenteredSliderWidget.h:140
vtkCenteredSliderWidget::GetSliderRepresentation
vtkSliderRepresentation * GetSliderRepresentation()
Return the representation as a vtkSliderRepresentation.
Definition:
vtkCenteredSliderWidget.h:114
vtkCenteredSliderWidget::SetRepresentation
void SetRepresentation(vtkSliderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkCenteredSliderWidget.h:106
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkSliderRepresentation
abstract class defines the representation for a vtkSliderWidget
Definition:
vtkSliderRepresentation.h:61
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