VTK  9.7.1
vtkButtonSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
32 #ifndef vtkButtonSource_h
33 #define vtkButtonSource_h
34 
35 #include "vtkFiltersSourcesModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
38 
39 #define VTK_TEXTURE_STYLE_FIT_IMAGE 0
40 #define VTK_TEXTURE_STYLE_PROPORTIONAL 1
41 
42 VTK_ABI_NAMESPACE_BEGIN
43 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkButtonSource : public vtkPolyDataAlgorithm
44 {
45 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
53  vtkSetVector3Macro(Center, double);
54  vtkGetVectorMacro(Center, double, 3);
56 
58 
63  vtkSetClampMacro(TextureStyle, int, VTK_TEXTURE_STYLE_FIT_IMAGE, VTK_TEXTURE_STYLE_PROPORTIONAL);
64  vtkGetMacro(TextureStyle, int);
65  void SetTextureStyleToFitImage() { this->SetTextureStyle(VTK_TEXTURE_STYLE_FIT_IMAGE); }
68 
70 
74  vtkSetVector2Macro(TextureDimensions, int);
75  vtkGetVector2Macro(TextureDimensions, int);
77 
79 
82  vtkSetVector2Macro(ShoulderTextureCoordinate, double);
83  vtkGetVector2Macro(ShoulderTextureCoordinate, double);
85 
87 
93  vtkSetMacro(TwoSided, vtkTypeBool);
94  vtkGetMacro(TwoSided, vtkTypeBool);
95  vtkBooleanMacro(TwoSided, vtkTypeBool);
97 
98 protected:
100  ~vtkButtonSource() override = default;
101 
102  double Center[3];
103  double ShoulderTextureCoordinate[2];
105  int TextureDimensions[2];
107 
108 private:
109  vtkButtonSource(const vtkButtonSource&) = delete;
110  void operator=(const vtkButtonSource&) = delete;
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 #endif
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:64
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
#define VTK_TEXTURE_STYLE_FIT_IMAGE
vtkTypeBool TwoSided
#define VTK_MARSHALAUTO
#define VTK_TEXTURE_STYLE_PROPORTIONAL
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.