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 =========================================================================*/
37 #ifndef __vtkScalarBarWidget_h
38 #define __vtkScalarBarWidget_h
39 
40 #include "vtkBorderWidget.h"
41 
42 class vtkScalarBarActor;
44 
46 {
47 public:
48  static vtkScalarBarWidget *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
56 
58 
60  { return reinterpret_cast<vtkScalarBarRepresentation *>(this->GetRepresentation()); }
62 
64 
65  virtual void SetScalarBarActor(vtkScalarBarActor *actor);
66  virtual vtkScalarBarActor *GetScalarBarActor();
68 
70 
73  vtkSetMacro(Repositionable, int);
74  vtkGetMacro(Repositionable, int);
75  vtkBooleanMacro(Repositionable, int);
77 
79  virtual void CreateDefaultRepresentation();
80 
81 protected:
84 
86 
87  // Handle the case of Repositionable == 0
88  static void MoveAction(vtkAbstractWidget*);
89 
90  // set the cursor to the correct shape based on State argument
91  virtual void SetCursor(int State);
92 
93 private:
94  vtkScalarBarWidget(const vtkScalarBarWidget&); //Not implemented
95  void operator=(const vtkScalarBarWidget&); //Not implemented
96 };
97 
98 #endif
virtual void CreateDefaultRepresentation()
place a border around a 2D rectangular region
static void MoveAction(vtkAbstractWidget *)
static vtkBorderWidget * New()
Create a scalar bar with labels.
a simple class to control print indentation
Definition: vtkIndent.h:37
represent scalar bar for vtkScalarBarWidget
void PrintSelf(ostream &os, vtkIndent indent)
#define VTK_WIDGETS_EXPORT
define the API for widget / widget representation
virtual void SetCursor(int State)
void SetRepresentation(vtkBorderRepresentation *r)
vtkWidgetRepresentation * GetRepresentation()
vtkScalarBarRepresentation * GetScalarBarRepresentation()
2D widget for manipulating a scalar bar