Go to the documentation of this file.
29 #ifndef vtkChartLegend_h
30 #define vtkChartLegend_h
32 #include "vtkChartsCoreModule.h"
57 vtkSetVector2Macro(Point,
float);
64 vtkGetVector2Macro(Point,
float);
91 vtkSetMacro(HorizontalAlignment,
int);
98 vtkGetMacro(HorizontalAlignment,
int);
106 vtkSetMacro(VerticalAlignment,
int);
113 vtkGetMacro(VerticalAlignment,
int);
120 vtkSetMacro(Padding,
int);
127 vtkGetMacro(Padding,
int);
134 vtkSetMacro(SymbolWidth,
int);
141 vtkGetMacro(SymbolWidth,
int);
171 vtkSetMacro(DragEnabled,
bool);
172 vtkGetMacro(DragEnabled,
bool);
228 vtkSetMacro(CacheBounds,
bool);
229 vtkGetMacro(CacheBounds,
bool);
230 vtkBooleanMacro(CacheBounds,
bool);
321 #endif //vtkChartLegend_h
virtual int GetLabelSize()
Get the point size of the label text.
Factory class for drawing 2D charts.
provides a brush that fills shapes drawn by vtkContext2D.
data structure to represent mouse events.
static vtkChartLegend * New()
Creates a 2D Chart object.
int Button
Last button to be pressed.
vtkTextProperty * GetLabelProperties()
Get the vtkTextProperty for the legend's labels.
vtkNew< vtkPen > Pen
The pen used to draw the legend box.
void SetPoint(const vtkVector2f &point)
Set point the legend box is anchored to.
record modification and/or execution time
Class for drawing 2D primitives to a graphical context.
bool CacheBounds
Should the legend attempt to avoid recalculating its position & bounds unnecessarily?
bool Inline
Should the legend be drawn inline in its chart?
bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse) override
Mouse button down event.
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
Request the space the legend requires to be drawn.
vtkPen * GetPen()
Get the pen used to draw the legend outline.
vtkChart * GetChart()
Get the chart that the legend belongs to and will draw the legend for.
bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse) override
Mouse button release event.
bool MouseMoveEvent(const vtkContextMouseEvent &mouse) override
Mouse move event.
const vtkVector2f & GetPointVector()
Get point the legend box is anchored to.
vtkNew< vtkTextProperty > LabelProperties
The text properties of the labels used in the legend.
a simple class to control print indentation
bool DragEnabled
Should we move the legend box around in response to the mouse drag?
vtkBrush * GetBrush()
Get the brush used to draw the legend background.
int SymbolWidth
Width of the symbols in pixels in the legend.
represent text properties.
base class for items that are part of a vtkContextScene.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Update() override
Update the geometry of the axis.
void SetChart(vtkChart *chart)
Set the chart that the legend belongs to and will draw the legend for.
int Padding
Padding between symbol and text.
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
virtual void SetLabelSize(int size)
Set the point size of the label text.
bool Paint(vtkContext2D *painter) override
Paint event for the axis, called whenever the axis needs to be drawn.
~vtkChartLegend() override
bool Hit(const vtkContextMouseEvent &mouse) override
Return true if the supplied x, y coordinate is inside the item.
vtkNew< vtkBrush > Brush
The brush used to render the background of the legend.