]>
Commit | Line | Data |
---|---|---|
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 | ||
8 | wxPlotWindow is a specialized window designed to display data that typically has | |
9 | been measured by machines, i.e. that may have thousands of values. One example of | |
10 | such data would be the well known ECG measuring the electrical activity of your | |
11 | heart: the measuring device will produce thousands of values per minute, several | |
12 | measurements are done simultaneously and you might want to have a look at parts | |
13 | of the curves, enlarging them or scrolling from one position to another. Note | |
14 | that this window is not useful for real-time measuring or for displaying charts | |
15 | with error bars etc. | |
16 | ||
17 | A single curve in the plot window is represented by the \helpref{wxPlotCurve}{wxplotcurve} | |
18 | class. | |
19 | ||
20 | The wxPlotWindow interacts with program using events, for example when clicking | |
21 | or double clicking on a curve or when selecting one by clicking on it (which | |
22 | can be vetoed). Future versions will hopefully feature selecting values or | |
23 | sections 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 | ||
53 | Constructor. | |
54 | ||
55 | \membersection{wxPlotWindow::\destruct{wxPlotWindow}}\label{wxplotwindowdtor} | |
56 | ||
57 | \func{}{\destruct{wxPlotWindow}}{\void} | |
58 | ||
59 | The 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 | ||
65 | Add a curve to the window. | |
66 | ||
67 | \membersection{wxPlotWindow::GetCount}\label{wxplotwindowgetcount} | |
68 | ||
69 | \func{size\_t}{GetCount}{\void} | |
70 | ||
71 | Returns number of curves. | |
72 | ||
73 | \membersection{wxPlotWindow::GetAt}\label{wxplotwindowgetat} | |
74 | ||
75 | \func{wxPlotCurve*}{GetAt}{\param{size\_t }{n}} | |
76 | ||
77 | Get the nth curve. | |
78 | ||
79 | \membersection{wxPlotWindow::SetCurrent}\label{wxplotwindowsetcurrent} | |
80 | ||
81 | \func{void}{SetCurrent}{\param{wxPlotCurve* }{current}} | |
82 | ||
83 | Make one curve the current curve. This will emit a wxPlotEvent. | |
84 | ||
85 | \membersection{wxPlotWindow::GetCurrent}\label{wxplotwindowgetcurrent} | |
86 | ||
87 | \func{wxPlotCurve*}{GetCurrent}{\void} | |
88 | ||
89 | Returns a pointer to the current curve, or NULL. | |
90 | ||
91 | \membersection{wxPlotWindow::Delete}\label{wxplotwindowdelete} | |
92 | ||
93 | \func{void}{Delete}{\param{wxPlotCurve* }{curve}} | |
94 | ||
95 | Removes a curve from the window and delete is on screen. This does not | |
96 | delete the actual curve. If the curve removed was the current curve, | |
97 | the 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 | ||
103 | Move the curve {\tt curve} up by {\tt pixels\_up} pixels. Down if the | |
104 | value is negative. | |
105 | ||
106 | \membersection{wxPlotWindow::Enlarge}\label{wxplotwindowenlarge} | |
107 | ||
108 | \func{void}{Enlarge}{\param{wxPlotCurve* }{curve}, \param{double }{factor}} | |
109 | ||
110 | Changes the representation of the given curve. A {\tt factor} of more than | |
111 | one 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 | ||
117 | This sets the virtual units per value. Normally, you will not be interested in | |
118 | what measured value you see, but what it stands for. If you want to display seconds | |
119 | on the X axis and the measuring device produced 50 values per second, set this | |
120 | value to 50. This will affect all curves being displayed. | |
121 | ||
122 | \membersection{wxPlotWindow::GetUnitsPerValue}\label{wxplotwindowgetunitspervalue} | |
123 | ||
124 | \func{double}{GetUnitsPerValue}{\void} | |
125 | ||
126 | See \helpref{SetUnitsPerValue}{wxplotwindowsetunitspervalue}. | |
127 | ||
128 | \membersection{wxPlotWindow::SetZoom}\label{wxplotwindowsetzoom} | |
129 | ||
130 | \func{void}{SetZoom}{\param{double }{zoom}} | |
131 | ||
132 | This functions zooms all curves in their horizontal dimension. The X axis will | |
133 | be changed accordingly. | |
134 | ||
135 | \membersection{wxPlotWindow::GetZoom}\label{wxplotwindowgetzoom} | |
136 | ||
137 | \func{double}{GetZoom}{\void} | |
138 | ||
139 | See \helpref{SetZoom}{wxplotwindowsetzoom}. | |
140 | ||
141 | \membersection{wxPlotWindow::RedrawEverything}\label{wxplotwindowredraweverything} | |
142 | ||
143 | \func{void}{RedrawEverything}{\void} | |
144 | ||
145 | Helper function which redraws both axes and the central area. | |
146 | ||
147 | \membersection{wxPlotWindow::RedrawXAxis}\label{wxplotwindowredrawxaxis} | |
148 | ||
149 | \func{void}{RedrawXAxis}{\void} | |
150 | ||
151 | Helper function which redraws the X axis. | |
152 | ||
153 | \membersection{wxPlotWindow::RedrawYAxis}\label{wxplotwindowredrawyaxis} | |
154 | ||
155 | \func{void}{RedrawYAxis}{\void} | |
156 | ||
157 | Helper function which redraws the Y axis. | |
158 | ||
159 | \membersection{wxPlotWindow::SetScrollOnThumbRelease}\label{wxplotwindowsetscrollonthumbrelease} | |
160 | ||
161 | \func{void}{SetScrollOnThumbRelease}{\param{bool}{ onrelease = TRUE}} | |
162 | ||
163 | This function controls if the plot area will get scrolled only if the scrollbar thumb | |
164 | has been release or also if the thumb is being dragged. When displaying large amounts | |
165 | of data, it might become impossible to display the data fast enough to produce smooth | |
166 | scrolling and then this function should be called. | |
167 | ||
168 | \membersection{wxPlotWindow::SetEnlargeAroundWindowCentre}\label{wxplotwindowsetenlargearoundwindowcentre} | |
169 | ||
170 | \func{void}{SetEnlargeAroundWindowCentre}{\param{bool}{ aroundwindow = TRUE}} | |
171 | ||
172 | Depending on the kind of data you display, enlarging the individual curves might | |
173 | have different desired effects. Sometimes, the data will be supposed to get enlarged | |
174 | with the fixed point being the origin, sometimes the fixed point should be the centre | |
175 | of the current drawing area. This function controls this behaviour. | |
176 |