forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkProgressBarRepresentation.h
139 lines (118 loc) · 3.44 KB
/
vtkProgressBarRepresentation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*=========================================================================
Program: Visualization Toolkit
Module: vtkProgressBarRepresentation.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkProgressBarRepresentation
* @brief represent a vtkProgressBarWidget
*
* This class is used to represent a vtkProgressBarWidget.
*
* @sa
* vtkProgressBarWidget
*/
#ifndef vtkProgressBarRepresentation_h
#define vtkProgressBarRepresentation_h
#include "vtkInteractionWidgetsModule.h" // For export macro
#include "vtkBorderRepresentation.h"
class vtkActor2D;
class vtkPoints;
class vtkPolyData;
class vtkProperty2D;
class vtkUnsignedCharArray;
class VTKINTERACTIONWIDGETS_EXPORT vtkProgressBarRepresentation : public vtkBorderRepresentation
{
public:
/**
* Instantiate this class.
*/
static vtkProgressBarRepresentation *New();
//@{
/**
* Standard VTK class methods.
*/
vtkTypeMacro(vtkProgressBarRepresentation, vtkBorderRepresentation);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
//@}
//@{
/**
* By obtaining this property you can specify the properties of the
* representation.
*/
vtkGetObjectMacro(Property, vtkProperty2D);
//@}
//@{
/**
* Set/Get the progress rate of the progress bar, between 0 and 1
* default is 0
*/
vtkSetClampMacro(ProgressRate, double, 0, 1);
vtkGetMacro(ProgressRate, double);
//@}
//@{
/**
* Set/Get the progress bar color
* Default is pure green
*/
vtkSetVector3Macro(ProgressBarColor, double);
vtkGetVector3Macro(ProgressBarColor, double);
//@}
//@{
/**
* Set/Get the background color
* Default is white
*/
vtkSetVector3Macro(BackgroundColor, double);
vtkGetVector3Macro(BackgroundColor, double);
//@}
//@{
/**
* Set/Get background visibility
* Default is off
*/
vtkSetMacro(DrawBackground, bool);
vtkGetMacro(DrawBackground, bool);
vtkBooleanMacro(DrawBackground, bool);
//@}
//@{
/**
* Satisfy the superclasses' API.
*/
void BuildRepresentation() VTK_OVERRIDE;
void GetSize(double size[2]) VTK_OVERRIDE;
//@}
//@{
/**
* These methods are necessary to make this representation behave as
* a vtkProp.
*/
void GetActors2D(vtkPropCollection*) VTK_OVERRIDE;
void ReleaseGraphicsResources(vtkWindow*) VTK_OVERRIDE;
int RenderOverlay(vtkViewport*) VTK_OVERRIDE;
int RenderOpaqueGeometry(vtkViewport*) VTK_OVERRIDE;
int RenderTranslucentPolygonalGeometry(vtkViewport*) VTK_OVERRIDE;
int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
//@}
protected:
vtkProgressBarRepresentation();
~vtkProgressBarRepresentation() VTK_OVERRIDE;
double ProgressRate;
double ProgressBarColor[3];
double BackgroundColor[3];
bool DrawBackground;
vtkPoints *Points;
vtkUnsignedCharArray *ProgressBarData;
vtkProperty2D *Property;
vtkActor2D *Actor;
vtkActor2D *BackgroundActor;
private:
vtkProgressBarRepresentation(const vtkProgressBarRepresentation&) VTK_DELETE_FUNCTION;
void operator=(const vtkProgressBarRepresentation&) VTK_DELETE_FUNCTION;
};
#endif