/**********************************************************************
 *
 *   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_GTKMM

#ifndef UI_GTKMM_WRAP_HEADER
#define UI_GTKMM_WRAP_HEADER

#include "ui.h"

#include <gtkmm/widget.h>

namespace UI_GTKMM_NS {
  /**
   **
   ** @brief	a wrapper for calling UI-methods by signals
   **
   ** @author	Diether Knof
   **
   **/
  class UI_GTKMM_Wrap : public Gtk::Widget {
    public:
      UI_GTKMM_Wrap(UI_GTKMM* const ui) :
	Gtk::Widget(),
	ui(ui)
      { }

	void add_label_for_translation(Gtk::Label* const label,
					Translator::Translation const
					translation)
	{
	  this->ui->add_for_translation(*label, translation);
	  return ;
	}
	void add_button_for_translation(Gtk::Button* const button,
					Translator::Translation const
					translation)
	{
	  this->ui->add_for_translation(*button, translation);
	  return ;
	}
	void add_window_for_translation(Gtk::Window* const window,
					Translator::Translation const
					title)
	{
	  this->ui->add_for_translation(*window, title);
	  return ;
	}
	void add_text_view_for_translation(Gtk::TextView* const text_view,
					   Translator::Translation const
					   translation)
	{
	  this->ui->add_for_translation(*text_view, translation);
	  return ;
	}

	void change_translation(Gtk::Widget* const widget,
				Translator::Translation const
				translation)
	{
	  this->ui->change_translation(*widget, translation);
	  return ;
	}

	void remove_from_translation(Gtk::Widget const* const widget)
	{
	  this->ui->remove_from_translation(*widget);
	  return ;
	}

	UI_GTKMM* ui;

    private: // unused
	UI_GTKMM_Wrap();
	UI_GTKMM_Wrap(UI_GTKMM_Wrap const&);
	UI_GTKMM_Wrap& operator=(UI_GTKMM_Wrap const&);
  }; // class UI_GTKMM_Wrap : public Gtk::Widget


} // naemspace UI_GTKMM_NS

#endif // #ifndef UI_GTKMM_WRAP_HEADER

#endif // #ifdef USE_UI_GTKMM
