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
=========================================================================*/
71
#ifndef vtkCenteredSliderWidget_h
72
#define vtkCenteredSliderWidget_h
73
74
#include "
vtkAbstractWidget.h
"
75
#include "vtkInteractionWidgetsModule.h"
// For export macro
76
77
class
vtkSliderRepresentation
;
78
79
class
VTKINTERACTIONWIDGETS_EXPORT
vtkCenteredSliderWidget
:
public
vtkAbstractWidget
80
{
81
public
:
85
static
vtkCenteredSliderWidget
*
New
();
86
88
91
vtkTypeMacro(
vtkCenteredSliderWidget
,
vtkAbstractWidget
);
92
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
94
100
void
SetRepresentation
(
vtkSliderRepresentation
* r)
101
{
102
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
103
}
104
108
vtkSliderRepresentation
*
GetSliderRepresentation
()
109
{
110
return
reinterpret_cast<
vtkSliderRepresentation
*
>
(this->
WidgetRep
);
111
}
112
116
void
CreateDefaultRepresentation
()
override
;
117
121
double
GetValue
() {
return
this->Value; }
122
123
protected
:
124
vtkCenteredSliderWidget
();
125
~vtkCenteredSliderWidget
()
override
=
default
;
126
127
// These are the events that are handled
128
static
void
SelectAction
(
vtkAbstractWidget
*);
129
static
void
EndSelectAction
(
vtkAbstractWidget
*);
130
static
void
MoveAction
(
vtkAbstractWidget
*);
131
static
void
TimerAction
(
vtkAbstractWidget
*);
132
133
// Manage the state of the widget
134
int
WidgetState
;
135
enum
_WidgetState
136
{
137
Start = 0,
138
Sliding
139
};
140
141
int
TimerId
;
142
int
TimerDuration
;
143
double
StartTime
;
144
double
Value
;
145
146
private
:
147
vtkCenteredSliderWidget
(
const
vtkCenteredSliderWidget
&) =
delete
;
148
void
operator=(
const
vtkCenteredSliderWidget
&) =
delete
;
149
};
150
151
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:172
vtkCenteredSliderWidget
set a value by manipulating a slider
Definition:
vtkCenteredSliderWidget.h:80
vtkCenteredSliderWidget::TimerDuration
int TimerDuration
Definition:
vtkCenteredSliderWidget.h:142
vtkCenteredSliderWidget::_WidgetState
_WidgetState
Definition:
vtkCenteredSliderWidget.h:136
vtkCenteredSliderWidget::TimerId
int TimerId
Definition:
vtkCenteredSliderWidget.h:141
vtkCenteredSliderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
vtkCenteredSliderWidget::Value
double Value
Definition:
vtkCenteredSliderWidget.h:144
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:121
vtkCenteredSliderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::TimerAction
static void TimerAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::~vtkCenteredSliderWidget
~vtkCenteredSliderWidget() override=default
vtkCenteredSliderWidget::StartTime
double StartTime
Definition:
vtkCenteredSliderWidget.h:143
vtkCenteredSliderWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkCenteredSliderWidget::WidgetState
int WidgetState
Definition:
vtkCenteredSliderWidget.h:134
vtkCenteredSliderWidget::GetSliderRepresentation
vtkSliderRepresentation * GetSliderRepresentation()
Return the representation as a vtkSliderRepresentation.
Definition:
vtkCenteredSliderWidget.h:108
vtkCenteredSliderWidget::SetRepresentation
void SetRepresentation(vtkSliderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkCenteredSliderWidget.h:100
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkSliderRepresentation
abstract class defines the representation for a vtkSliderWidget
Definition:
vtkSliderRepresentation.h:55
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