OpenCPN Partial API docs
Loading...
Searching...
No Matches
ChInfoWin.h
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#include <wx/panel.h>
30
36class ChInfoWin : public wxPanel {
37public:
38 ChInfoWin(wxWindow* parent);
39 ~ChInfoWin();
40
41 void SetString(const wxString& s) { m_string = s; }
42 const wxString& GetString(void) { return m_string; }
43 void MouseEvent(wxMouseEvent& event);
44
45 void SetPosition(wxPoint pt) { m_position = pt; }
46 void SetWinSize(wxSize sz) { m_size = sz; }
47 void SetBitmap(void);
48 void FitToChars(int char_width, int char_height);
49 wxSize GetWinSize(void) { return m_size; }
50 void OnPaint(wxPaintEvent& event);
51 void OnEraseBackground(wxEraseEvent& event);
52
53 wxStaticText* m_pInfoTextCtl;
54 int dbIndex;
55 int chart_scale;
56
57private:
58 wxString m_string;
59 wxSize m_size;
60 wxPoint m_position;
61
62 DECLARE_EVENT_TABLE()
63};
64
65#endif
A custom panel for displaying chart information.
Definition ChInfoWin.h:36