Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkButtonSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkButtonSource.h,v $
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 =========================================================================*/
00054 #ifndef __vtkButtonSource_h
00055 #define __vtkButtonSource_h
00056 
00057 #include "vtkPolyDataSource.h"
00058 
00059 #define VTK_TEXTURE_STYLE_FIT_IMAGE    0
00060 #define VTK_TEXTURE_STYLE_PROPORTIONAL 1
00061 
00062 class VTK_GRAPHICS_EXPORT vtkButtonSource : public vtkPolyDataSource 
00063 {
00064 public:
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066   vtkTypeRevisionMacro(vtkButtonSource,vtkPolyDataSource);
00067 
00069 
00070   vtkSetVector3Macro(Center,double);
00071   vtkGetVectorMacro(Center,double,3);
00073 
00075 
00078   vtkSetClampMacro(TextureStyle,int,VTK_TEXTURE_STYLE_FIT_IMAGE,
00079                                     VTK_TEXTURE_STYLE_PROPORTIONAL);
00080   vtkGetMacro(TextureStyle,int);
00081   void SetTextureStyleToFitImage() 
00082     {this->SetTextureStyle(VTK_TEXTURE_STYLE_FIT_IMAGE);}
00083   void SetTextureStyleToProportional() 
00084     {this->SetTextureStyle(VTK_TEXTURE_STYLE_PROPORTIONAL);}
00086 
00088 
00090   vtkSetVector2Macro(TextureDimensions,int);
00091   vtkGetVector2Macro(TextureDimensions,int);
00093 
00095 
00096   vtkSetVector2Macro(ShoulderTextureCoordinate,double);
00097   vtkGetVector2Macro(ShoulderTextureCoordinate,double);
00099 
00101 
00105   vtkSetMacro(TwoSided,int);
00106   vtkGetMacro(TwoSided,int);
00107   vtkBooleanMacro(TwoSided,int);
00109 
00110 protected:
00111   vtkButtonSource();
00112   ~vtkButtonSource() {}
00113 
00114   double Center[3];
00115   double ShoulderTextureCoordinate[2];
00116   int    TextureStyle;
00117   int    TextureDimensions[2];
00118   int    TwoSided;
00119 
00120 private:
00121   vtkButtonSource(const vtkButtonSource&);  // Not implemented.
00122   void operator=(const vtkButtonSource&);  // Not implemented.
00123 
00124 };
00125 
00126 #endif
00127 
00128