1 /***************************************************************************
2  *
3  * Project:  OpenCPN
4  *
5  ***************************************************************************
6  *   Copyright (C) 2013 by David S. Register                               *
7  *                                                                         *
8  *   This program is free software; you can redistribute it and/or modify  *
9  *   it under the terms of the GNU General Public License as published by  *
10  *   the Free Software Foundation; either version 2 of the License, or     *
11  *   (at your option) any later version.                                   *
12  *                                                                         *
13  *   This program is distributed in the hope that it will be useful,       *
14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
16  *   GNU General Public License for more details.                          *
17  *                                                                         *
18  *   You should have received a copy of the GNU General Public License     *
19  *   along with this program; if not, write to the                         *
20  *   Free Software Foundation, Inc.,                                       *
21  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,  USA.         *
22  **************************************************************************/
23 
24 #ifndef __CHINFOWIN_H__
25 #define __CHINFOWIN_H__
26 
27 #include <wx/window.h>
28 #include <wx/stattext.h>
29 
30 #include "chart1.h"
31 
32 class ChInfoWin: public wxPanel
33 {
34 public:
35     ChInfoWin( wxWindow *parent );
36     ~ChInfoWin();
37 
SetString(const wxString & s)38     void SetString(const wxString &s){ m_string = s; }
GetString(void)39     const wxString& GetString(void) { return m_string; }
40     void MouseEvent( wxMouseEvent& event );
41 
SetPosition(wxPoint pt)42     void SetPosition( wxPoint pt )
43     {
44         m_position = pt;
45     }
SetWinSize(wxSize sz)46     void SetWinSize( wxSize sz )
47     {
48         m_size = sz;
49     }
50     void SetBitmap( void );
51     void FitToChars( int char_width, int char_height );
GetWinSize(void)52     wxSize GetWinSize( void )
53     {
54         return m_size;
55     }
56     void OnPaint( wxPaintEvent& event );
57     void OnEraseBackground( wxEraseEvent& event );
58 
59     wxStaticText *m_pInfoTextCtl;
60     int dbIndex;
61 private:
62 
63     wxString m_string;
64     wxSize m_size;
65     wxPoint m_position;
66 
67     DECLARE_EVENT_TABLE()
68 };
69 
70 
71 #endif
72