From a5a0dd06b67fecd5e571bd9d4221101393d5561b Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 11 Feb 2000 18:00:42 +0000 Subject: [PATCH] Made HelpGen compile here. Documented wxPlotWindow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/category.tex | 7 +- docs/latex/wx/classes.tex | 1 + docs/latex/wx/plotwindow.tex | 158 ++++++++++++++++++++++++++++ include/wx/generic/plot.h | 2 + src/generic/plot.cpp | 11 ++ utils/HelpGen/src/docripper.cpp | 2 +- utils/HelpGen/src/scriptbinder.cpp | 8 +- utils/HelpGen/src/sourcepainter.cpp | 4 +- 8 files changed, 184 insertions(+), 9 deletions(-) create mode 100644 docs/latex/wx/plotwindow.tex diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex index 0165609898..91601cf3f5 100644 --- a/docs/latex/wx/category.tex +++ b/docs/latex/wx/category.tex @@ -27,16 +27,17 @@ See also {\bf Common dialogs}. The following are a variety of windows that are derived from wxWindow. \begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxGrid}{wxgrid}}{A grid (table) window} \twocolitem{\helpref{wxPanel}{wxpanel}}{A window whose colour changes according to current user settings} -\twocolitem{\helpref{wxSashWindow}{wxsashwindow}}{Window with four optional sashes that can be dragged} -\twocolitem{\helpref{wxSashLayoutWindow}{wxsashlayoutwindow}}{Window that can be involved in an IDE-like layout arrangement} \twocolitem{\helpref{wxScrolledWindow}{wxscrolledwindow}}{Window with automatically managed scrollbars} +\twocolitem{\helpref{wxGrid}{wxgrid}}{A grid (table) window} \twocolitem{\helpref{wxSplitterWindow}{wxsplitterwindow}}{Window which can be split vertically or horizontally} \twocolitem{\helpref{wxStatusBar}{wxstatusbar}}{Implements the status bar on a frame} \twocolitem{\helpref{wxToolBar}{wxtoolbar}}{Toolbar class} %\twocolitem{\helpref{wxTabbedPanel}{wxtabbedpanel}}{Tabbed panel (to be replaced with wxNotebook)} \twocolitem{\helpref{wxNotebook}{wxnotebook}}{Notebook class} +\twocolitem{\helpref{wxPlotWindow}{wxplotwindow}}{A class to display data.} +\twocolitem{\helpref{wxSashWindow}{wxsashwindow}}{Window with four optional sashes that can be dragged} +\twocolitem{\helpref{wxSashLayoutWindow}{wxsashlayoutwindow}}{Window that can be involved in an IDE-like layout arrangement} \end{twocollist} {\large {\bf Common dialogs}} diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex index a3bd2f3350..5a52bd37e6 100644 --- a/docs/latex/wx/classes.tex +++ b/docs/latex/wx/classes.tex @@ -125,6 +125,7 @@ \input ilayout.tex \input indlgevt.tex \input inputstr.tex +\input plotwindow.tex \input propifva.tex \input propilva.tex \input ipvaddr.tex diff --git a/docs/latex/wx/plotwindow.tex b/docs/latex/wx/plotwindow.tex new file mode 100644 index 0000000000..cc5fb80784 --- /dev/null +++ b/docs/latex/wx/plotwindow.tex @@ -0,0 +1,158 @@ +% +% 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 simultanously 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. + +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 allao 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 all buttons.} +\twocolitem{\windowstyle{wxPLOT\_BUTTON\_ZOOM}}{Display buttons to allow zooming all curves horizontally.} +\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} + + +\membersection{wxPlotWindow::wxPlotWindow}\label{wxplotwindowwxplotwindow} + +\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 untis 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. + diff --git a/include/wx/generic/plot.h b/include/wx/generic/plot.h index 449d68fed1..919bbebc82 100644 --- a/include/wx/generic/plot.h +++ b/include/wx/generic/plot.h @@ -195,6 +195,8 @@ public: void SetCurrent( wxPlotCurve* current ); wxPlotCurve *GetCurrent(); + void Delete( wxPlotCurve* curve ); + // vertical representation // ----------------------- diff --git a/src/generic/plot.cpp b/src/generic/plot.cpp index 0da3f4ec79..9ca23407bd 100644 --- a/src/generic/plot.cpp +++ b/src/generic/plot.cpp @@ -630,6 +630,17 @@ void wxPlotWindow::SetCurrent( wxPlotCurve* current ) GetEventHandler()->ProcessEvent( event ); } +void wxPlotWindow::Delete( wxPlotCurve* curve ) +{ + wxNode *node = m_curves.Find( curve ); + if (!node) return; + + m_curves.DeleteObject( curve ); + + m_area->DeleteCurve( curve ); + m_area->Refresh( FALSE ); +} + wxPlotCurve *wxPlotWindow::GetCurrent() { return m_current; diff --git a/utils/HelpGen/src/docripper.cpp b/utils/HelpGen/src/docripper.cpp index cdaff810e1..9599d61920 100644 --- a/utils/HelpGen/src/docripper.cpp +++ b/utils/HelpGen/src/docripper.cpp @@ -224,7 +224,7 @@ void RipperDocGen::AppendHighlightedSource( string& st, string source ) char buf[1024*32]; // DBG::: - ASSERT( source.length() + 1 < sizeof(buf) ); +// ASSERT( source.length() + 1 < sizeof(buf) ); strcpy( buf, source.c_str() ); diff --git a/utils/HelpGen/src/scriptbinder.cpp b/utils/HelpGen/src/scriptbinder.cpp index cd00c8a3f4..5ef0e7b0bd 100644 --- a/utils/HelpGen/src/scriptbinder.cpp +++ b/utils/HelpGen/src/scriptbinder.cpp @@ -308,7 +308,7 @@ void ScriptTemplate::PrintScript( void* dataObj, ScriptStream& stm ) // variable referred by template script is not // registered to this tempalte object - ASSERT( found ); + // ASSERT( found ); } while(1); } @@ -398,7 +398,7 @@ ScriptSection* ScriptSection::GetSubsection( const char* name ) ++cur; } - ASSERT( cur < sizeof(buf) ); + // ASSERT( cur < sizeof(buf) ); buf[cur] = '\0'; @@ -432,7 +432,7 @@ void ScriptSection::AddSection( ScriptSection* pSection, pSection->AddRef(); // can add section to multiple containers - ASSERT( pSection->mpParent == 0 ); + // ASSERT( pSection->mpParent == 0 ); pSection->mpParent = this; @@ -602,7 +602,7 @@ bool DocGeneratorBase::SaveDocument( const char* fname, else { ScriptSection* pTopSect = GetTopSection(); - ASSERT( pTopSect ); + // ASSERT( pTopSect ); pTopSect->Print( stm ); } diff --git a/utils/HelpGen/src/sourcepainter.cpp b/utils/HelpGen/src/sourcepainter.cpp index fbabb66446..7c8b2f92ee 100644 --- a/utils/HelpGen/src/sourcepainter.cpp +++ b/utils/HelpGen/src/sourcepainter.cpp @@ -405,8 +405,10 @@ void check_keyword_map( int keywordMapNr ) KeywordT dummy; +/* if ( (char*)& dummy != &dummy.keyWord[0] ) throw; +*/ int size = sizeof(__gKeyWords) / sizeof( KeywordT ); @@ -637,7 +639,7 @@ void SourcePainter::GetResultString(string& result, MarkupTagsT tags) { // this method works, only if results of processing // are collected - ASSERT( mCollectResultsOn ); + // ASSERT( mCollectResultsOn ); result = ""; int pos = 0; -- 2.45.2