// -*- c++ -*-
//  Generated by gtkmmproc from /usr/obj/ports/gnomemm-1.2.3/gnomemm-1.2.3/src/build_sources/../icon-list.gen_h -- DO NOT MODIFY!
#ifndef _GNOMEMM_ICON_LIST_H
#define _GNOMEMM_ICON_LIST_H

// -*- C++ -*- // this is for the .gen_h, I realize gensig puts one in
/* $Id: icon-list.gen_h,v 1.31 2001/03/13 20:51:25 murrayc Exp $ */

/* icon-list.h
 *
 * Copyright (C) 1998 EMC Capital Management Inc.
 * Developed by Havoc Pennington <hp@pobox.com>
 *
 * 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.
 */

///////////////// GnomeIconTextInfo is not wrapped; see gnome-icon-list.h

#include <gtk--/container.h>
#include <libgnomeui/gnome-icon-list.h>
#include <gnome--/imlib.h>
#include <gnome--/canvas.h>

namespace Gtk { class Adjustment; }

namespace Gnome {
class IconList;
class IconList_Class;
}
namespace Gtk { Gnome::IconList *wrap (GnomeIconList *o); }
namespace Gnome
{

namespace IconList_Helpers {

class SelectionList
{
public:
  typedef int value_type;
  typedef value_type & reference;
  typedef const value_type & const_reference;

  typedef G_List_Iterator<value_type> iterator;
  typedef G_List_ConstIterator<iterator> const_iterator;
  typedef G_List_ReverseIterator<iterator> reverse_iterator;
  typedef G_List_ConstIterator<reverse_iterator> const_reverse_iterator;

  typedef size_t difference_type;
  typedef size_t size_type;

private:
  GnomeIconList *parent_;

  GList*& glist() const; // front of list

  iterator begin_() const;
  iterator end_() const;

public:
  inline iterator begin()
  {return begin_();}
  inline iterator end()
  {return end_();}

  inline const_iterator begin() const
  { return const_iterator(begin_()); }
  inline const_iterator end() const
  { return const_iterator(end_()); }
  inline reverse_iterator rbegin()
  { return reverse_iterator(end_()); }
  inline reverse_iterator rend()
  { return reverse_iterator(begin_()); }

  inline const_reverse_iterator rbegin() const
  { return const_reverse_iterator(reverse_iterator(end_())); }
  inline const_reverse_iterator rend() const
  { return const_reverse_iterator(reverse_iterator(begin_())); }

  size_type size(void) const;
  inline size_type max_size(void) { return size_type(-1); }
  inline bool empty(void) { return glist() == 0; }

  value_type operator[](size_type l) const;
};

} /* namespace IconList_Helpers */

class IconList : public Canvas
{

public:
  typedef IconList          CppObjectType;
  typedef IconList_Class    CppClassType;
  typedef GnomeIconList           BaseObjectType;
  typedef GnomeIconListClass      BaseClassType;

private:
  friend class IconList_Class;
  static CppClassType icon_list_class;

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

protected:
  void   initialize_class();
  explicit IconList(GnomeIconList *castitem);

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

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

  virtual ~IconList();

private:

public:
  IconList(guint icon_width = 80,
		   Gtk::Adjustment* adj = 0,
		   bool is_editable = false);



  public:
    typedef IconList_Helpers::SelectionList SelectionList;

  // Functions


  void set_selection_mode(GtkSelectionMode mode);




  int append(const Gtk::string& icon_filename,const Gtk::string& text);



  int append(const Gdk_Imlib::Image& im,const Gtk::string& text);





  void insert(int pos,const Gtk::string& icon_filename,const Gtk::string& text);



  void insert(int pos,const Gdk_Imlib::Image& im,const Gtk::string& text);


  void remove(int pos);


  void clear();



  void set_icon_data(int pos,gpointer data);





  void set_icon_data_full(int pos,gpointer data,GtkDestroyNotify destroy);


  gpointer get_icon_data(int pos);



  int find_icon_from_data(gpointer data);


  void freeze();


  void thaw();


  void moveto(int pos,double yalign);



  GtkVisibility icon_is_visible(int pos);


  void set_row_spacing(int spacing);


  void set_col_spacing(int spacing);


  void set_text_spacing(int spacing);


  void set_icon_border(int spacing);


  void set_icon_width(int w);


  void set_separators(const Gtk::string& sep);


  int get_icon_at(int x,int y);


  int get_items_per_line();

  //TODO: redo cause_* ?

  void cause_select_icon(int idx);

  //TODO: redo cause_* ?

  void cause_unselect_icon(int pos);


  int unselect_all(GdkEvent* event,gpointer keep);



  // Signals
  //: select_icon signal:
  //- The first arg is the icon number.
  //- The second arg is the event that caused the select.


  //: Just like select_icon only it's unselect


  //: select_icon signal:
  //- The first arg is the icon number.
  //- The second arg is the new text.


  SelectionList& selection();
  const SelectionList& selection() const;

public:

  union
    {
      CppObjectType * icon_list_self;
      Gtk::ProxySignal2<void,gint,GdkEvent*,CppObjectType,BaseObjectType,0> select_icon;
      Gtk::ProxySignal2<void,gint,GdkEvent*,CppObjectType,BaseObjectType,1> unselect_icon;
      Gtk::ProxySignal2<gboolean,gint,const gchar*,CppObjectType,BaseObjectType,2> text_changed;
    };

protected:
  // impl functions
    virtual void select_icon_impl(gint p0,GdkEvent* p1);
    virtual void unselect_icon_impl(gint p0,GdkEvent* p1);
    virtual gboolean text_changed_impl(gint p0,const gchar* p1);

};

}

#endif
