VTK
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 =========================================================================*/
35 #ifndef vtkScalarBarWidget_h
36 #define vtkScalarBarWidget_h
37 
38 #include "vtkInteractionWidgetsModule.h" // For export macro
39 #include "vtkBorderWidget.h"
40 
41 class vtkScalarBarActor;
43 
44 class VTKINTERACTIONWIDGETS_EXPORT vtkScalarBarWidget : public vtkBorderWidget
45 {
46 public:
47  static vtkScalarBarWidget *New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
57 
62  { return reinterpret_cast<vtkScalarBarRepresentation *>(this->GetRepresentation()); }
63 
65 
68  virtual void SetScalarBarActor(vtkScalarBarActor *actor);
69  virtual vtkScalarBarActor *GetScalarBarActor();
71 
73 
79  vtkSetMacro(Repositionable, vtkTypeBool);
80  vtkGetMacro(Repositionable, vtkTypeBool);
81  vtkBooleanMacro(Repositionable, vtkTypeBool);
83 
87  void CreateDefaultRepresentation() override;
88 
89 protected:
91  ~vtkScalarBarWidget() override;
92 
94 
95  // Handle the case of Repositionable == 0
96  static void MoveAction(vtkAbstractWidget*);
97 
98  // set the cursor to the correct shape based on State argument
99  void SetCursor(int State) override;
100 
101 private:
102  vtkScalarBarWidget(const vtkScalarBarWidget&) = delete;
103  void operator=(const vtkScalarBarWidget&) = delete;
104 };
105 
106 #endif
vtkScalarBarWidget
2D widget for manipulating a scalar bar
Definition: vtkScalarBarWidget.h:44
vtkAbstractWidget::GetRepresentation
vtkWidgetRepresentation * GetRepresentation()
Return an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkAbstractWidget.h:134
vtkScalarBarWidget::GetScalarBarRepresentation
vtkScalarBarRepresentation * GetScalarBarRepresentation()
Return the representation as a vtkScalarBarRepresentation.
Definition: vtkScalarBarWidget.h:61
vtkBorderWidget
place a border around a 2D rectangular region
Definition: vtkBorderWidget.h:82
vtkBorderWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkScalarBarWidget::Repositionable
vtkTypeBool Repositionable
Definition: vtkScalarBarWidget.h:93
vtkBorderWidget.h
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:63
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::SetCursor
void SetCursor(int State) override
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkBorderWidget.h:128
vtkScalarBarRepresentation
represent scalar bar for vtkScalarBarWidget
Definition: vtkScalarBarRepresentation.h:51
vtkScalarBarActor
Create a scalar bar with labels.
Definition: vtkScalarBarActor.h:77
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69