/**********************************************************************
 *
 *   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_TRICKPILE_HEADER
#define GTK_TRICKPILE_HEADER

#include "pixmap.h"
#include "htin.h"

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

  /// the trickpile of a player
  class TrickPile : public HTINBase {
    public:
      /// constructor
      TrickPile(class TrickPiles* trickpiles,
		Player const& player);
      /// destructor
      ~TrickPile();

      //// the trickpiles group
      class TrickPiles& trickpiles();

      /// starting x-position of the tricks
      int start_x();
      /// starting y-position of the tricks
      int start_y();
      /// x-step of the tricks in the trickpile
      int tricks_step_x();
      /// y-step of the tricks in the trickpile
      int tricks_step_y();
      /// x-step of the cards in a trick
      int cards_step_x();
      /// y-step of the cards in a trick
      int cards_step_y();

      /// left border of the trickpile
      int border_left();
      /// upper border of the trickpile
      int border_up();
      /// width of the trickpile
      unsigned width();
      /// height of the trickpile
      unsigned height();

      /// draws the tricks and the points of the player
      void draw(bool const update = true);
      /// draws the tricks
      void draw_tricks();
      /// draws the points
      void draw_points();

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


  /// all trickpiles of the players
  class TrickPiles : public HTINBaseGroup {
    public:
      /// constructor
      TrickPiles(class Table* table);
      /// destructor
      ~TrickPiles();

      /// the trickpile of the given player
      TrickPile& trickpile(Player const& player);

      /// the font for the trickpile points
      GdkFont* font();
      // the gc for the trickpile points
      GdkGC* gc();

      /// loads the requested font (from ::settting)
      void font_load();
      /// sets the color of the font (from ::settting)
      void font_color_set();

    private:
      /// the font for the points
      GdkFont* font_p;
      /// the GC for the points
      GdkGC* gc_p;

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

} // namespace GTK_DOKO

#endif // #ifndef GTK_TRICKPILE_HEADER
#endif // #ifdef USE_UI_GTK
