OpenCPN Partial API docs
Loading...
Searching...
No Matches
NMEALogWindow.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
25#ifndef __NMEALOGWINDOW_H__
26#define __NMEALOGWINDOW_H__
27
28#include "WindowDestroyListener.h"
29
30class wxWindow;
31class wxString;
32class wxSize;
33class wxPoint;
34class TTYWindow;
35
48public:
49 static NMEALogWindow &Get();
50 bool Active() const;
51 void Create(wxWindow *parent, int num_lines = 35);
52 void Add(const wxString &s);
53 void Refresh(bool do_refresh = false);
54 int GetSizeW();
55 int GetSizeH();
56 int GetPosX();
57 int GetPosY();
58 void SetSize(int w, int h);
59 void SetSize(const wxSize &size);
60 void SetPos(int x, int y);
61 void SetPos(const wxPoint &pos);
62 void CheckPos(int display_width, int display_height);
63 void Move();
64 virtual void DestroyWindow();
65 static void Shutdown();
66 wxWindow *GetTTYWindow(void) { return (wxWindow *)window; }
67
68private: // prevent class from being copied, needed by singleton
71 virtual ~NMEALogWindow(){};
72 NMEALogWindow &operator=(const NMEALogWindow &) { return *this; }
73 void UpdateGeometry();
74
75private:
76 static NMEALogWindow *instance;
77 TTYWindow *window;
78 int width;
79 int height;
80 int pos_x;
81 int pos_y;
82};
83
84#endif
This class provides access to the NMEA log/debug window.
Definition: NMEALogWindow.h:47