// -*- c++ -*-
//  Generated by gtkmmproc from ./../checkmenuitem.gen_h -- DO NOT MODIFY!
#ifndef _GTKMM_CHECKMENUITEM_H
#define _GTKMM_CHECKMENUITEM_H

/* $Id: checkmenuitem.h,v 1.2 2003/06/17 16:37:40 pbd Exp $ */

/* checkmenuitem.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--/menuitem.h>
#include <gtk/gtkcheckmenuitem.h>

namespace Gtk {
class CheckMenuItem;
class CheckMenuItem_Class;
}
namespace Gtk { Gtk::CheckMenuItem *wrap (GtkCheckMenuItem *o); }
namespace Gtk
{
//: A menu item with a check box.
//- A {\class Gtk::CheckMenuItem} is a menu item that maintains the state of a boolean value in
//- addition to a {\class Gtk::MenuItem}'s usual role in activating application code.
//-
//- A check box indicating the state of the boolean value is displayed at the left
//- side of the GtkMenuItem. Activating the GtkMenuItem toggles the value.
class CheckMenuItem : public MenuItem {

public:
  typedef CheckMenuItem          CppObjectType;
  typedef CheckMenuItem_Class    CppClassType;
  typedef GtkCheckMenuItem           BaseObjectType;
  typedef GtkCheckMenuItemClass      BaseClassType;

private:
  friend class CheckMenuItem_Class;
  static CppClassType check_menu_item_class;

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

protected:
  void   initialize_class();
  explicit CheckMenuItem(GtkCheckMenuItem *castitem);

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

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

  virtual ~CheckMenuItem();

private:

public:

  CheckMenuItem();



  //: Creates a new GtkCheckMenuItem with a label.
  //- label: The string to use for the label.
  explicit CheckMenuItem(const string &label,gfloat x=0.0,gfloat y=0.5);

  guint get_active() const;

  //: Sets the active state of the menu item's check box.
  //- state: Boolean value indicating whether the check box is active.

  void set_active(bool state=true);

  //: Get's the active state of the widget.
  bool is_active()          const { return gtkobj()->active; }
  bool always_show_toggle() const { return gtkobj()->always_show_toggle; }

  //: Controls whether the check box is shown at all times.
  //- Normally the check box is shown only when it is active or while the menu item is selected.
  //-
  //- always: Boolean value indicating whether to always show the check box.

  void set_show_toggle(bool always);

  //- Triggered when the item changes state
  //- (Note : changing the item's state with {set_active()}
  //- will also trigger this signal).


  //- Triggered when the item is redrawn (e.g.after being toggled)
  //- Overload this signal if you want to implement your own check item
  //- look. Otherwise, you most likely don't care about it.
  //- The GdkRectangle specifies the area of the widget which will get
  //- redrawn.

public:

  union
    {
      CppObjectType * check_menu_item_self;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,0,&gtk_check_menu_item_toggled> toggled;
    };

protected:
  // impl functions
    virtual void toggled_impl();
    virtual void draw_indicator_impl(GdkRectangle* p0);

};

}


//+ PROPERTIES(Gtk_CheckMenuItem)
//. name: active
//. type: bool
//. get: none
//. set: {set_active()}
//. desc: Whether the item is checked or not

//. name: always_show_toggle
//. type: bool
//. get: none
//. set: {set_show_toggle()}
//. desc: Whether the toggle indicator is always drawn or only when the
//. item is highlighted

#endif
