// -*- c++ -*-
//  Generated by gtkmmproc from ./../druid-page.gen_h -- DO NOT MODIFY!
#ifndef _GNOMEMM_DRUID_PAGE_H
#define _GNOMEMM_DRUID_PAGE_H

/* $Id: druid-page.gen_h,v 1.5 2001/04/24 14:39:35 murrayc Exp $ */


/* druid-page.gen_h
 *
 * Copyright (C) 1999 The Gtk-- Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtk--/bin.h>
#include <libgnome/gnome-defs.h>
#include <libgnomeui/gnome-druid-page.h>
#include <gnome--/imlib.h>

namespace Gnome {
class DruidPage;
class DruidPage_Class;
}
namespace Gtk { Gnome::DruidPage *wrap (GnomeDruidPage *o); }
namespace Gnome
{

template <class Obj,class gObj,int index,
        void (*emit_func)(gObj*)>
class DSignalV
  {
    public:
      typedef DSignalV<Obj,gObj,index,emit_func> Self;
      typedef SigC::Callback0<void> Callback;
      typedef SigC::Slot0<void> SlotType;
      typedef SigC::CallDataObj2<typename SlotType::Func,Self> Data;

    protected:
      Obj *obj;

    private:

      typedef void RType;

      static void gtk_callback(GtkObject*,GtkWidget*,void *d)
        {
          Gtk::ProxyNode *node=(Gtk::ProxyNode*)d;
          Callback* data=(Callback*)(node->callback_);
          data->call();
        }

      static void callback(void* d)
        {
          Data* data=(Data*)d;
          data->obj->emit();
        }

    public:
      SlotType slot()
        {
          SigC::SlotData* tmp=manage(new SigC::SlotData());
          Data& data=reinterpret_cast<Data&>(tmp->data_);
          data.callback=&callback;
          data.obj=this;
          SigC::ScopeNode* node=tmp->receiver();
          obj->register_data(node);
          return tmp;
        }

      void emit()
        {
          reinterpret_cast<void (*)(gObj*)>
            (emit_func) (obj->gtkobj());
        }

      void operator()()
        {
           reinterpret_cast<void (*)(gObj*)>
            (emit_func) (obj->gtkobj());
        }

      SigC::Connection connect(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         Gtk::ProxyNode::connect(obj,
                            obj->signal_names[index],
                            (GtkSignalFunc)gtk_callback,
                            d,
                            true);
         return d;
        }
  };

template <class Obj,class gObj,int index,
        gboolean (*emit_func)(gObj*)>
class DSignalB
  {
    public:
      typedef DSignalB<Obj,gObj,index,emit_func> Self;
      typedef SigC::Callback0<bool> Callback;
      typedef SigC::Slot0<bool> SlotType;
      typedef SigC::CallDataObj2<typename SlotType::Func,Self> Data;

    protected:
      Obj *obj;

    private:

      typedef bool RType;

      static RType gtk_callback(GtkObject*,GtkWidget*,void *d)
        {
          Gtk::ProxyNode *node=(Gtk::ProxyNode*)d;
          Callback* data=(Callback*)(node->callback_);
          return data->call();
        }

      static RType callback(void* d)
        {
          Data* data=(Data*)d;
          return data->obj->emit();
        }

    public:
      SlotType slot()
        {
          SigC::SlotData* tmp=manage(new SigC::SlotData());
          Data& data=reinterpret_cast<Data&>(tmp->data_);
          data.callback=&callback;
          data.obj=this;
          SigC::ScopeNode* node=tmp->receiver();
          obj->register_data(node);
          return tmp;
        }

      RType emit()
        {
          return reinterpret_cast<gboolean (*)(gObj*)>
            (emit_func) (obj->gtkobj());
        }

      RType operator()()
        {
           return reinterpret_cast<gboolean (*)(gObj*)>
            (emit_func) (obj->gtkobj());
        }

      SigC::Connection connect(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         Gtk::ProxyNode::connect(obj,
                            obj->signal_names[index],
                            (GtkSignalFunc)gtk_callback,
                            d,
                            true);
         return d;
        }
  };


class DruidPage : public Gtk::Bin
{

public:
  typedef DruidPage          CppObjectType;
  typedef DruidPage_Class    CppClassType;
  typedef GnomeDruidPage           BaseObjectType;
  typedef GnomeDruidPageClass      BaseClassType;

private:
  friend class DruidPage_Class;
  static CppClassType druid_page_class;

  DruidPage(const DruidPage&);
  DruidPage& operator=(const DruidPage&); // not implemented

protected:
  void   initialize_class();
  explicit DruidPage(GnomeDruidPage *castitem);

public:
  static GtkType get_type();
  GnomeDruidPage* gtkobj()             { return (GnomeDruidPage*)(gtkobject); }
  const GnomeDruidPage* gtkobj() const { return (GnomeDruidPage*)(gtkobject); }
  static bool isA(Gtk::Object *checkcast);

  // Hook for proxies
  static const char* const signal_names[];

  virtual ~DruidPage();

private:

public:
  DruidPage();

/* common functions */


  virtual void set_bg_color (const Gdk_Color &color);
  virtual void set_title (const Gtk::string &title);
  virtual void set_title_color (const Gdk_Color &color);
  virtual void set_logo (const Gdk_Imlib::Image &logo_image);
  virtual void set_logo_bg_color (const Gdk_Color &color);

public:

  union
    {
      CppObjectType * druid_page_self;
      DSignalB<CppObjectType,BaseObjectType,0,&gnome_druid_page_next> next;
      DSignalV<CppObjectType,BaseObjectType,1,&gnome_druid_page_prepare> prepare;
      DSignalB<CppObjectType,BaseObjectType,2,&gnome_druid_page_back> back;
      DSignalV<CppObjectType,BaseObjectType,3,&gnome_druid_page_finish> finish;
      DSignalB<CppObjectType,BaseObjectType,4,&gnome_druid_page_cancel> cancel;
    };

protected:
  // impl functions
    virtual bool next_impl();
    virtual void prepare_impl();
    virtual bool back_impl();
    virtual void finish_impl();
    virtual bool cancel_impl();

};



}


#endif
