/**********************************************************************
 *
 *   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_NAME_HEADER
#define GTK_NAME_HEADER

#include "htin.h"

class Player;

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

  // The name of a player
  class Name : public HTINBase {
    public:
      // constructor
      Name(class Names* names, Player const& player);

      /// the names group
      class Names& names();

      // starting points for the names
      int start_x();
      int start_y();
      // the player has a new name
      void set();

      // draw the name of the player in the pixmap
      void draw(bool const update = true);

    private: // not to be used
      Name();
      Name(Name const& name);
      Name& operator=(Name const&);
  }; // class Name : public HTINBase

  // The name of a player
  class Names : public HTINBaseGroup {
    public:
      // constructor -- set the table
      Names(class Table* table);

      // the name of the player
      Name& name(Player const& player);

      GdkFont* font(); // the font
      GdkGC* gc(); // the gc
      GdkGC* gc_active(); // the gc for the active player

      // set the names of all players
      void set();

      // loads the requested font
      void font_load();
      // sets the color of the font
      void font_color_set();
      // sets the color of the font
      void active_font_color_set();

    private:
      // the font for the names
      GdkFont* font_p;
      // the GC for the names
      GdkGC* gc_p;
      // the GC for the names of the active players
      GdkGC* gc_active_p;

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

} // namespace GTK_DOKO

#endif // #ifndef GTK_NAME_HEADER
#endif // #ifdef USE_UI_GTK
