Wt  3.3.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Member Functions
Wt::Chart::WAxisSliderWidget Class Reference

A widget for selecting an X axis range to display on an associated WCartesianChart. More...

#include <Wt/Chart/WAxisSliderWidget>

Inheritance diagram for Wt::Chart::WAxisSliderWidget:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 WAxisSliderWidget (WContainerWidget *parent=0)
 Creates an axis slider widget.
 WAxisSliderWidget (WCartesianChart *chart, int seriesColumn, WContainerWidget *parent=0)
 Creates an axis slider widget.
virtual ~WAxisSliderWidget ()
 Destructor.
void setChart (WCartesianChart *chart)
 Set the associated chart.
void setSeriesColumn (int seriesColumn)
 Set the associated data series column.
int seriesColumn () const
 Returns the associated data series column.
void setSeriesPen (const WPen &pen)
 Set the pen to draw the data series with.
const WPenseriesPen () const
 Returns the pen to draw the data series with.
void setSelectedSeriesPen (const WPen &pen)
 Set the pen to draw the selected part of the data series with.
WPen selectedSeriesPen () const
 Returns the pen to draw the selected part of the data series with.
void setHandleBrush (const WBrush &brush)
 Set the brush to draw the handles left and right of the selected area with.
const WBrushhandleBrush () const
 Returns the brush to draw the handles left and right of the selected area with.
void setBackground (const WBrush &background)
 Set the background brush.
const WBrushbackground () const
 Returns the background brush.
void setSelectedAreaBrush (const WBrush &brush)
 Set the brush for the selected area.
const WBrushselectedAreaBrush () const
 Returns the brush for the selected area.
void setSelectionAreaPadding (int padding, WFlags< Side > sides=All)
 Sets an internal margin for the selection area.
int selectionAreaPadding (Side side) const
 Returns the internal margin for the selection area.
void setAutoLayoutEnabled (bool enabled=true)
 Configures the axis slider layout to be automatic.
bool isAutoLayoutEnabled () const
 Returns whether chart layout is computed automatically.
void setLabelsEnabled (bool enabled=true)
 Set whether to draw the X axis tick labels on the slider widget.
bool isLabelsEnabled () const
 Returns whether the X axis tick labels are drawn.

Protected Member Functions

virtual void render (WFlags< RenderFlag > flags) WT_CXX11ONLY(override)
 Renders the widget.
virtual void paintEvent (WPaintDevice *paintDevice) WT_CXX11ONLY(override)
 Paints the widget.

Detailed Description

A widget for selecting an X axis range to display on an associated WCartesianChart.

Note:
This widget currently only works with the HtmlCanvas rendering method.

Constructor & Destructor Documentation

Creates an axis slider widget.

Creates an axis slider widget that is not associated with a chart. Before it is used, a chart should be assigned with setChart(), and a series column chosen with setSeriesColumn().

Wt::Chart::WAxisSliderWidget::WAxisSliderWidget ( WCartesianChart chart,
int  seriesColumn,
WContainerWidget parent = 0 
)

Creates an axis slider widget.

Creates an axis slider widget associated with the given data series of the given chart.


Member Function Documentation

Returns whether chart layout is computed automatically.

See also:
setAutoLayoutEnabled()

Returns whether the X axis tick labels are drawn.

See also:
setLabelsEnabled()
void Wt::Chart::WAxisSliderWidget::paintEvent ( WPaintDevice paintDevice) [override, protected, virtual]

Paints the widget.

You should reimplement this method to paint the contents of the widget, using the given paintDevice.

Implements Wt::WPaintedWidget.

void Wt::Chart::WAxisSliderWidget::render ( WFlags< RenderFlag flags) [override, protected, virtual]

Renders the widget.

This function renders the widget (or an update for the widget), after this has been scheduled using scheduleRender().

The default implementation will render the widget by serializing changes to JavaScript and HTML. You may want to reimplement this widget if you have been postponing some of the layout / rendering implementation until the latest moment possible. In that case you should make sure you call the base implementation however.

Reimplemented from Wt::WPaintedWidget.

Returns the internal margin for the selection area.

This is either the padding set through setSelectionAreaPadding() or computed using setAutoLayoutEnabled().

See also:
setPlotAreaPadding()

Configures the axis slider layout to be automatic.

This configures the selection area so that the space around it is suited for the text that is rendered.

void Wt::Chart::WAxisSliderWidget::setLabelsEnabled ( bool  enabled = true)

Set whether to draw the X axis tick labels on the slider widget.

Labels are enabled by default.

Set the pen to draw the selected part of the data series with.

If not set, this defaults to seriesPen().

void Wt::Chart::WAxisSliderWidget::setSelectionAreaPadding ( int  padding,
WFlags< Side sides = All 
)

Sets an internal margin for the selection area.

This configures the area (in pixels) around the selection area that is available for the axes and labels, and the handles.

Alternatively, you can configure the chart layout to be computed automatically using setAutoLayoutEnabled().

See also:
setAutoLayoutEnabled()

Set the associated data series column.

Only LineSeries and CurveSeries are supported.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Tue Mar 22 2016 for the C++ Web Toolkit (Wt) by doxygen 1.7.6.1