wxWidgets/docs/latex/wx/plotwindow.tex
2002-06-07 20:15:28 +00:00

177 lines
6.4 KiB
TeX

%
% automatically generated by HelpGen from
% plot.h at 11/Feb/00 18:00:57
%
\section{\class{wxPlotWindow}}\label{wxplotwindow}
wxPlotWindow is a specialized window designed to display data that typically has
been measured by machines, i.e. that may have thousands of values. One example of
such data would be the well known ECG measuring the electrical activity of your
heart: the measuring device will produce thousands of values per minute, several
measurements are done simultaneously and you might want to have a look at parts
of the curves, enlarging them or scrolling from one position to another. Note
that this window is not useful for real-time measuring or for displaying charts
with error bars etc.
A single curve in the plot window is represented by the \helpref{wxPlotCurve}{wxplotcurve}
class.
The wxPlotWindow interacts with program using events, for example when clicking
or double clicking on a curve or when selecting one by clicking on it (which
can be vetoed). Future versions will hopefully feature selecting values or
sections of the displayed curves etc.
\wxheading{Derived from}
\helpref{wxScrolledWindow}{wxscrolledwindow}\\
\helpref{wxPanel}{wxpanel}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Window styles}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxPLOT\_BUTTON\_MOVE}}{Display buttons to allow moving individual curves up or down.}
\twocolitem{\windowstyle{wxPLOT\_BUTTON\_ENLARGE}}{Display buttons to allow enlarging individual curves vertically.}
\twocolitem{\windowstyle{wxPLOT\_BUTTON\_ZOOM}}{Display buttons to allow zooming all curves horizontally.}
\twocolitem{\windowstyle{wxPLOT\_BUTTON\_ALL}}{Display all buttons.}
\twocolitem{\windowstyle{wxPLOT\_Y\_AXIS}}{Display an Y axis to the left of the drawing area.}
\twocolitem{\windowstyle{wxPLOT\_X\_AXIS}}{Display a X axis at the bottom of the drawing area.}
\twocolitem{\windowstyle{wxPLOT\_DEFAULT}}{All of the above options.}
\end{twocollist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxPlotWindow::wxPlotWindow}\label{wxplotwindowwxplotwindow}
\func{}{wxPlotWindow}{\void}
\func{}{wxPlotWindow}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxPoint\& }{pos}, \param{const wxSize\& }{size}, \param{int }{flags = wxPLOT\_DEFAULT}}
Constructor.
\membersection{wxPlotWindow::\destruct{wxPlotWindow}}\label{wxplotwindowdtor}
\func{}{\destruct{wxPlotWindow}}{\void}
The destructor will not delete the curves associated to the window.
\membersection{wxPlotWindow::Add}\label{wxplotwindowadd}
\func{void}{Add}{\param{wxPlotCurve* }{curve}}
Add a curve to the window.
\membersection{wxPlotWindow::GetCount}\label{wxplotwindowgetcount}
\func{size\_t}{GetCount}{\void}
Returns number of curves.
\membersection{wxPlotWindow::GetAt}\label{wxplotwindowgetat}
\func{wxPlotCurve*}{GetAt}{\param{size\_t }{n}}
Get the nth curve.
\membersection{wxPlotWindow::SetCurrent}\label{wxplotwindowsetcurrent}
\func{void}{SetCurrent}{\param{wxPlotCurve* }{current}}
Make one curve the current curve. This will emit a wxPlotEvent.
\membersection{wxPlotWindow::GetCurrent}\label{wxplotwindowgetcurrent}
\func{wxPlotCurve*}{GetCurrent}{\void}
Returns a pointer to the current curve, or NULL.
\membersection{wxPlotWindow::Delete}\label{wxplotwindowdelete}
\func{void}{Delete}{\param{wxPlotCurve* }{curve}}
Removes a curve from the window and delete is on screen. This does not
delete the actual curve. If the curve removed was the current curve,
the current curve will be set to NULL.
\membersection{wxPlotWindow::Move}\label{wxplotwindowmove}
\func{void}{Move}{\param{wxPlotCurve* }{curve}, \param{int }{pixels\_up}}
Move the curve {\tt curve} up by {\tt pixels\_up} pixels. Down if the
value is negative.
\membersection{wxPlotWindow::Enlarge}\label{wxplotwindowenlarge}
\func{void}{Enlarge}{\param{wxPlotCurve* }{curve}, \param{double }{factor}}
Changes the representation of the given curve. A {\tt factor} of more than
one will stretch the curve vertically. The Y axis will change accordingly.
\membersection{wxPlotWindow::SetUnitsPerValue}\label{wxplotwindowsetunitspervalue}
\func{void}{SetUnitsPerValue}{\param{double }{upv}}
This sets the virtual units per value. Normally, you will not be interested in
what measured value you see, but what it stands for. If you want to display seconds
on the X axis and the measuring device produced 50 values per second, set this
value to 50. This will affect all curves being displayed.
\membersection{wxPlotWindow::GetUnitsPerValue}\label{wxplotwindowgetunitspervalue}
\func{double}{GetUnitsPerValue}{\void}
See \helpref{SetUnitsPerValue}{wxplotwindowsetunitspervalue}.
\membersection{wxPlotWindow::SetZoom}\label{wxplotwindowsetzoom}
\func{void}{SetZoom}{\param{double }{zoom}}
This functions zooms all curves in their horizontal dimension. The X axis will
be changed accordingly.
\membersection{wxPlotWindow::GetZoom}\label{wxplotwindowgetzoom}
\func{double}{GetZoom}{\void}
See \helpref{SetZoom}{wxplotwindowsetzoom}.
\membersection{wxPlotWindow::RedrawEverything}\label{wxplotwindowredraweverything}
\func{void}{RedrawEverything}{\void}
Helper function which redraws both axes and the central area.
\membersection{wxPlotWindow::RedrawXAxis}\label{wxplotwindowredrawxaxis}
\func{void}{RedrawXAxis}{\void}
Helper function which redraws the X axis.
\membersection{wxPlotWindow::RedrawYAxis}\label{wxplotwindowredrawyaxis}
\func{void}{RedrawYAxis}{\void}
Helper function which redraws the Y axis.
\membersection{wxPlotWindow::SetScrollOnThumbRelease}\label{wxplotwindowsetscrollonthumbrelease}
\func{void}{SetScrollOnThumbRelease}{\param{bool}{ onrelease = TRUE}}
This function controls if the plot area will get scrolled only if the scrollbar thumb
has been release or also if the thumb is being dragged. When displaying large amounts
of data, it might become impossible to display the data fast enough to produce smooth
scrolling and then this function should be called.
\membersection{wxPlotWindow::SetEnlargeAroundWindowCentre}\label{wxplotwindowsetenlargearoundwindowcentre}
\func{void}{SetEnlargeAroundWindowCentre}{\param{bool}{ aroundwindow = TRUE}}
Depending on the kind of data you display, enlarging the individual curves might
have different desired effects. Sometimes, the data will be supposed to get enlarged
with the fixed point being the origin, sometimes the fixed point should be the centre
of the current drawing area. This function controls this behaviour.