VTK  9.2.5
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 
39 #ifndef vtkRangeHandlesItem_h
40 #define vtkRangeHandlesItem_h
41 
42 #include "vtkChartsCoreModule.h" // For export macro
44 
46 
47 class VTKCHARTSCORE_EXPORT vtkRangeHandlesItem : public vtkPlotRangeHandlesItem
48 {
49 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
58  bool Paint(vtkContext2D* painter) override;
59 
63  void GetBounds(double bounds[4]) override;
64 
69  void GetHandlesRange(double range[2]) override;
70 
72 
76  vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
78 
83  void ComputeHandlesDrawRange() override;
84 
86 
92  void SynchronizeRangeHandlesOn() override { this->Superclass::SynchronizeRangeHandlesOff(); }
93 
94  void SetSynchronizeRangeHandles(vtkTypeBool vtkNotUsed(synchronize)) override
95  {
96  this->Superclass::SynchronizeRangeHandlesOff();
97  }
98 
99  void SetHandleOrientation(int vtkNotUsed(orientation)) override
100  {
101  this->Superclass::SetHandleOrientation(Orientation::VERTICAL);
102  }
104 
105 protected:
108 
113  void SetActiveHandlePosition(double position) override;
114 
115 private:
116  vtkRangeHandlesItem(const vtkRangeHandlesItem&) = delete;
117  void operator=(const vtkRangeHandlesItem&) = delete;
118 
119  vtkColorTransferFunction* ColorTransferFunction = nullptr;
120 };
121 
122 #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:77
a simple class to control print indentation
Definition: vtkIndent.h:119
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.
static vtkRangeHandlesItem * New()
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
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