VTK  9.3.20240423
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
32
33VTK_ABI_NAMESPACE_BEGIN
35
36class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkScalarBarRepresentation
38{
39public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
48 vtkGetObjectMacro(ScalarBarActor, vtkScalarBarActor);
51
53
56 void BuildRepresentation() override;
57 void WidgetInteraction(double eventPos[2]) override;
58 void GetSize(double size[2]) override
59 {
60 size[0] = 2.0;
61 size[1] = 2.0;
62 }
64
66
70 vtkTypeBool GetVisibility() VTK_FUTURE_CONST override;
71 void SetVisibility(vtkTypeBool) override;
72 void GetActors2D(vtkPropCollection* collection) override;
73 void ReleaseGraphicsResources(vtkWindow* window) override;
74 int RenderOverlay(vtkViewport*) override;
75 int RenderOpaqueGeometry(vtkViewport*) override;
76 int RenderTranslucentPolygonalGeometry(vtkViewport*) override;
77 vtkTypeBool HasTranslucentPolygonalGeometry() override;
79
81
85 vtkSetMacro(AutoOrient, bool);
86 vtkGetMacro(AutoOrient, bool);
88
90
93 void SetOrientation(int orient);
94 int GetOrientation();
96
97protected:
100
105 void SwapOrientation();
106
107 vtkScalarBarActor* ScalarBarActor;
108 bool AutoOrient;
109
110private:
112 void operator=(const vtkScalarBarRepresentation&) = delete;
113};
114
115VTK_ABI_NAMESPACE_END
116#endif // vtkScalarBarRepresentation_h
represent a vtkBorderWidget
a simple class to control print indentation
Definition vtkIndent.h:108
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:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO