VTK  9.3.20240415
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 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkScalarBarActor;
35 
36 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkScalarBarRepresentation
38 {
39 public:
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 
97 protected:
100 
105  void SwapOrientation();
106 
107  vtkScalarBarActor* ScalarBarActor;
108  bool AutoOrient;
109 
110 private:
112  void operator=(const vtkScalarBarRepresentation&) = delete;
113 };
114 
115 VTK_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.
static vtkScalarBarRepresentation * New()
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.
abstract specification for Viewports
Definition: vtkViewport.h:65
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
@ size
Definition: vtkX3D.h:253
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_MARSHALAUTO