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 "vtkInteractionWidgetsModule.h" // For export macro
41 #include "vtkBorderWidget.h"
42 
43 class vtkScalarBarActor;
45 
47 {
48 public:
49  static vtkScalarBarWidget *New();
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
57 
59 
61  { return reinterpret_cast<vtkScalarBarRepresentation *>(this->GetRepresentation()); }
63 
65 
66  virtual void SetScalarBarActor(vtkScalarBarActor *actor);
67  virtual vtkScalarBarActor *GetScalarBarActor();
69 
71 
74  vtkSetMacro(Repositionable, int);
75  vtkGetMacro(Repositionable, int);
76  vtkBooleanMacro(Repositionable, int);
78 
80  virtual void CreateDefaultRepresentation();
81 
82 protected:
85 
87 
88  // Handle the case of Repositionable == 0
89  static void MoveAction(vtkAbstractWidget*);
90 
91  // set the cursor to the correct shape based on State argument
92  virtual void SetCursor(int State);
93 
94 private:
95  vtkScalarBarWidget(const vtkScalarBarWidget&); //Not implemented
96  void operator=(const vtkScalarBarWidget&); //Not implemented
97 };
98 
99 #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.
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
represent scalar bar for vtkScalarBarWidget
void PrintSelf(ostream &os, vtkIndent indent)
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