OpenCPN Partial API docs
Loading...
Searching...
No Matches
ch_info_win.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2013 by David S. Register *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
16 **************************************************************************/
17
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 ch_info_win.h:36