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.h>
24 #include <libhexx/libhexx.h>
25 #include "gamemodel.h"
26 #include "gtkscaleimage.h"
27 
28 class GtkScore : public Gtk::Frame, public libhexx::View
29 {
30     public:
31         GtkScore(GameModel *g);
32 
33         virtual void updateView();
setGame(GameModel * g)34         void setGame(GameModel *g) { game = g; };
35 
36     private:
37         GtkScore();
38 
39         Gtk::VBox vbox;
40             Gtk::Frame turnFrame;
41                 Gtk::VBox vboxturn;
42                     GtkScaleImage pl1timg;
43                     GtkScaleImage pl2timg;
44                     Gtk::Label turnlabel;
45 
46             Gtk::Frame computerFrame;
47                 Gtk::VBox vboxcomputer;
48                     Gtk::ProgressBar thinkprogress;
49 
50             Gtk::Frame pl1Frame;
51                 Gtk::VBox vboxf1;
52                     GtkScaleImage pl1img;
53                     Gtk::ProgressBar pl1Bar;
54 
55             Gtk::Frame pl2Frame;
56                 Gtk::VBox vboxf2;
57                     GtkScaleImage pl2img;
58                     Gtk::ProgressBar pl2Bar;
59 
60 
61         bool turn1active;
62         bool turn2active;
63 
64     protected:
65         GameModel *game;
66 };
67