/**********************************************************************
 *
 *   freedoko a Doppelkopf-Game
 *    
 *   Copyright (C) 2001-2004  by Diether Knof and Borg Enders
 *
 *   This program is free software; you can redistribute it and/or 
 *   modify it under the terms of the GNU General Public License as 
 *   published by the Free Software Foundation; either version 2 of 
 *   the License, or (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details. 
 *   You can find this license in the file 'gpl.txt'.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
 *   MA  02111-1307  USA
 *
 *  Contact:
 *    Diether Knof dknof@gmx.de
 *    Borg Enders  borg@borgsoft.de
 *
 **********************************************************************/

#ifdef USE_UI_GTK
#ifndef GTK_MAIN_WINDOW_HEADER
#define GTK_MAIN_WINDOW_HEADER

// the elements of the main window
#include "menu.h"

namespace GTK_DOKO {
#include <gtk/gtkwidget.h>

  // the main window
  class MainWindow {
    public:
      // constructor
      MainWindow(class GTK_GUI* gui_a);

      // inits the main window
      void init();

      // the variables
      class GTK_GUI& gui(); // the gui
      GtkWidget* window(); // the window
      GtkWidget* container(); // the container with the window elements

      // the menu
      Menu& menu();

      void party_open(); // the party is opened
      void party_start(); // the party is opened
      void game_open(); // the game is opened
      void game_start(); // the game is started
      void game_finish(); // the game is finished
      void game_close(); // the game is closed
      void party_finish(); // the party is finished
      void party_close(); // the party is closed

      // updates the language
      void language_update();

    protected:
      // event for deleting the window
      static gboolean delete_event(GtkWidget*, GdkEvent*, gpointer main_window);

      // key event
      static gboolean key_event(GtkWidget* widget, GdkEventKey* key,
				gpointer main_window);
      void key(GdkEventKey* key);

    private:
      class GTK_GUI* const gui_p; // the gui

      // The window
      GtkWidget* window_p;
      // container for the widgets in the window
      GtkWidget* container_p;

      // the menu
      Menu menu_p;

    private: // not to be used
      MainWindow();
      MainWindow(MainWindow const&);
      MainWindow& operator=(MainWindow const&);
  }; // class MainWindow

} // namespace GTK_DOKO

#endif // #ifndef GTK_MAIN_WINDOW_HEADER
#endif // #ifdef USE_UI_GTK
