VTK  9.3.0
vtkScalarBarRepresentation.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4
26#ifndef vtkScalarBarRepresentation_h
27#define vtkScalarBarRepresentation_h
28
30#include "vtkInteractionWidgetsModule.h" // For export macro
31
32VTK_ABI_NAMESPACE_BEGIN
34
35class VTKINTERACTIONWIDGETS_EXPORT vtkScalarBarRepresentation : public vtkBorderRepresentation
36{
37public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
41
43
46 vtkGetObjectMacro(ScalarBarActor, vtkScalarBarActor);
49
51
54 void BuildRepresentation() override;
55 void WidgetInteraction(double eventPos[2]) override;
56 void GetSize(double size[2]) override
57 {
58 size[0] = 2.0;
59 size[1] = 2.0;
60 }
62
64
68 vtkTypeBool GetVisibility() VTK_FUTURE_CONST override;
69 void SetVisibility(vtkTypeBool) override;
70 void GetActors2D(vtkPropCollection* collection) override;
71 void ReleaseGraphicsResources(vtkWindow* window) override;
72 int RenderOverlay(vtkViewport*) override;
73 int RenderOpaqueGeometry(vtkViewport*) override;
74 int RenderTranslucentPolygonalGeometry(vtkViewport*) override;
75 vtkTypeBool HasTranslucentPolygonalGeometry() override;
77
79
83 vtkSetMacro(AutoOrient, bool);
84 vtkGetMacro(AutoOrient, bool);
86
88
91 void SetOrientation(int orient);
92 int GetOrientation();
94
95protected:
98
103 void SwapOrientation();
104
105 vtkScalarBarActor* ScalarBarActor;
106 bool AutoOrient;
107
108private:
110 void operator=(const vtkScalarBarRepresentation&) = delete;
111};
112
113VTK_ABI_NAMESPACE_END
114#endif // vtkScalarBarRepresentation_h
represent a vtkBorderWidget
a simple class to control print indentation
Definition vtkIndent.h:29
an ordered list of Props
Create a scalar bar with labels.
represent scalar bar for vtkScalarBarWidget
vtkTypeBool GetVisibility() VTK_FUTURE_CONST override
These methods are necessary to make this representation behave as a vtkProp.
virtual void SetScalarBarActor(vtkScalarBarActor *)
The prop that is placed in the renderer.
void BuildRepresentation() override
Satisfy the superclass' API.
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
void GetSize(double size[2]) override
Satisfy the superclass' API.
void WidgetInteraction(double eventPos[2]) override
Satisfy the superclass' API.
static vtkScalarBarRepresentation * New()
abstract specification for Viewports
Definition vtkViewport.h:45
window superclass for vtkRenderWindow
Definition vtkWindow.h:25
int vtkTypeBool
Definition vtkABI.h:64