VTK
vtkButtonSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkButtonSource.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 =========================================================================*/
44 #ifndef vtkButtonSource_h
45 #define vtkButtonSource_h
46 
47 #include "vtkFiltersSourcesModule.h" // For export macro
48 #include "vtkPolyDataAlgorithm.h"
49 
50 #define VTK_TEXTURE_STYLE_FIT_IMAGE 0
51 #define VTK_TEXTURE_STYLE_PROPORTIONAL 1
52 
53 class VTKFILTERSSOURCES_EXPORT vtkButtonSource : public vtkPolyDataAlgorithm
54 {
55 public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
63  vtkSetVector3Macro(Center,double);
64  vtkGetVectorMacro(Center,double,3);
66 
68 
73  vtkSetClampMacro(TextureStyle,int,VTK_TEXTURE_STYLE_FIT_IMAGE,
75  vtkGetMacro(TextureStyle,int);
77  {this->SetTextureStyle(VTK_TEXTURE_STYLE_FIT_IMAGE);}
79  {this->SetTextureStyle(VTK_TEXTURE_STYLE_PROPORTIONAL);}
81 
83 
87  vtkSetVector2Macro(TextureDimensions,int);
88  vtkGetVector2Macro(TextureDimensions,int);
90 
92 
95  vtkSetVector2Macro(ShoulderTextureCoordinate,double);
96  vtkGetVector2Macro(ShoulderTextureCoordinate,double);
98 
100 
106  vtkSetMacro(TwoSided,vtkTypeBool);
107  vtkGetMacro(TwoSided,vtkTypeBool);
108  vtkBooleanMacro(TwoSided,vtkTypeBool);
110 
111 protected:
112  vtkButtonSource();
113  ~vtkButtonSource() override {}
114 
115  double Center[3];
116  double ShoulderTextureCoordinate[2];
118  int TextureDimensions[2];
120 
121 private:
122  vtkButtonSource(const vtkButtonSource&) = delete;
123  void operator=(const vtkButtonSource&) = delete;
124 
125 };
126 
127 #endif
128 
129 
abstract class for creating various button types
void SetTextureStyleToFitImage()
Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the te...
void SetTextureStyleToProportional()
Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the te...
int vtkTypeBool
Definition: vtkABI.h:69
~vtkButtonSource() override
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
#define VTK_TEXTURE_STYLE_FIT_IMAGE
vtkTypeBool TwoSided
#define VTK_TEXTURE_STYLE_PROPORTIONAL
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.