VTK  9.3.0
vtkScalarBarWidget.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
35#ifndef vtkScalarBarWidget_h
36#define vtkScalarBarWidget_h
37
38#include "vtkBorderWidget.h"
39#include "vtkInteractionWidgetsModule.h" // For export macro
40
41VTK_ABI_NAMESPACE_BEGIN
44
45class VTKINTERACTIONWIDGETS_EXPORT vtkScalarBarWidget : public vtkBorderWidget
46{
47public:
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
58
63 {
64 return reinterpret_cast<vtkScalarBarRepresentation*>(this->GetRepresentation());
65 }
66
68
74
76
82 vtkSetMacro(Repositionable, vtkTypeBool);
83 vtkGetMacro(Repositionable, vtkTypeBool);
84 vtkBooleanMacro(Repositionable, vtkTypeBool);
86
91
97
98protected:
101
103
104 // Handle the case of Repositionable == 0
106
107 // set the cursor to the correct shape based on State argument
108 void SetCursor(int State) override;
109
110private:
111 vtkScalarBarWidget(const vtkScalarBarWidget&) = delete;
112 void operator=(const vtkScalarBarWidget&) = delete;
113};
114
115VTK_ABI_NAMESPACE_END
116#endif
define the API for widget / widget representation
vtkWidgetRepresentation * GetRepresentation()
Return an instance of vtkWidgetRepresentation used to represent this widget in the scene.
place a border around a 2D rectangular region
a simple class to control print indentation
Definition vtkIndent.h:38
Create a scalar bar with labels.
represent scalar bar for vtkScalarBarWidget
2D widget for manipulating a scalar bar
static void MoveAction(vtkAbstractWidget *)
virtual void SetRepresentation(vtkScalarBarRepresentation *rep)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkTypeBool GetProcessEvents() override
Reimplement ProcessEvents to use vtkAbstractWidget instead of vtkBorderWidget, for interaction with t...
virtual vtkScalarBarActor * GetScalarBarActor()
Get the ScalarBar used by this Widget.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkScalarBarRepresentation * GetScalarBarRepresentation()
Return the representation as a vtkScalarBarRepresentation.
~vtkScalarBarWidget() override
void SetCursor(int State) override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
static vtkScalarBarWidget * New()
virtual void SetScalarBarActor(vtkScalarBarActor *actor)
Get the ScalarBar used by this Widget.
int vtkTypeBool
Definition vtkABI.h:64