1 /**********************************************************************
2  *
3  *   FreeDoko a Doppelkopf-Game
4  *
5  *   Copyright (C) 2001 – 2018 by Diether Knof and Borg Enders
6  *
7  *   This program is free software; you can redistribute it and/or
8  *   modify it under the terms of the GNU General Public License as
9  *   published by the Free Software Foundation; either version 2 of
10  *   the License, or (at your option) any later version.
11  *
12  *   This program is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *   You can find this license in the file 'gpl.txt'.
17  *
18  *   You should have received a copy of the GNU General Public License
19  *   along with this program; if not, write to the Free Software
20  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21  *   MA  02111-1307  USA
22  *
23  *  Contact:
24  *    Diether Knof dknof@posteo.de
25  *
26  **********************************************************************/
27 
28 #ifdef USE_UI_GTKMM
29 
30 #pragma once
31 
32 #include "base.h"
33 #include <gtkmm/messagedialog.h>
34 
35 namespace UI_GTKMM_NS {
36 
37 /**
38  ** the about dialog
39  **/
40 class Help : public Base, public Gtk::MessageDialog {
41   public:
42     explicit Help(Base* const parent);
43     ~Help() override;
44 
45     // show the homepage
46     void show_homepage();
47     // show the homepage for loading cardsets
48     void show_cardsets_download();
49     // show the manual
50     void show_manual();
51 
52     // show the help at the location
53     void show_help(string const& location);
54     // show the internet page at the location
55     void show_internet_page(string const& location);
56 
57   private:
58     // initialize the window
59     void init();
60     // sets the location
61     void set_location(string const& location);
62 
63     // show the help at the online location
64     void show_online_help();
65 
66   private:
67     // the location
68     string location_ = "";
69     // whether 'online' is accepted
70     bool online_accepted_ = false;
71 
72   private: // unused
73     Help() = delete;
74     Help(Help const&) = delete;
75     Help& operator=(Help const&) = delete;
76 }; // class Help : public Base, public Gtk::StickyDialog
77 
78 } // namespace UI_GTKMM_NS
79 
80 #endif // #ifdef USE_UI_GTKMM
81