VTK  9.7.1
vtkRangeHandlesItem.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
3 
27 #ifndef vtkRangeHandlesItem_h
28 #define vtkRangeHandlesItem_h
29 
30 #include "vtkChartsCoreModule.h" // For export macro
32 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
33 
34 VTK_ABI_NAMESPACE_BEGIN
36 
37 class VTKCHARTSCORE_EXPORT VTK_MARSHALAUTO vtkRangeHandlesItem : public vtkPlotRangeHandlesItem
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42  static vtkRangeHandlesItem* New();
43 
48  bool Paint(vtkContext2D* painter) override;
49 
53  void GetBounds(double bounds[4]) override;
54 
59  void GetHandlesRange(double range[2]) override;
60 
62 
65  void SetColorTransferFunction(vtkColorTransferFunction* ctf);
66  vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
68 
73  void ComputeHandlesDrawRange() override;
74 
76 
82  void SynchronizeRangeHandlesOn() override { this->Superclass::SynchronizeRangeHandlesOff(); }
83 
84  void SetSynchronizeRangeHandles(vtkTypeBool vtkNotUsed(synchronize)) override
85  {
86  this->Superclass::SynchronizeRangeHandlesOff();
87  }
88 
89  void SetHandleOrientation(int vtkNotUsed(orientation)) override
90  {
91  this->Superclass::SetHandleOrientation(Orientation::VERTICAL);
92  }
94 
95 protected:
97  ~vtkRangeHandlesItem() override;
98 
103  void SetActiveHandlePosition(double position) override;
104 
105 private:
106  vtkRangeHandlesItem(const vtkRangeHandlesItem&) = delete;
107  void operator=(const vtkRangeHandlesItem&) = delete;
108 
109  vtkColorTransferFunction* ColorTransferFunction = nullptr;
110 };
111 
112 VTK_ABI_NAMESPACE_END
113 #endif // vtkRangeHandlesItem_h
void SynchronizeRangeHandlesOn() override
Overridden to force using desynchronized vertical handles.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
item to show and control a range on vtkAxis
void SetSynchronizeRangeHandles(vtkTypeBool synchronize) override
Overridden to force using desynchronized vertical handles.
int vtkTypeBool
Definition: vtkABI.h:64
void GetBounds(double bounds[4]) override
Recover the bounds of the item.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:49
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void ComputeHandlesDrawRange()
Compute the handles draw range by using the handle width and the transfer function.
item to show and control the range of a vtkColorTransferFunction
bool Paint(vtkContext2D *painter) override
Paint both handles and the range if a handle is active or hovered.
virtual void SetActiveHandlePosition(double position)
Internal method to set the ActiveHandlePosition and compute the ActiveHandleRangeValue accordingly...
void SetHandleOrientation(int orientation) override
Overridden to force using desynchronized vertical handles.
Defines a transfer function for mapping a property to an RGB color value.
virtual void GetHandlesRange(double range[2])
Recover the range currently set by the handles Use this method by observing EndInteractionEvent.
#define VTK_MARSHALAUTO
void operator=(const vtkPlotRangeHandlesItem &)=delete
static vtkPlotRangeHandlesItem * New()