VTK  9.3.20240424
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
33VTK_ABI_NAMESPACE_BEGIN
35
36class VTKCHARTSCORE_EXPORT vtkRangeHandlesItem : public vtkPlotRangeHandlesItem
37{
38public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
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
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
94protected:
97
102 void SetActiveHandlePosition(double position) override;
103
104private:
106 void operator=(const vtkRangeHandlesItem&) = delete;
107
108 vtkColorTransferFunction* ColorTransferFunction = nullptr;
109};
110
111VTK_ABI_NAMESPACE_END
112#endif // vtkRangeHandlesItem_h
Defines a transfer function for mapping a property to an RGB color value.
Class for drawing 2D primitives to a graphical context.
a simple class to control print indentation
Definition vtkIndent.h:108
item to show and control a range on vtkAxis
void operator=(const vtkPlotRangeHandlesItem &)=delete
item to show and control the range of a vtkColorTransferFunction
void SetSynchronizeRangeHandles(vtkTypeBool vtkNotUsed(synchronize)) override
Overridden to force using desynchronized vertical handles.
void SynchronizeRangeHandlesOn() override
Overridden to force using desynchronized vertical handles.
void SetColorTransferFunction(vtkColorTransferFunction *ctf)
Get/set the color transfer function to interact with.
void ComputeHandlesDrawRange() override
Compute the handles draw range by using the handle width and the transfer function.
void SetActiveHandlePosition(double position) override
Overridden to clamp the handle position in the color transfer function range.
bool Paint(vtkContext2D *painter) override
Overridden to check that a color transfer function has been set before painting.
void GetHandlesRange(double range[2]) override
Overridden to return the range of the color transfer function.
void GetBounds(double bounds[4]) override
Overridden to get the bounds from the color transfer function range.
~vtkRangeHandlesItem() override
static vtkRangeHandlesItem * New()
void SetHandleOrientation(int vtkNotUsed(orientation)) 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.
int vtkTypeBool
Definition vtkABI.h:64