1 /****************************************************************************** 2 * 3 * Project: OpenCPN 4 * Purpose: GRIB Plugin Friends 5 * Author: David Register 6 * 7 *************************************************************************** 8 * Copyright (C) 2010 by David S. Register * 9 * * 10 * This program is free software; you can redistribute it and/or modify * 11 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 * This program is distributed in the hope that it will be useful, * 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 19 * GNU General Public License for more details. * 20 * * 21 * You should have received a copy of the GNU General Public License * 22 * along with this program; if not, write to the * 23 * Free Software Foundation, Inc., * 24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 25 *************************************************************************** 26 */ 27 28 #ifndef __GRIBUICData_H__ 29 #define __GRIBUICData_H__ 30 31 #include "wx/wxprec.h" 32 33 #ifndef WX_PRECOMP 34 #include "wx/wx.h" 35 #endif //precompiled headers 36 37 #include "GribUIDialogBase.h" 38 #include "GribSettingsDialog.h" 39 #include "GrabberWin.h" 40 41 class GRIBUICtrlBar; 42 class GribGrabberWin; 43 class GribSpacerWin; 44 //---------------------------------------------------------------------------------------------------------- 45 // GRIB CtrlBar Specification 46 //---------------------------------------------------------------------------------------------------------- 47 class CursorData: public CursorDataBase 48 { 49 public: 50 51 CursorData( wxWindow *window, GRIBUICtrlBar &parent ); ~CursorData()52 ~CursorData() {} 53 OnCursorTrackTimer(wxTimerEvent & event)54 void OnCursorTrackTimer( wxTimerEvent & event) {UpdateTrackingControls();} 55 void PopulateTrackingControls( bool vertical ); 56 void UpdateTrackingControls(); 57 void ResolveDisplayConflicts( int Id ); 58 void OnMouseEvent( wxMouseEvent &event ); 59 60 wxTimer m_tCursorTrackTimer; 61 private: 62 void AddTrackingControl( wxControl *ctrl1, wxControl *ctrl2, wxControl *ctrl3, wxControl *ctrl4, bool show, 63 bool vertical, int wictrl2, int wictrl3 = 0 ); 64 void MenuAppend( wxMenu *menu, int id, wxString label, int setting); 65 void OnCBAny( wxCommandEvent& event ); 66 void OnMenuCallBack( wxMouseEvent& event ); 67 68 GRIBUICtrlBar &m_gparent; 69 bool m_bLeftDown; 70 }; 71 72 #endif 73