// -*- c++ -*-
/*  Generated by gensig from container.gen_h. DO NOT MODIFY!!! */
#ifndef GTKMM_CONTAINER_HEADER
#define GTKMM_CONTAINER_HEADER
/* $Id: container.gen_h,v 1.82.2.3 1999/03/20 04:59:19 terop Exp $ */

/* container.h
 * 
 * Copyright (C) 1998-1999 
 *
 * 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.
 */


/* this must be included because of derivation */
#include <gtk--/widget.h>
class Gtk_Adjustment;
class Gtk_Label;
#include <gtk/gtkcontainer.h>
/* we'll include gtkfeatures because we dont want to include the whole
   gtk/gtk.h - this file is used by almost ALL our widgets, so dependencies
   in minimum - adding things here will increase compile times ALOT */
#include <gtk/gtkfeatures.h>

class Gtk_Container_Class;
#line 33 "container.gen_h"


class Gtk_Container;
class gtkmm_add_signal_class : public Signal1<Gtk_Widget&> {
   Gtk_Container *container;
public:
   gtkmm_add_signal_class(Gtk_Container *cont) : container(cont) { }
  void operator()(const Gtk_ObjectHandle<Gtk_Widget> &obj);
  void operator()(Gtk_Widget& obj) { 
    Signal1<Gtk_Widget&>::operator()(obj); 
  }
  void operator()(Gtk_Widget* obj) { 
    Signal1<Gtk_Widget&>::operator()(*obj); 
  }
};

template<class T,class T1>
  Connection connect_to_method(
    gtkmm_add_signal_class &signal,
    T* receiver,void (T1::*method)(Gtk_Widget&) )
  {
   Connection_impl *slot=
     new Concretecppslot1<T,Gtk_Widget&>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


class Gtk_Container : public Gtk_Widget
{
  friend class gtkmm_add_signal_class;
  typedef G_List_Cpp_Iterator<GtkWidget,Gtk_Widget> iterator;
protected:
  list<Gtk_Widget*> del_list;
public:
protected:
  typedef Gtk_Container_Class    CppClassType;
  typedef GtkContainer           BaseObjectType;
  typedef GtkContainerClass      BaseClassType;

  virtual void *get_parent_class();

private:
  friend CppClassType;
  static CppClassType container_class; 
  GtkType get_type(); 

public:


  Gtk_Container(GtkContainer *castitem);
  virtual ~Gtk_Container();

  virtual void add_label(const string &label);
	
  //: Deprecated methods

#line 83 "container.gen_h"

  void set_border_width(gint width);
  void register_toplevel();
  void unregister_toplevel();

#line 89 "container.gen_h"
  void resize_children();
  void set_resize_mode(GtkResizeMode resize_mode);
  
  static void add_child_arg_type(const string &arg_name,
				 GtkType           arg_type,
				 guint             arg_flags,
				 guint             arg_id);
  static void query_child_args(GtkType	       class_type,
			       guint32          **arg_flags,
			       guint             *nargs);

  void child_getv(Gtk_Widget &child, guint n_args, GtkArg *args);

  void child_setv(Gtk_Widget &child, guint n_args, GtkArg *args);

  void addv(Gtk_Widget &child, guint n_args, GtkArg *args);

  // NOT IMPLEMENTED YET
  //   void    gtk_container_add_with_args	   (GtkContainer      *container,
  // 					            GtkWidget	      *widget,
  // 					            ...);
  // (use gtk_container_args_collect() )
  //
  //  GList * gtk_container_get_toplevels        (void);
  //  void    gtk_container_child_set		 (GtkContainer      *container,
  // 					          GtkWidget         *child,
  // 					          const gchar	      *first_arg_name,
  // 					          ...);

#line 119 "container.gen_h"
#line 125 "container.gen_h"
  void foreach_full(GtkCallback        callback,
		    GtkCallbackMarshal marshal,
		    gpointer           callback_data,
		    GtkDestroyNotify   notify);
#ifdef GTK_HAVE_CONTAINER_FOCUS_ADJUSTMENTS
  // These methods require gtk1.0.1
  //  void   set_focus_child(Gtk_Widget *child); // is a signal

  //  void   set_focus_child(const Gtk_Widget &child);
  void   set_focus_vadjustment(const Gtk_Adjustment &adjustment);
  void   set_focus_hadjustment(const Gtk_Adjustment &adjustment);
#endif

  //: begin() and end() is for traversing
  //: the list. STL algorithms should
  //: work with the iterator it returns.
  // you can use the following code to get all widgets
  // from the list:
  // <pre>
  //   Gtk_Container *cont = ...
  //   Gtk_Container::iterator i;
  //   for (i=cont->begin();i!=const->end();i++) {
  //      (*i)->show();
  //   }
  // </pre>
  // Here *i is of type Gtk_Widget*.<br>
  // Note! with these routines, you can only see widgets that
  // have a c++ wrapper!<p>
  // These kind of begin() and end() methods are used everywhere in
  // gtk-- and learning to use them is essential for using gtk--.
  iterator begin();
  iterator end();

  Gtk_ObjectHandle< G_List<GtkWidget> > children();
  //: Note that this returns a list of GtkWidget* of course, not GtkWidget.

  Signal_proxy1<BaseObjectType,GtkWidget*> add_c;

  // Calling add signal can be used to add a widget to the container.
  // Derived widgets may restrict what kind of widgets can be added
  // to that container. Existing containers do that already and for example
  // Gtk_List only accepts Gtk_ListItems.
  // <p>
  //
  // Normally ownership of the inserted object will NOT be moved to 
  // the container, so you'll still need
  // to handle deletion of widgets inserted to the container. This
  // allows you to add objects in local or class scope to containers.
  // <p>
  // If you pass Gtk_ObjectHandle<Gtk_Widget> to add method, container will
  // automatically delete the widget when container is destroyed.
  // The Gtk_ObjectHandle<> object will move its ownership of the widget
  // to the container and container handles deletion of the widget.
  // Gtk_ObjectHandle<> is very similar to C++ standard's auto_ptr<>
  // class.
  gtkmm_add_signal_class add;
  // Signal1<Gtk_Widget*> add; // we'll replace it with better one.
  void add_callback(Gtk_Widget &p1);

  // release() is gtk-- specific method for saying that some
  // widget added using auto_ptr<> add methods should move
  // its ownership back to the user. After this call, gtk-- will
  // not delete the widget, even if it were added using auto_ptr<>
  // add. (calling this with widget not added using auto_ptr<> add
  // is safe and does nothing)
  void release(Gtk_Widget &widget);

  Signal_proxy1<BaseObjectType,GtkWidget*> remove_c;
  Signal1<Gtk_Widget*> remove;
  void remove_callback(Gtk_Widget *p1);

  Signal_proxy1_r<gint,BaseObjectType,GtkDirectionType> focus;
#line 198 "container.gen_h"
  Signal_proxy0<BaseObjectType> check_resize;
  Signal_proxy0_r<GtkType,BaseObjectType> child_type;

  Signal_proxy1<BaseObjectType,GtkWidget*> set_focus_child_c;
  Signal1<Gtk_Widget*> set_focus_child;
  void set_focus_child_callback(Gtk_Widget *p1);
  
  Signal_proxy3<BaseObjectType,GtkWidget*, GtkArg*, guint> set_child_arg_c;
  Signal3<Gtk_Widget*, GtkArg*, guint> set_child_arg;
  void set_child_arg_callback(Gtk_Widget *p1, GtkArg *arg, guint arg_id);

  Signal_proxy3<BaseObjectType,GtkWidget*, GtkArg*, guint> get_child_arg_c;
  Signal3<Gtk_Widget*, GtkArg*, guint> get_child_arg;
  void get_child_arg_callback(Gtk_Widget *p1, GtkArg *arg, guint arg_id);

#line 217 "container.gen_h"
protected:
  /* impl functions */
  virtual void add_c_impl(GtkWidget* p1);
  virtual void remove_c_impl(GtkWidget* p1);
  virtual gint focus_impl(GtkDirectionType p1);
  virtual void check_resize_impl();
  virtual GtkType child_type_impl();
  virtual void set_focus_child_c_impl(GtkWidget* p1);
  virtual void set_child_arg_c_impl(GtkWidget* p1, GtkArg* p2, guint p3);
  virtual void get_child_arg_c_impl(GtkWidget* p1, GtkArg* p2, guint p3);
public:
  GtkContainer* gtkobj() { return GTK_CONTAINER(gtkobject); }
  const GtkContainer* gtkobj() const { return GTK_CONTAINER(gtkobject); }
  static bool isGtkContainer(Gtk_Object *checkcast);
#line 217 "container.gen_h"

protected:
  Gtk_Container();
  Gtk_Label *child_label_;
};


#endif
