VTK  9.3.20240327
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 
38 #define VTK_TEXTURE_STYLE_FIT_IMAGE 0
39 #define VTK_TEXTURE_STYLE_PROPORTIONAL 1
40 
41 VTK_ABI_NAMESPACE_BEGIN
42 class VTKFILTERSSOURCES_EXPORT vtkButtonSource : public vtkPolyDataAlgorithm
43 {
44 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  vtkSetVector3Macro(Center, double);
53  vtkGetVectorMacro(Center, double, 3);
55 
57 
62  vtkSetClampMacro(TextureStyle, int, VTK_TEXTURE_STYLE_FIT_IMAGE, VTK_TEXTURE_STYLE_PROPORTIONAL);
63  vtkGetMacro(TextureStyle, int);
64  void SetTextureStyleToFitImage() { this->SetTextureStyle(VTK_TEXTURE_STYLE_FIT_IMAGE); }
67 
69 
73  vtkSetVector2Macro(TextureDimensions, int);
74  vtkGetVector2Macro(TextureDimensions, int);
76 
78 
81  vtkSetVector2Macro(ShoulderTextureCoordinate, double);
82  vtkGetVector2Macro(ShoulderTextureCoordinate, double);
84 
86 
92  vtkSetMacro(TwoSided, vtkTypeBool);
93  vtkGetMacro(TwoSided, vtkTypeBool);
94  vtkBooleanMacro(TwoSided, vtkTypeBool);
96 
97 protected:
99  ~vtkButtonSource() override = default;
100 
101  double Center[3];
102  double ShoulderTextureCoordinate[2];
104  int TextureDimensions[2];
106 
107 private:
108  vtkButtonSource(const vtkButtonSource&) = delete;
109  void operator=(const vtkButtonSource&) = delete;
110 };
111 
112 VTK_ABI_NAMESPACE_END
113 #endif
abstract class for creating various button types
~vtkButtonSource() override=default
void SetTextureStyleToProportional()
Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the te...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetTextureStyleToFitImage()
Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the te...
vtkTypeBool TwoSided
a simple class to control print indentation
Definition: vtkIndent.h:108
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_TEXTURE_STYLE_PROPORTIONAL
#define VTK_TEXTURE_STYLE_FIT_IMAGE