30 #ifndef vtkPlotRangeHandlesItem_h
31 #define vtkPlotRangeHandlesItem_h
33 #include "vtkChartsCoreModule.h"
37 VTK_ABI_NAMESPACE_BEGIN
69 void GetBounds(
double bounds[4])
override;
75 virtual void GetHandlesRange(
double range[2]);
82 vtkSetMacro(HandleWidth,
float);
83 vtkGetMacro(HandleWidth,
float);
90 vtkSetClampMacro(HandleOrientation,
int, VERTICAL, HORIZONTAL);
91 vtkGetMacro(HandleOrientation,
int);
105 vtkSetVector4Macro(Extent,
double);
106 vtkGetVector4Macro(Extent,
double);
124 vtkBooleanMacro(SynchronizeRangeHandles,
vtkTypeBool);
140 vtkGetObjectMacro(HighlightBrush,
vtkBrush);
145 virtual void ComputeHandlesDrawRange();
160 void GetAxesRange(
double* abcissaRange,
double* ordinateRange);
161 void GetAxesUnscaledRange(
double* abcissaRange,
double* ordinateRange);
167 void ComputeRange(
double*
range);
172 void ComputeHandleDelta(
double screenBounds[4]);
212 virtual void SetActiveHandlePosition(
double position);
218 bool IsActiveHandleMoved(
double tolerance);
223 void SetCursor(
int cursor);
228 float HandleWidth = 2;
229 float HandleDelta = 0;
230 float LeftHandleDrawRange[2] = { 0, 0 };
231 float RightHandleDrawRange[2] = { 0, 0 };
232 int ActiveHandle = NO_HANDLE;
233 int HoveredHandle = NO_HANDLE;
234 float HoveredPosition[2] = { 0, 0 };
236 double ActiveHandlePosition = 0;
237 double ActiveHandleRangeValue = 0;
240 double Extent[4] = { 0, 1, 0, 1 };
243 int HandleOrientation = VERTICAL;
246 VTK_ABI_NAMESPACE_END
247 #endif // vtkPlotRangeHandlesItem_h
vtkNew< vtkBrush > RangeLabelBrush
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse button down event Return true if the item holds the event, false if the event can be propagated...
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
bool Hit(const vtkContextMouseEvent &mouse) override
Returns true if the supplied x, y coordinate is inside the item.
virtual void TransformScreenToData(const vtkVector2f &in, vtkVector2f &out)
Transform the mouse event in the control-points space.
item to show and control a range on vtkAxis
Class for drawing 2D primitives to a graphical context.
provides a brush that fills shapes drawn by vtkContext2D.
data structure to represent mouse events.
a simple class to control print indentation
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
Mouse button release event.
void SetHandleOrientationToVertical()
Set/Get the handles orientation in the plot.
Abstract class for 2D plots.
virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse)
Mouse enter event.
void SetHandleOrientationToHorizontal()
Set/Get the handles orientation in the plot.
virtual void TransformDataToScreen(const vtkVector2f &in, vtkVector2f &out)
Transform the mouse event in the control-points space.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkNew< vtkBrush > HighlightBrush
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
Mouse button double click event.
virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse)
Mouse leave event.