VTK  9.2.5
vtkScalarBarWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkScalarBarWidget.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 =========================================================================*/
57 #ifndef vtkScalarBarWidget_h
58 #define vtkScalarBarWidget_h
59 
60 #include "vtkBorderWidget.h"
61 #include "vtkInteractionWidgetsModule.h" // For export macro
62 
63 class vtkScalarBarActor;
65 
66 class VTKINTERACTIONWIDGETS_EXPORT vtkScalarBarWidget : public vtkBorderWidget
67 {
68 public:
71  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
79 
84  {
85  return reinterpret_cast<vtkScalarBarRepresentation*>(this->GetRepresentation());
86  }
87 
89 
92  virtual void SetScalarBarActor(vtkScalarBarActor* actor);
95 
97 
103  vtkSetMacro(Repositionable, vtkTypeBool);
104  vtkGetMacro(Repositionable, vtkTypeBool);
105  vtkBooleanMacro(Repositionable, vtkTypeBool);
107 
112 
118 
119 protected:
122 
124 
125  // Handle the case of Repositionable == 0
127 
128  // set the cursor to the correct shape based on State argument
129  void SetCursor(int State) override;
130 
131 private:
132  vtkScalarBarWidget(const vtkScalarBarWidget&) = delete;
133  void operator=(const vtkScalarBarWidget&) = delete;
134 };
135 
136 #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:119
Create a scalar bar with labels.
represent scalar bar for vtkScalarBarWidget
2D widget for manipulating a scalar bar
vtkScalarBarRepresentation * GetScalarBarRepresentation()
Return the representation as a vtkScalarBarRepresentation.
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...
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
~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.
virtual vtkScalarBarActor * GetScalarBarActor()
Get the ScalarBar used by this Widget.
int vtkTypeBool
Definition: vtkABI.h:69