VTK  9.2.6
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;
52  static vtkRangeHandlesItem* New();
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 
75  void SetColorTransferFunction(vtkColorTransferFunction* ctf);
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:
107  ~vtkRangeHandlesItem() override;
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
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:69
void GetBounds(double bounds[4]) override
Recover the bounds of the item.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:57
a simple class to control print indentation
Definition: vtkIndent.h:39
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()