VTK
dox/Interaction/Widgets/vtkScalarBarWidget.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkScalarBarWidget.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00037 #ifndef __vtkScalarBarWidget_h
00038 #define __vtkScalarBarWidget_h
00039 
00040 #include "vtkInteractionWidgetsModule.h" // For export macro
00041 #include "vtkBorderWidget.h"
00042 
00043 class vtkScalarBarActor;
00044 class vtkScalarBarRepresentation;
00045 
00046 class VTKINTERACTIONWIDGETS_EXPORT vtkScalarBarWidget : public vtkBorderWidget
00047 {
00048 public:
00049   static vtkScalarBarWidget *New();
00050   vtkTypeMacro(vtkScalarBarWidget, vtkBorderWidget);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00056   virtual void SetRepresentation(vtkScalarBarRepresentation *rep);
00057 
00059 
00060   vtkScalarBarRepresentation *GetScalarBarRepresentation()
00061     { return reinterpret_cast<vtkScalarBarRepresentation *>(this->GetRepresentation()); }
00063 
00065 
00066   virtual void SetScalarBarActor(vtkScalarBarActor *actor);
00067   virtual vtkScalarBarActor *GetScalarBarActor();
00069 
00071 
00074   vtkSetMacro(Repositionable, int);
00075   vtkGetMacro(Repositionable, int);
00076   vtkBooleanMacro(Repositionable, int);
00078 
00080   virtual void CreateDefaultRepresentation();
00081 
00082 protected:
00083   vtkScalarBarWidget();
00084   ~vtkScalarBarWidget();
00085 
00086   int Repositionable;
00087 
00088   // Handle the case of Repositionable == 0
00089   static void MoveAction(vtkAbstractWidget*);
00090 
00091   // set the cursor to the correct shape based on State argument
00092   virtual void SetCursor(int State);
00093 
00094 private:
00095   vtkScalarBarWidget(const vtkScalarBarWidget&);  //Not implemented
00096   void operator=(const vtkScalarBarWidget&);  //Not implemented
00097 };
00098 
00099 #endif