// -*- c++ -*-
//  Generated by gtkmmproc from /usr/obj/ports/gtkmm-1.2.10/gtkmm-1.2.10/src/build_sources/../menuitem.gen_h -- DO NOT MODIFY!
#ifndef _GTKMM_MENUITEM_H
#define _GTKMM_MENUITEM_H

/* $Id: menuitem.gen_h,v 1.49 2001/07/15 13:33:38 murrayc Exp $ */


/* menuitem.h
 *
 * Copyright (C) 1998-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--/item.h>
#include <gtk/gtkmenuitem.h>

namespace Gtk {
class MenuItem;
class MenuItem_Class;
}
namespace Gtk { Gtk::MenuItem *wrap (GtkMenuItem *o); }
namespace Gtk
{
class Menu;

//: The widget used for item in menus.
//- The {\class Gtk::MenuItem} widget and the derived widgets are the only valid
//- childs for menus. Their function is to correctly handle highlighting,
//- alignment, events and submenus.
//-
//- As it derives from {\class Gtk::Bin} it can hold any valid child widget,
//- altough only a few are really useful.
class MenuItem : public Item {

public:
  typedef MenuItem          CppObjectType;
  typedef MenuItem_Class    CppClassType;
  typedef GtkMenuItem           BaseObjectType;
  typedef GtkMenuItemClass      BaseClassType;

private:
  friend class MenuItem_Class;
  static CppClassType menu_item_class;

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

protected:
  void   initialize_class();
  explicit MenuItem(GtkMenuItem *castitem);

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

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

  virtual ~MenuItem();

private:

public:
  //: create an empty menu item
  MenuItem();

  //: create a menu item with label
  MenuItem(const string &label,gfloat x=0.0,gfloat y=0.5);


  Gtk::Menu* get_submenu() const;

  bool has_submenu() { return (gtkobj()->submenu)!=0; }
  //: Make this item a cascading menu


  void set_submenu(Gtk::Menu& submenu);

  //: Remove the item's attached submenu

  void remove_submenu();


  void set_placement(GtkSubmenuPlacement placement);



  void configure(gint show_toggle_indicator,gint show_submenu_indicator);


  void right_justify();

  // gtk_menu_item_(de)select are just a wrapper for gtk_item_(de)select
  // and defined in Gtk_Item, so they do not be redefined here




  /* these are internal and will become private */
  guint accel_key;
  guint nav_key;
  Label* accel_label_;
  void show_accel_label();
  void hide_accel_label();
  void accelerate();
  // this is a hack to insert accelerators in realized widgets
  // without breaking binary compatiblity.  Move to realize_impl

public:

  union
    {
      CppObjectType * menu_item_self;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,0,&gtk_menu_item_activate> activate;
      Gtk::ProxySignal0<void,CppObjectType,BaseObjectType,1> activate_item;
    };

protected:
  // impl functions
    virtual void activate_impl();
    virtual void activate_item_impl();

};

}


//+ PROPERTIES(gtkmenuitem)

//. name: submenu
//. type: Gtk_Menu*
//. get: {get_submenu()}
//. set: {set_submenu()}
//. desc: The submenu (e.g. cascading menu) this item may hold

//. name: show_toggle_indicator
//. type: bool
//. get: none
//. set: {configure()}
//. desc: Unused.

//. name: show_submenu_indicator
//. type: bool
//. get: none
//. set: {configure()}
//. desc: If the item holds a submenu and this flag is set,
//. an arrow next to the item's label will be drawn

//. name: submenu_placement
//. type: guint:1
//. get: none
//. set: {set_placement()}
//. desc: Can be set to {\enum GTK_TOP_BOTTOM, GTK_LEFT_RIGHT}

//. name: right_justify
//. type: bool
//. get: none
//. set: {right_justify()}
//. desc: {right_justify()} forces this flag to true
#endif
