VTK
dox/Interaction/Widgets/vtkScalarBarRepresentation.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkScalarBarRepresentation.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 =========================================================================*/
00015 
00016 /*
00017  * Copyright 2008 Sandia Corporation.
00018  * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00019  * license for use of this work by or on behalf of the
00020  * U.S. Government. Redistribution and use in source and binary forms, with
00021  * or without modification, are permitted provided that this Notice and any
00022  * statement of authorship are reproduced on all copies.
00023  */
00024 
00045 #ifndef __vtkScalarBarRepresentation_h
00046 #define __vtkScalarBarRepresentation_h
00047 
00048 #include "vtkInteractionWidgetsModule.h" // For export macro
00049 #include "vtkBorderRepresentation.h"
00050 
00051 class vtkScalarBarActor;
00052 
00053 class VTKINTERACTIONWIDGETS_EXPORT vtkScalarBarRepresentation : public vtkBorderRepresentation
00054 {
00055 public:
00056   vtkTypeMacro(vtkScalarBarRepresentation, vtkBorderRepresentation);
00057   virtual void PrintSelf(ostream &os, vtkIndent indent);
00058   static vtkScalarBarRepresentation *New();
00059 
00061 
00062   vtkGetObjectMacro(ScalarBarActor, vtkScalarBarActor);
00063   virtual void SetScalarBarActor(vtkScalarBarActor *);
00065 
00067 
00068   virtual void BuildRepresentation();
00069   virtual void WidgetInteraction(double eventPos[2]);
00070   virtual void GetSize(double size[2])
00071     {size[0]=2.0; size[1]=2.0;}
00073 
00075 
00077   virtual int GetVisibility();
00078   virtual void SetVisibility(int);
00079   virtual void GetActors2D(vtkPropCollection *collection);
00080   virtual void ReleaseGraphicsResources(vtkWindow *window);
00081   virtual int RenderOverlay(vtkViewport*);
00082   virtual int RenderOpaqueGeometry(vtkViewport*);
00083   virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
00084   virtual int HasTranslucentPolygonalGeometry();
00086 
00088 
00089   void SetOrientation(int orient);
00090   int GetOrientation();
00092 
00093 protected:
00094   vtkScalarBarRepresentation();
00095   ~vtkScalarBarRepresentation();
00096 
00097   vtkScalarBarActor *ScalarBarActor;
00098 private:
00099   vtkScalarBarRepresentation(const vtkScalarBarRepresentation &); // Not implemented
00100   void operator=(const vtkScalarBarRepresentation &);   // Not implemented
00101 };
00102 
00103 #endif //__vtkScalarBarRepresentation_h