// -*- c++ -*-
/*  Generated by gensig from menu.gen_h. DO NOT MODIFY!!! */
#ifndef GTKMM_MENU_HEADER
#define GTKMM_MENU_HEADER
/* $Id: menu.gen_h,v 1.38.2.6 1999/05/06 17:37:22 kenelson Exp $ */

/* menu.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.
 */

#include <gtk--/menushell.h>
#include <gtk--/menuitem.h>
#include <gtk/gtkmenu.h>

#line 27 "menu.gen_h"
#include <gtk--/accelgroup.h>
#line 29 "menu.gen_h"

class Gtk_Menu_Class;
#line 30 "menu.gen_h"


class Gtk_Menu : public Gtk_MenuShell {
  
public:
protected:
  typedef Gtk_Menu_Class    CppClassType;
  typedef GtkMenu           BaseObjectType;
  typedef GtkMenuClass      BaseClassType;

  virtual void *get_parent_class();

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

public:


  Gtk_Menu();
  ~Gtk_Menu() {}
  Gtk_Menu(GtkMenu *castitem);
  //: append a menu item
  void append                       (const Gtk_MenuItem &child);
  //: insert a menu item in first position
  void prepend                      (const Gtk_MenuItem &child);
  //: insert a menu item at specified position
  void insert                       (const Gtk_MenuItem &child,
				     gint position);

  //- same, except that the item will be "owned" by the menu widget.
  //- That is, the widget will destroy it along when it is deleted
  void append                       (const Gtk_ObjectHandle<Gtk_MenuItem> &child);
  void prepend                      (const Gtk_ObjectHandle<Gtk_MenuItem> &child);
  void insert                       (const Gtk_ObjectHandle<Gtk_MenuItem> &child,
				     gint position);

  //: Display the menu on screen
  void popup                        (const Gtk_MenuShell &parent_menu_shell,
				     const Gtk_MenuItem &parent_menu_item,
				     GtkMenuPositionFunc func,
				     gpointer data,
				     gint button,
				     guint32 activate_time);
  void popup                        (GtkMenuPositionFunc func,
				     gpointer data,
				     gint button,
				     guint32 activate_time);
  //: Hides the menu away
  void popdown();

  //- Keep track of the last menu item selected, for the purposes
  //- of the option menu
  const Gtk_MenuItem* get_active() const { return _get_active(); } 
  Gtk_MenuItem*       get_active() { return const_cast<Gtk_MenuItem*>(_get_active()); }
  void              set_active(gint index);

#line 78 "menu.gen_h"
#line 79 "menu.gen_h"
  //- Position the menu according to it's position function. This wraps
  //- a function called by gtkmenuitem.c when a menu-item changes
  //- its allocation. You most likely don't need to care about it.
  void reposition();

  void set_accel_group              (Gtk_AccelGroup &accel_group);
  Gtk_AccelGroup* get_accel_group   ();

#if GTK_VERSION_GT_MICRO(1,2,0)
  Gtk_AccelGroup* get_uline_accel_group     () const;
  Gtk_AccelGroup* ensure_uline_accel_group () const;
#endif
  
  void set_tearoff_state (bool torn_off);

  //- Sets the window manager title for the window that
  //- appears when a menu is torn off
  void set_title(const _gtk_string &title);

  void reorder_child(const Gtk_MenuItem &child, gint position);
  
#line 101 "menu.gen_h"
  //- Attach the menu to a widget. {\var detacher} is a function which takes
  //- the attached GtkWidget* and GtkMenu*
  //- ({\b NOTE! NOT the Gtk_Widget and Gtk_Menu!})
  //- This is mostly used by other widgets like {\class Gtk_MenuItem} or
  //- {\class Gtk_NoteBook}. You probably don't need to care about it.
  void attach_to_widget(const Gtk_Widget &widget, GtkMenuDetachFunc detacher);
  const Gtk_Widget* get_attach_widget() const { return attach_widget_; }
  Gtk_Widget* get_attach_widget() { return attach_widget_; }

  //- Detach the menu from the widget it was attached to
  //- (calls the passed {\var detacher} function)
  void detach();
  
protected:
  /* impl functions */
public:
  GtkMenu* gtkobj() { return GTK_MENU(gtkobject); }
  const GtkMenu* gtkobj() const { return GTK_MENU(gtkobject); }
  static bool isGtkMenu(Gtk_Object *checkcast);
#line 114 "menu.gen_h"


protected:
  mutable Gtk_ObjectHandle<Gtk_MenuItem> active_widget_;
  mutable Gtk_Widget *attach_widget_;
#line 120 "menu.gen_h"
  Gtk_ObjectHandle<Gtk_AccelGroup> accel_group_;
  mutable Gtk_ObjectHandle<Gtk_AccelGroup> uline_accel_group_;
#line 123 "menu.gen_h"

private:
  const Gtk_MenuItem* _get_active() const;

};

#endif
