/**********************************************************************
 *
 *   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_HELP_HEADER
#define GTK_HELP_HEADER

#include "constants.h"

namespace GTK_DOKO {
#include <gtk/gtk.h>
  // #include <gtkembedmoz/gtkmozembed.h>

  // a help window

  // in the directory of the constructor should exist:
  // * index.html
  // * toc.html
  // * toc.short.html
  // * credits.html
  class Help {
    public:
      // constructor
      Help(class GTK_GUI* gui_p);
      // destructor
      ~Help();

      // initialize the window
      void init();


      // the variables
      class GTK_GUI& gui(); // the gui

      // set the location directory
      string const& location_dir_set(string const& location_dir);

      // the location of the index
      string location_index() const;
      // the location of the toc
      string location_toc() const;
      // the location of the credits
      string location_credits() const;


      // show the window
      void show();
      // hide the window
      void hide();

      // load the url
      void load(string const& location);


      // update the icons
      void icons_update();
      // update the language
      void language_update();

      // events

      // load the index page
      static void index_load_event(GtkWidget*, gpointer help);

    private:
      // load the index page
      void index_load();
      // load the toc page
      void toc_load();
      // load the credits page
      void credits_load();

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

      // the location of the directory
      string location_dir;

    private:
      Help();
      Help(Help const&);
      Help& operator=(Help const&);
  }; // class Help

} // namespace GTK_DOKO

#endif // #ifndef GTK_HELP_HEADER
#endif // #ifdef USE_UI_GTK
