Gui.h

Go to the documentation of this file.
00001 /*
00002 RealTimeBattle, a robot programming game for Unix
00003 Copyright (C) 1998-2000  Erik Ouchterlony and Ragnar Ouchterlony
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2 of the License, or
00008 (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software Foundation,
00017 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018 */
00019 
00020 #ifndef __GUI__
00021 #define __GUI__
00022 
00023 #ifndef NO_GRAPHICS
00024 
00025 #include <gtk/gtk.h>
00026 
00027 class ArenaWindow;
00028 class MessageWindow;
00029 class ScoreWindow;
00030 class StatisticsWindow;
00031 class StartTournamentWindow;
00032 class Robot;
00033 class String;
00034 
00035 class Gui
00036 {
00037 public:
00038   Gui();
00039   ~Gui() {}
00040 
00041   void set_colours();
00042 
00043   GdkColor* get_bg_gdk_colour_p                () { return &bg_gdk_colour; }
00044   GdkColor* get_fg_gdk_colour_p                () { return &fg_gdk_colour; }
00045   GdkColor* get_rtb_message_gdk_colour_p       () { return &rtb_message_gdk_colour; }
00046 
00047   long int get_bg_rgb_colour                   () { return bg_rgb_colour; }
00048   long int get_fg_rgb_colour                   () { return fg_rgb_colour; }
00049   long int get_rtb_message_rgb_colour          () { return rtb_message_rgb_colour; }
00050 
00051   bool is_arenawindow_up                       ()
00052     { return ( arenawindow_p != NULL ); }
00053   ArenaWindow* get_arenawindow_p               ()
00054     { return arenawindow_p; }
00055   void open_arenawindow                        ();
00056   void close_arenawindow                       ();
00057 
00058   bool is_messagewindow_up                     ()
00059     { return ( messagewindow_p != NULL ); }
00060   MessageWindow* get_messagewindow_p           ()
00061     { return messagewindow_p; }
00062   void open_messagewindow                      ();
00063   void close_messagewindow                     ();
00064 
00065   bool is_scorewindow_up                       ()
00066     { return ( scorewindow_p != NULL ); }
00067   ScoreWindow* get_scorewindow_p               ()
00068     { return scorewindow_p; }
00069   void open_scorewindow                        ();
00070   void close_scorewindow                       ();
00071 
00072   bool is_statisticswindow_up                  ()
00073     { return ( statisticswindow_p != NULL ); }
00074   StatisticsWindow* get_statisticswindow_p     ()
00075     { return statisticswindow_p; }
00076   void open_statisticswindow                   ();
00077   void close_statisticswindow                  ();
00078 
00079   bool is_starttournamentwindow_up             ()
00080     { return ( starttournamentwindow_p != NULL ); }
00081   StartTournamentWindow* get_starttournament_p ()
00082     { return starttournamentwindow_p; }
00083   static void kill_and_start_new_tournament    ( int result );
00084   void open_starttournamentwindow              ();
00085   void close_starttournamentwindow             ();
00086 
00087 private:
00088 
00089   long int bg_rgb_colour;
00090   long int fg_rgb_colour;
00091   long int rtb_message_rgb_colour;
00092 
00093   GdkColor bg_gdk_colour;
00094   GdkColor fg_gdk_colour;
00095   GdkColor rtb_message_gdk_colour;
00096 
00097   ArenaWindow* arenawindow_p;
00098   MessageWindow* messagewindow_p;
00099   ScoreWindow* scorewindow_p;
00100   StatisticsWindow* statisticswindow_p;
00101   StartTournamentWindow* starttournamentwindow_p;
00102 };
00103 
00104 #endif 
00105 
00106 #endif 

Generated on Fri Oct 15 15:47:36 2004 for Real Time Battle by  doxygen 1.3.9.1