1 /* Hexxagon board game.
2  * Copyright (C) 2001 Erik Jonsson.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (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, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  *
18  * Email hexxagon@nesqi.se
19  *
20  */
21 
22 
23 #include <gtkmm/menu.h>
24 #include <gtkmm/menubar.h>
25 
26 #include "gamemodel.h"
27 #include "gtkhexxagonboardplay.h"
28 
29 class GtkMainMenu : public Gtk::MenuBar
30 {
31     public:
32         GtkMainMenu(GameModel *g);
33 
setGame(GameModel * g)34         void setGame(GameModel *g) { game = g; };
35 
36         void on_menu_noplayers(int n);
37         void on_menu_difficulty(int n);
38 
39     protected:
40         GameModel *game;
41 
42         void on_layout_select_no_action(const libhexx::Layout &l);
43         void on_layout_select(const libhexx::Layout &l);
44         void on_menu_edit_board();
45         void on_menu_about();
46         void on_menu_quit();
47         void on_menu_new_game();
48         void on_menu_open_game();
49         void on_menu_save_game();
50         void on_menu_save_as_game();
51 
52         Gtk::Menu mFile;
53         Gtk::Menu mLocalGame;
54         Gtk::Menu mNetworkGame;
55         Gtk::Menu mHelp;
56 
57         Gtk::Menu mDifficulty;
58 
59         Gtk::RadioMenuItem::Group modeGroup;
60         Gtk::RadioMenuItem::Group levelGroup;
61 
62         Glib::ustring lastSaveFilename;
63 
64     private:
65         GtkMainMenu();
66 };
67 
68