OpenCPN Partial API docs
Loading...
Searching...
No Matches
ais_info_gui.h
1/******************************************************************************
2 * Project: OpenCPN
3 * Purpose: AIS info GUI parts
4 *
5 ***************************************************************************
6 * Copyright (C) 2012 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#ifndef _AIS_INFO_GUI_H
24#define _AIS_INFO_GUI_H
25
27#include "observable.h"
28#include "OCPN_Sound.h"
29
30class AisInfoGui; // forward
31extern AisInfoGui* g_pAISGUI;
37class AisInfoGui : public wxEvtHandler {
38public:
39 AisInfoGui();
40
41 void ShowAisInfo(std::shared_ptr<const AisTargetData> palert_target);
42 bool AIS_AlertPlaying(void) { return m_bAIS_AlertPlaying; };
43
44 void OnSoundFinishedAISAudio(wxCommandEvent& event);
45
46 bool m_bAIS_Audio_Alert_On;
47 bool m_bAIS_AlertPlaying;
48 OcpnSound* m_AIS_Sound;
49 ObservableListener ais_info_listener;
50 ObservableListener ais_touch_listener;
51 ObservableListener ais_wp_listener;
52 ObservableListener ais_new_track_listener;
53 ObservableListener ais_del_track_listener;
54};
55#endif // ais_info_gui
AIS target definitions.
Handles the AIS information GUI and sound alerts.
Keeps listening over its lifespan, removes itself on destruction.
Definition observable.h:155
General observable implementation with several specializations.