OpenCPN Partial API docs
Loading...
Searching...
No Matches
welcome.cpp
Go to the documentation of this file.
1
/**************************************************************************
2
* Copyright (C) 2010 by David S. Register *
3
* Copyright (C) 2026 Alec Leamas *
4
*
5
* *
6
* This program is free software; you can redistribute it and/or modify *
7
* it under the terms of the GNU General Public License as published by *
8
* the Free Software Foundation; either version 2 of the License, or *
9
* (at your option) any later version. *
10
* *
11
* This program is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
15
* *
16
* You should have received a copy of the GNU General Public License *
17
* along with this program; if not, see <https://www.gnu.org/licenses/>. *
18
**************************************************************************/
19
26
#include "
welcome.h
"
27
28
#include "config.h"
29
30
#include <wx/msgdlg.h>
31
#include <wx/string.h>
32
33
#ifdef __ANDROID__
34
#include "androidUTIL.h"
35
#endif
36
37
static
const
char
*
const
kMessage = _(R
"(
38
OpenCPN is distributed in the hope that it will be useful,
39
but WITHOUT ANY WARRANTY; without even the implied
40
warranty of MERCHANTABILITY or FITNESS FOR A
41
PARTICULAR PURPOSE.
42
43
See the GNU General Public License for more details.
44
45
OpenCPN must only be used in conjunction with approved
46
paper charts and traditional methods of navigation.
47
48
DO NOT rely upon OpenCPN for safety of life or property.
49
50
Please click "Agree" and proceed, or "Cancel" to quit.)");
51
52
class
WelcomeDlg
:
public
wxMessageDialog {
53
public
:
54
WelcomeDlg
(wxWindow *parent)
55
: wxMessageDialog(parent, kMessage, _(
"Welcome to OpenCPN"
),
56
wxOK | wxCANCEL) {
57
SetOKCancelLabels(_(
"Agree"
), _(
"Cancel"
));
58
}
59
};
60
61
#ifdef __ANDROID__
62
bool
ShowNavWarning
(wxWindow *parent) {
63
wxString vs = wxString::Format(
" .. Version %s"
, VERSION_FULL);
64
androidShowDisclaimer(_(
"OpenCPN for Android"
) + vs, kMessage);
65
return
true
;
66
}
67
#else
68
bool
ShowNavWarning
(wxWindow *parent) {
69
WelcomeDlg
dlg(parent);
70
int
agreed = dlg.ShowModal();
71
return
agreed == wxID_OK;
72
}
73
#endif
WelcomeDlg
Definition
welcome.cpp:52
ShowNavWarning
bool ShowNavWarning(wxWindow *parent)
Show the "Welcome to OpenCPN" dialog.
Definition
welcome.cpp:68
welcome.h
Welcome to OpenCPN stuff.
gui
src
welcome.cpp
Generated on Wed Sep 23 2026 00:13:23 for OpenCPN Partial API docs by
1.9.8