]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/plotwindow.tex
Fixed to work with the new wxMacControl system.
[wxWidgets.git] / docs / latex / wx / plotwindow.tex
... / ...
CommitLineData
1%
2% automatically generated by HelpGen from
3% plot.h at 11/Feb/00 18:00:57
4%
5
6\section{\class{wxPlotWindow}}\label{wxplotwindow}
7
8wxPlotWindow is a specialized window designed to display data that typically has
9been measured by machines, i.e. that may have thousands of values. One example of
10such data would be the well known ECG measuring the electrical activity of your
11heart: the measuring device will produce thousands of values per minute, several
12measurements are done simultaneously and you might want to have a look at parts
13of the curves, enlarging them or scrolling from one position to another. Note
14that this window is not useful for real-time measuring or for displaying charts
15with error bars etc.
16
17A single curve in the plot window is represented by the \helpref{wxPlotCurve}{wxplotcurve}
18class.
19
20The wxPlotWindow interacts with program using events, for example when clicking
21or double clicking on a curve or when selecting one by clicking on it (which
22can be vetoed). Future versions will hopefully feature selecting values or
23sections of the displayed curves etc.
24
25\wxheading{Derived from}
26
27\helpref{wxScrolledWindow}{wxscrolledwindow}\\
28\helpref{wxPanel}{wxpanel}\\
29\helpref{wxWindow}{wxwindow}\\
30\helpref{wxEvtHandler}{wxevthandler}\\
31\helpref{wxObject}{wxobject}
32
33\wxheading{Window styles}
34
35\begin{twocollist}\itemsep=0pt
36\twocolitem{\windowstyle{wxPLOT\_BUTTON\_MOVE}}{Display buttons to allow moving individual curves up or down.}
37\twocolitem{\windowstyle{wxPLOT\_BUTTON\_ENLARGE}}{Display buttons to allow enlarging individual curves vertically.}
38\twocolitem{\windowstyle{wxPLOT\_BUTTON\_ZOOM}}{Display buttons to allow zooming all curves horizontally.}
39\twocolitem{\windowstyle{wxPLOT\_BUTTON\_ALL}}{Display all buttons.}
40\twocolitem{\windowstyle{wxPLOT\_Y\_AXIS}}{Display an Y axis to the left of the drawing area.}
41\twocolitem{\windowstyle{wxPLOT\_X\_AXIS}}{Display a X axis at the bottom of the drawing area.}
42\twocolitem{\windowstyle{wxPLOT\_DEFAULT}}{All of the above options.}
43\end{twocollist}
44
45\latexignore{\rtfignore{\wxheading{Members}}}
46
47\membersection{wxPlotWindow::wxPlotWindow}\label{wxplotwindowwxplotwindow}
48
49\func{}{wxPlotWindow}{\void}
50
51\func{}{wxPlotWindow}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxPoint\& }{pos}, \param{const wxSize\& }{size}, \param{int }{flags = wxPLOT\_DEFAULT}}
52
53Constructor.
54
55\membersection{wxPlotWindow::\destruct{wxPlotWindow}}\label{wxplotwindowdtor}
56
57\func{}{\destruct{wxPlotWindow}}{\void}
58
59The destructor will not delete the curves associated to the window.
60
61\membersection{wxPlotWindow::Add}\label{wxplotwindowadd}
62
63\func{void}{Add}{\param{wxPlotCurve* }{curve}}
64
65Add a curve to the window.
66
67\membersection{wxPlotWindow::GetCount}\label{wxplotwindowgetcount}
68
69\func{size\_t}{GetCount}{\void}
70
71Returns number of curves.
72
73\membersection{wxPlotWindow::GetAt}\label{wxplotwindowgetat}
74
75\func{wxPlotCurve*}{GetAt}{\param{size\_t }{n}}
76
77Get the nth curve.
78
79\membersection{wxPlotWindow::SetCurrentCurve}\label{wxplotwindowsetcurrentcurve}
80
81\func{void}{SetCurrentCurve}{\param{wxPlotCurve* }{current}}
82
83Make one curve the current curve. This will emit a wxPlotEvent.
84
85\membersection{wxPlotWindow::GetCurrentCurve}\label{wxplotwindowgetcurrentcurve}
86
87\func{wxPlotCurve*}{GetCurrentCurve}{\void}
88
89Returns a pointer to the current curve, or NULL.
90
91\membersection{wxPlotWindow::Delete}\label{wxplotwindowdelete}
92
93\func{void}{Delete}{\param{wxPlotCurve* }{curve}}
94
95Removes a curve from the window and delete is on screen. This does not
96delete the actual curve. If the curve removed was the current curve,
97the current curve will be set to NULL.
98
99\membersection{wxPlotWindow::Move}\label{wxplotwindowmove}
100
101\func{void}{Move}{\param{wxPlotCurve* }{curve}, \param{int }{pixels\_up}}
102
103Move the curve {\tt curve} up by {\tt pixels\_up} pixels. Down if the
104value is negative.
105
106\membersection{wxPlotWindow::Enlarge}\label{wxplotwindowenlarge}
107
108\func{void}{Enlarge}{\param{wxPlotCurve* }{curve}, \param{double }{factor}}
109
110Changes the representation of the given curve. A {\tt factor} of more than
111one will stretch the curve vertically. The Y axis will change accordingly.
112
113\membersection{wxPlotWindow::SetUnitsPerValue}\label{wxplotwindowsetunitspervalue}
114
115\func{void}{SetUnitsPerValue}{\param{double }{upv}}
116
117This sets the virtual units per value. Normally, you will not be interested in
118what measured value you see, but what it stands for. If you want to display seconds
119on the X axis and the measuring device produced 50 values per second, set this
120value to 50. This will affect all curves being displayed.
121
122\membersection{wxPlotWindow::GetUnitsPerValue}\label{wxplotwindowgetunitspervalue}
123
124\func{double}{GetUnitsPerValue}{\void}
125
126See \helpref{SetUnitsPerValue}{wxplotwindowsetunitspervalue}.
127
128\membersection{wxPlotWindow::SetZoom}\label{wxplotwindowsetzoom}
129
130\func{void}{SetZoom}{\param{double }{zoom}}
131
132This functions zooms all curves in their horizontal dimension. The X axis will
133be changed accordingly.
134
135\membersection{wxPlotWindow::GetZoom}\label{wxplotwindowgetzoom}
136
137\func{double}{GetZoom}{\void}
138
139See \helpref{SetZoom}{wxplotwindowsetzoom}.
140
141\membersection{wxPlotWindow::RedrawEverything}\label{wxplotwindowredraweverything}
142
143\func{void}{RedrawEverything}{\void}
144
145Helper function which redraws both axes and the central area.
146
147\membersection{wxPlotWindow::RedrawXAxis}\label{wxplotwindowredrawxaxis}
148
149\func{void}{RedrawXAxis}{\void}
150
151Helper function which redraws the X axis.
152
153\membersection{wxPlotWindow::RedrawYAxis}\label{wxplotwindowredrawyaxis}
154
155\func{void}{RedrawYAxis}{\void}
156
157Helper function which redraws the Y axis.
158
159\membersection{wxPlotWindow::SetScrollOnThumbRelease}\label{wxplotwindowsetscrollonthumbrelease}
160
161\func{void}{SetScrollOnThumbRelease}{\param{bool}{ onrelease = true}}
162
163This function controls if the plot area will get scrolled only if the scrollbar thumb
164has been release or also if the thumb is being dragged. When displaying large amounts
165of data, it might become impossible to display the data fast enough to produce smooth
166scrolling and then this function should be called.
167
168\membersection{wxPlotWindow::SetEnlargeAroundWindowCentre}\label{wxplotwindowsetenlargearoundwindowcentre}
169
170\func{void}{SetEnlargeAroundWindowCentre}{\param{bool}{ aroundwindow = true}}
171
172Depending on the kind of data you display, enlarging the individual curves might
173have different desired effects. Sometimes, the data will be supposed to get enlarged
174with the fixed point being the origin, sometimes the fixed point should be the centre
175of the current drawing area. This function controls this behaviour.
176