17#ifndef vtkChartLegend_h 
   18#define vtkChartLegend_h 
   20#include "vtkChartsCoreModule.h"  
   25VTK_ABI_NAMESPACE_BEGIN
 
   46  vtkSetVector2Macro(Point, 
float);
 
   53  vtkGetVector2Macro(Point, 
float);
 
   81  vtkSetMacro(HorizontalAlignment, 
int);
 
   88  vtkGetMacro(HorizontalAlignment, 
int);
 
   96  vtkSetMacro(VerticalAlignment, 
int);
 
  103  vtkGetMacro(VerticalAlignment, 
int);
 
  110  vtkSetMacro(Padding, 
int);
 
  117  vtkGetMacro(Padding, 
int);
 
  124  vtkSetMacro(SymbolWidth, 
int);
 
  131  vtkGetMacro(SymbolWidth, 
int);
 
  150  vtkSetMacro(Inline, 
bool);
 
  151  vtkGetMacro(Inline, 
bool);
 
  161  vtkSetMacro(DragEnabled, 
bool);
 
  162  vtkGetMacro(DragEnabled, 
bool);
 
  218  vtkSetMacro(CacheBounds, 
bool);
 
  219  vtkGetMacro(CacheBounds, 
bool);
 
  220  vtkBooleanMacro(CacheBounds, 
bool);
 
provides a brush that fills shapes drawn by vtkContext2D.
 
vtkBrush * GetBrush()
Get the brush used to draw the legend background.
 
const vtkVector2f & GetPointVector()
Get point the legend box is anchored to.
 
bool DragEnabled
Should we move the legend box around in response to the mouse drag?
 
bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse) override
Mouse button down event.
 
int SymbolWidth
Width of the symbols in pixels in the legend.
 
int Button
Last button to be pressed.
 
vtkNew< vtkBrush > Brush
The brush used to render the background of the legend.
 
~vtkChartLegend() override
 
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 Paint(vtkContext2D *painter) override
Paint event for the axis, called whenever the axis needs to be drawn.
 
vtkNew< vtkTextProperty > LabelProperties
The text properties of the labels used in the legend.
 
int Padding
Padding between symbol and text.
 
bool Hit(const vtkContextMouseEvent &mouse) override
Return true if the supplied x, y coordinate is inside the item.
 
vtkNew< vtkPen > Pen
The pen used to draw the legend box.
 
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
 
bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse) override
Mouse button release event.
 
void SetChart(vtkChart *chart)
Set the chart that the legend belongs to and will draw the legend for.
 
vtkPen * GetPen()
Get the pen used to draw the legend outline.
 
virtual int GetLabelSize()
Get the point size of the label text.
 
bool MouseMoveEvent(const vtkContextMouseEvent &mouse) override
Mouse move event.
 
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
Request the space the legend requires to be drawn.
 
void Update() override
Update the geometry of the axis.
 
static vtkChartLegend * New()
Creates a 2D Chart object.
 
vtkTextProperty * GetLabelProperties()
Get the vtkTextProperty for the legend's labels.
 
vtkChart * GetChart()
Get the chart that the legend belongs to and will draw the legend for.
 
virtual void SetLabelSize(int size)
Set the point size of the label text.
 
void SetPoint(const vtkVector2f &point)
Set point the legend box is anchored to.
 
Factory class for drawing 2D charts.
 
Class for drawing 2D primitives to a graphical context.
 
base class for items that are part of a vtkContextScene.
 
data structure to represent mouse events.
 
a simple class to control print indentation
 
Allocate and hold a VTK object.
 
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
 
represent text properties.
 
record modification and/or execution time