From 7e01cfee39ae45fd65e1122dad49d0d6adcfc494 Mon Sep 17 00:00:00 2001 From: wittend99 Date: Sun, 13 May 2012 19:10:56 +0000 Subject: [PATCH] Class declarations for the spectrum and waterfall classes. git-svn-id: https://svn.code.sf.net/p/freetel/code@443 01035d8c-6547-0410-b346-abe4f91aad63 --- fdmdv2/fdmdv2_plot.h | 51 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 fdmdv2/fdmdv2_plot.h diff --git a/fdmdv2/fdmdv2_plot.h b/fdmdv2/fdmdv2_plot.h new file mode 100644 index 00000000..2ba0a7b3 --- /dev/null +++ b/fdmdv2/fdmdv2_plot.h @@ -0,0 +1,51 @@ +//========================================================================== +// Name: fdmdv2_plot.h +// Purpose: Declares simple wxWidgets application with GUI +// Created: Apr. 10, 2012 +// Initial author: David Witten +// License: BSD License (other licenses may apply to other +// components of this project) +//========================================================================== +#ifndef __FDMDV2_PLOT__ +#define __FDMDV2_PLOT__ + +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= +// Class DrawPanel +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= +class DrawPanel : public wxPanel +{ + public: + DrawPanel(wxFrame* parent); + void paintEvent(wxPaintEvent & evt); + void paintNow(); + void render(wxDC& dc); + wxPen m_penShortDash; + wxPen m_penDotDash; + wxRect m_rectCtrl; + wxRect m_rectGrid; + wxRect m_rectPlot; + int m_gridLeftOffset; + int m_gridRightOffset; + int m_gridTopOffset; + int m_gridBottomOffset; + + // some useful events + void OnMouseMove(wxMouseEvent& event); + void OnMouseDown(wxMouseEvent& event); + void OnMouseUp(wxMouseEvent& event); + void OnMouseWheelMoved(wxMouseEvent& event); + void OnPaint(wxPaintEvent& event); + void OnClose( wxCloseEvent& event ){ event.Skip(); } + void OnSize( wxSizeEvent& event ); + void OnErase(wxEraseEvent& event); + //void OnUpdateUI( wxUpdateUIEvent& event ){ event.Skip(); } + void OnShow(wxShowEvent& event); + + protected: + bool m_bitmap; + bool m_clip; + bool m_rubberBand; + bool m_mouseDown; + DECLARE_EVENT_TABLE() +}; +#endif //__FDMDV2_PLOT__ -- 2.25.1