VTK  9.1.0
vtkRangeHandlesItem.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkRangeHandlesItem.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
36#ifndef vtkRangeHandlesItem_h
37#define vtkRangeHandlesItem_h
38
39#include "vtkChartsCoreModule.h" // For export macro
41
43
44class VTKCHARTSCORE_EXPORT vtkRangeHandlesItem : public vtkPlotRangeHandlesItem
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
50
55 bool Paint(vtkContext2D* painter) override;
56
60 void GetBounds(double bounds[4]) override;
61
66 void GetHandlesRange(double range[2]) override;
67
69
73 vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
75
80 void ComputeHandlesDrawRange() override;
81
83
89 void SynchronizeRangeHandlesOn() override { this->Superclass::SynchronizeRangeHandlesOff(); }
90
91 void SetSynchronizeRangeHandles(vtkTypeBool vtkNotUsed(synchronize)) override
92 {
93 this->Superclass::SynchronizeRangeHandlesOff();
94 }
95
96 void SetHandleOrientation(int vtkNotUsed(orientation)) override
97 {
98 this->Superclass::SetHandleOrientation(Orientation::VERTICAL);
99 }
101
102protected:
105
110 void SetActiveHandlePosition(double position) override;
111
112private:
114 void operator=(const vtkRangeHandlesItem&) = delete;
115
116 vtkColorTransferFunction* ColorTransferFunction = nullptr;
117};
118
119#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.
Definition: vtkContext2D.h:73
a simple class to control print indentation
Definition: vtkIndent.h:113
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 tranfer 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.
@ orientation
Definition: vtkX3D.h:268
@ range
Definition: vtkX3D.h:244
@ position
Definition: vtkX3D.h:267
int vtkTypeBool
Definition: vtkABI.h:69