VTK  9.3.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 
33 VTK_ABI_NAMESPACE_BEGIN
35 
36 class VTKCHARTSCORE_EXPORT vtkRangeHandlesItem : public vtkPlotRangeHandlesItem
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41  static vtkRangeHandlesItem* New();
42 
47  bool Paint(vtkContext2D* painter) override;
48 
52  void GetBounds(double bounds[4]) override;
53 
58  void GetHandlesRange(double range[2]) override;
59 
61 
64  void SetColorTransferFunction(vtkColorTransferFunction* ctf);
65  vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
67 
72  void ComputeHandlesDrawRange() override;
73 
75 
81  void SynchronizeRangeHandlesOn() override { this->Superclass::SynchronizeRangeHandlesOff(); }
82 
83  void SetSynchronizeRangeHandles(vtkTypeBool vtkNotUsed(synchronize)) override
84  {
85  this->Superclass::SynchronizeRangeHandlesOff();
86  }
87 
88  void SetHandleOrientation(int vtkNotUsed(orientation)) override
89  {
90  this->Superclass::SetHandleOrientation(Orientation::VERTICAL);
91  }
93 
94 protected:
96  ~vtkRangeHandlesItem() override;
97 
102  void SetActiveHandlePosition(double position) override;
103 
104 private:
105  vtkRangeHandlesItem(const vtkRangeHandlesItem&) = delete;
106  void operator=(const vtkRangeHandlesItem&) = delete;
107 
108  vtkColorTransferFunction* ColorTransferFunction = nullptr;
109 };
110 
111 VTK_ABI_NAMESPACE_END
112 #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.
void SetHandleOrientation(int vtkNotUsed(orientation)) override
Overridden to force using desynchronized vertical handles.
item to show and control a range on vtkAxis
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...
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.
void SetSynchronizeRangeHandles(vtkTypeBool vtkNotUsed(synchronize)) override
Overridden to force using desynchronized vertical handles.
void operator=(const vtkPlotRangeHandlesItem &)=delete
static vtkPlotRangeHandlesItem * New()