Class representing a ChartDirector viewport control.
More...
#include <wxchartviewer.h>
Class representing a ChartDirector viewport control.
wxViewPortControl is a wxWidgets control that inherits from wxPanel and from ViewPortControlBase. It is used in wxWidgets applications for displaying charts images and to handle mouse interactions.
◆ wxViewPortControl()
wxViewPortControl::wxViewPortControl |
( |
wxWindow * |
parent = 0 , |
|
|
wxWindowID |
id = wxID_ANY , |
|
|
const wxPoint & |
pos = wxDefaultPosition , |
|
|
const wxSize & |
size = wxDefaultSize , |
|
|
long |
style = wxTAB_TRAVERSAL , |
|
|
const wxString & |
name = wxPanelNameStr |
|
) |
| |
Constructor for a ChartDirector viewport.
- Parameters
-
parent | The parent window. |
id | An identifier for the panel. wxID_ANY is taken to mean a default. |
pos | The panel position. The value wxDefaultPosition indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform. |
size | The panel size. The value wxDefaultSize indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform. |
style | The window style. |
name | Window name. |
◆ getChart()
BaseChart * wxViewPortControl::getChart |
( |
| ) |
|
|
virtual |
Gets the BaseChart object associated with the wxViewPortControl.
- Returns
- The BaseChart pointer.
◆ getViewer()
◆ OnMouseCaptureLost()
void wxViewPortControl::OnMouseCaptureLost |
( |
wxMouseCaptureLostEvent & |
evt | ) |
|
|
protectedvirtual |
Handles mouse capture lost events.
- Parameters
-
evt | Mouse capture lost event |
◆ OnMouseMoveEvent()
void wxViewPortControl::OnMouseMoveEvent |
( |
wxMouseEvent & |
evt | ) |
|
|
protectedvirtual |
Handles mouse move events.
- Parameters
-
◆ OnMousePressEvent()
void wxViewPortControl::OnMousePressEvent |
( |
wxMouseEvent & |
evt | ) |
|
|
protectedvirtual |
Handles left mouse button down events.
- Parameters
-
◆ OnMouseReleaseEvent()
void wxViewPortControl::OnMouseReleaseEvent |
( |
wxMouseEvent & |
evt | ) |
|
|
protectedvirtual |
Handles left mouse button up events.
- Parameters
-
◆ OnMouseWheelEvent()
void wxViewPortControl::OnMouseWheelEvent |
( |
wxMouseEvent & |
evt | ) |
|
|
protectedvirtual |
Handles mouse wheel events.
- Parameters
-
◆ OnPaint()
void wxViewPortControl::OnPaint |
( |
wxPaintEvent & |
evt | ) |
|
|
protected |
Handles the OnPaint event.
- Parameters
-
◆ PaintNow()
void wxViewPortControl::PaintNow |
( |
BaseChart * |
chart | ) |
|
|
protected |
Paints a chart immediately on screen.
- Parameters
-
chart | chart object to be painted on screen |
◆ Render()
void wxViewPortControl::Render |
( |
wxDC & |
dc, |
|
|
BaseChart * |
chart |
|
) |
| |
|
protected |
Renders the chart on the device context.
- Parameters
-
dc | screen device context |
chart | chart object to be rendered on screen |
◆ setChart()
void wxViewPortControl::setChart |
( |
BaseChart * |
chart | ) |
|
|
virtual |
Sets a BaseChart object for displaying in the control.
The chart usually is an overall chart that includes the full data range.
- Parameters
-
chart | The BaseChart object to be displayed. |
◆ setViewer()
◆ updateDisplay()
void wxViewPortControl::updateDisplay |
( |
| ) |
|
|
virtual |
Requests the viewport control to update its contents.
Normally, the wxViewPortControl display will automatically update if the viewport of the associated wxChartViewer object is changed. So calling updateDisplay is not necessary. However, if the display needs to be updated for other reasons, such as if the viewport border color has been modified, this method can be used to notify the wxViewPortControl that the modification has been completed so that it can update the display.