329 double llz_x, ulz_x, llz_y, ulz_y, llz_y2,ulz_y2;
332 wxString results1, results2, results3,results4, results5, results6;
336 wxPen standardPen, standardPen2, standardPen3, scalePen, scalePen2, peakPen, peakLimitPen,
337 basePen, baseLimitPen, decayLimitPen, ZoomRectPen, fitPen, fitSelectedPen,
338 selectPen, averagePen, rtPen, hdPen, rdPen, slopePen, latencyPen,
339 alignPen, measPen, eventPen, PSlopePen;
342 wxPen standardPrintPen, standardPrintPen2, standardPrintPen3, scalePrintPen, scalePrintPen2,measPrintPen,
343 peakPrintPen, peakLimitPrintPen, basePrintPen, baseLimitPrintPen,
344 decayLimitPrintPen, fitPrintPen, fitSelectedPrintPen, selectPrintPen,
345 averagePrintPen, rtPrintPen, hdPrintPen, rdPrintPen,
346 slopePrintPen, resultsPrintPen, latencyPrintPen, PSlopePrintPen;
348 wxBrush baseBrush, zeroBrush;
354#if (__cplusplus < 201103)
355 boost::shared_ptr<wxMenu> m_zoomContext;
356 boost::shared_ptr<wxMenu> m_eventContext;
357 boost::shared_ptr<wxMenu> m_annotationContext;
359 std::shared_ptr<wxMenu> m_zoomContext;
360 std::shared_ptr<wxMenu> m_eventContext;
361 std::shared_ptr<wxMenu> m_annotationContext;
365 void PlotSelected(wxDC& DC);
366 void PlotAverage(wxDC& DC);
367 void DrawZoomRect(wxDC& DC);
368 void PlotGimmicks(wxDC& DC);
369 void PlotEvents(wxDC& DC);
370 void PlotAnnotations(wxDC& DC);
371 void DrawCrosshair( wxDC& DC,
const wxPen& pen,
const wxPen& printPen,
int crosshairSize,
double xch,
double ych);
374 void PrintScale(wxRect& WindowRect);
377 void DrawCircle(wxDC* pDC,
double x,
double y,
const wxPen& pen,
const wxPen& printPen);
378 void DrawVLine(wxDC* pDC,
double x,
const wxPen& pen,
const wxPen& printPen);
379 void DrawHLine(wxDC* pDC,
double y,
const wxPen& pen,
const wxPen& printPen);
380 void eventArrow(wxDC* pDC,
int eventIndex);
381 void DrawFit(wxDC* pDC);
383 void DrawIntegral(wxDC* pDC);
384 void CreateScale(wxDC* pDC);
388 long xFormat(
double);
391 long xFormat(std::size_t);
393 long yFormat(
double);
396 long yFormatD(
double f) {
return yFormat(f); }
398 long yFormat2(
double);
401 long yFormatD2(
double f) {
return yFormat2(f); }
403 long yFormatB(
double);
406 long yFormatDB(
double f) {
return yFormatB(f); }
408 void FittorectY(YZoom& yzoom,
const wxRect& rect,
double min,
double max,
double screen_part);
409 void FitToWindowSecCh(
bool refresh);
411 void LButtonDown(wxMouseEvent& event);
412 void RButtonDown(wxMouseEvent& event);
413 void LButtonUp(wxMouseEvent& event);
422 wxStfDoc* DocC()
const {
428 void ChangeXScale(
double factor);
429 void ChangeYScale(
double factor);
430 wxStfParentFrame* ParentFrame();
431 void OnZoomHV(wxCommandEvent& event);
432 void OnZoomH(wxCommandEvent& event);
433 void OnZoomV(wxCommandEvent& event);
434#if defined __WXMAC__ && !(wxCHECK_VERSION(2, 9, 0))
435 void OnPaint(wxPaintEvent &event);
437 long SPX()
const {
return DocC()->GetXZoom().startPosX; }
438 long& SPXW() {
return DocC()->GetXZoomW().startPosX; }
439 long SPY()
const {
return DocC()->GetYZoom(DocC()->GetCurChIndex()).startPosY; }
440 long& SPYW() {
return DocC()->GetYZoomW(DocC()->GetCurChIndex()).startPosY; }
441 long SPY2()
const {
return DocC()->GetYZoom(DocC()->GetSecChIndex()).startPosY; }
442 long& SPY2W() {
return DocC()->GetYZoomW(DocC()->GetSecChIndex()).startPosY; }
444 double XZ()
const {
return DocC()->GetXZoom().xZoom; }
445 double& XZW() {
return DocC()->GetXZoomW().xZoom; }
446 double YZ()
const {
return DocC()->GetYZoom(DocC()->GetCurChIndex()).yZoom; }
447 double& YZW() {
return DocC()->GetYZoomW(DocC()->GetCurChIndex()).yZoom; }
448 double YZ2()
const {
return DocC()->GetYZoom(DocC()->GetSecChIndex()).yZoom; }
449 double& YZ2W() {
return DocC()->GetYZoomW(DocC()->GetSecChIndex()).yZoom; }
451 DECLARE_EVENT_TABLE()
WORD TSTime TpMarker WORD size
Handles y-scaling of traces.
See http://www.wxwidgets.org/manuals/stable/wx_wxpoint.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxsize.html (wxWidgets documentation)
Provides the child frame for displaying documents on separate windows.
The document class, derived from both wxDocument and Recording.
Provides the top-level frame.
The view class, derived from wxView.
See http://www.wxwidgets.org/manuals/stable/wx_wxstring.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxview.html (wxWidgets documentation)
std::vector< double > Vector_double
void set_noGimmicks(bool value)
Set to true if the results table and the cursors should be printed.
void OnXshrinkhi()
Shrinks the x-scale by a factor of 2.
void OnYenlhi()
Enlarges the y-scale by a factor of 2.
wxStfDoc * DocC() const
Retrieve the attached document.
int get_eventPos() const
Returns the y-position of a right click when in event-detection mode.
void OnYenllo()
Enlarges the y-scale by a factor of 1.1.
void OnFirst()
Show and analyse first trace.
void OnRight()
Moves the traces right by 20 px.
wxStfDoc * Doc()
Retrieve the attached document.
double get_plot_xmax() const
Returns x value of the right screen border.
void Ch2pos()
Adjust y-positioning so that channel 1 and 2 are at the same absolute y-position.
double get_plot_ymin() const
Returns y value of the bottom screen border.
void OnMouseEvent(wxMouseEvent &event)
Handles mouse events.
void Ch2zoom()
Adjust y-scale so that channel 1 and 2 have the same y-scale.
void ChanScroll(int direction)
advance / decrement the active channel by one
void set_printScale(double value)
Sets the printing scale to the specified value.
void set_printRect(wxRect value)
Sets the size of the printout to the epcified rectangle.
void set_isPrinted(bool value)
Set to true if the graph is drawn on a printer.
void OnPrevious()
Show and analyse previous trace.
void Ch2base()
Adjust y-positioning so that the baselines of channel 1 and 2 are at the same y-position.
void OnXenllo()
Enlarges the x-scale by a factor of 1.1.
void OnYshrinkhi()
Shrinks the y-scale by a factor of 2.
void OnXenlhi()
Enlarges the x-scale by a factor of 2.
wxStfGraph(wxView *v, wxStfChildFrame *frame, const wxPoint &pos, const wxSize &size, long style)
Constructor.
void OnLast()
Show and analyse last trace.
void OnXshrinklo()
Shrinks the x-scale by a factor of 1.1.
void OnUp()
Moves the traces up by 20 px.
void ClearEvents()
Destroys all event check boxes.
void ChangeTrace(std::size_t trace)
Change trace.
virtual void OnDraw(wxDC &dc)
The central drawing function. Used for drawing to any output device, such as a printer or a screen.
void set_downsampling(int value)
Prints every n-th point.
double get_plot_y2max() const
Returns y value of the top screen border for the reference channel.
void OnDown()
Moves the traces down by 20 px.
double get_plot_ymax() const
Returns y value of the top screen border.
void Ch2basezoom()
Combines Ch2zoom() and Ch2base().
void Fittowindow(bool refresh)
Fits the graph to the window.
void OnKeyDown(wxKeyEvent &event)
Handles keyboard input.
double get_plot_xmin() const
Returns x value of the left screen border.
void OnYshrinklo()
Shrinks the y-scale by a factor of 1.1.
double get_plot_y2min() const
Returns y value of the bottom screen border for the reference channel.
wxStfView * view
Returns the current zoom struct.
void OnNext()
Show and analyse next trace.
void OnLeft()
Moves the traces left by 20 px.
void Snapshotwmf()
Copies the drawing to the clipboard as a windows metafile.
bool get_noGimmicks() const
Indicates whether everything (cursors, results table, etc.) is printed out.
#define StfDll
Defines dll export or import functions for Windows.
Declares the Zoom struct.