VTK
vtkProgressBarRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProgressBarRepresentation.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 =========================================================================*/
25 #ifndef vtkProgressBarRepresentation_h
26 #define vtkProgressBarRepresentation_h
27 
28 #include "vtkInteractionWidgetsModule.h" // For export macro
30 
31 class vtkActor2D;
32 class vtkPoints;
33 class vtkPolyData;
34 class vtkProperty2D;
36 
37 class VTKINTERACTIONWIDGETS_EXPORT vtkProgressBarRepresentation : public vtkBorderRepresentation
38 {
39 public:
44 
46 
50  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
52 
54 
58  vtkGetObjectMacro(Property, vtkProperty2D);
60 
62 
66  vtkSetClampMacro(ProgressRate, double, 0, 1);
67  vtkGetMacro(ProgressRate, double);
69 
71 
75  vtkSetVector3Macro(ProgressBarColor, double);
76  vtkGetVector3Macro(ProgressBarColor, double);
78 
80 
84  vtkSetVector3Macro(BackgroundColor, double);
85  vtkGetVector3Macro(BackgroundColor, double);
87 
89 
93  vtkSetMacro(DrawBackground, bool);
94  vtkGetMacro(DrawBackground, bool);
95  vtkBooleanMacro(DrawBackground, bool);
97 
99 
102  void BuildRepresentation() VTK_OVERRIDE;
103  void GetSize(double size[2]) VTK_OVERRIDE;
105 
107 
111  void GetActors2D(vtkPropCollection*) VTK_OVERRIDE;
112  void ReleaseGraphicsResources(vtkWindow*) VTK_OVERRIDE;
113  int RenderOverlay(vtkViewport*) VTK_OVERRIDE;
114  int RenderOpaqueGeometry(vtkViewport*) VTK_OVERRIDE;
115  int RenderTranslucentPolygonalGeometry(vtkViewport*) VTK_OVERRIDE;
116  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
118 
119 protected:
121  ~vtkProgressBarRepresentation() VTK_OVERRIDE;
122 
123  double ProgressRate;
124  double ProgressBarColor[3];
125  double BackgroundColor[3];
126  bool DrawBackground;
127 
128  vtkPoints *Points;
129  vtkUnsignedCharArray *ProgressBarData;
130  vtkProperty2D *Property;
131  vtkActor2D *Actor;
132  vtkActor2D *BackgroundActor;
133 
134 private:
136  void operator=(const vtkProgressBarRepresentation&) VTK_DELETE_FUNCTION;
137 };
138 
139 #endif
represent a vtkProgressBarWidget
abstract specification for Viewports
Definition: vtkViewport.h:44
a actor that draws 2D data
Definition: vtkActor2D.h:39
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
static vtkBorderRepresentation * New()
Instantiate this class.
an ordered list of Props
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
void BuildRepresentation() override
Subclasses should implement these methods.
a simple class to control print indentation
Definition: vtkIndent.h:33
represent a vtkBorderWidget
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
represent surface properties of a 2D image
Definition: vtkProperty2D.h:37
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
represent and manipulate 3D points
Definition: vtkPoints.h:33