;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; menu-item.lisp --- GtkMenuItem
;;;
  Copyright ( C ) 2011 ,   <  >
;;;

(in-package :gtk-cffi)

(defclass menu-item (bin)
  ())

(defcfun gtk-menu-item-new :pointer)
(defcfun gtk-menu-item-new-with-label :pointer (label :string))
(defcfun gtk-menu-item-new-with-mnemonic :pointer (label :string))

(defmethod gconstructor ((menu-item menu-item) 
                         &key label mnemonic &allow-other-keys)
  (if label
      (if mnemonic
          (gtk-menu-item-new-with-mnemonic label)
          (gtk-menu-item-new-with-label label))
      (gtk-menu-bar-new)))

(defgtkslots menu-item
    right-justified :boolean
    label :string
    use-underline :boolean
    submenu pobject
    accel-path :string
    reserve-indicator :boolean)

(defgtkfun select :void menu-item)
(defgtkfun deselect :void menu-item)
(defgtkfun activate :void menu-item)
(defgtkfun toggle-size-request :void menu-item (requisition :pointer))
(defgtkfun toggle-size-allocate :void menu-item (allocation :int))

(init-slots menu-item nil)
 -*- Mode: lisp; indent-tabs-mode: nil -*-

 menu-item.lisp --- GtkMenuItem


  Copyright ( C ) 2011 ,   <  >

(in-package :gtk-cffi)

(defclass menu-item (bin)
  ())

(defcfun gtk-menu-item-new :pointer)
(defcfun gtk-menu-item-new-with-label :pointer (label :string))
(defcfun gtk-menu-item-new-with-mnemonic :pointer (label :string))

(defmethod gconstructor ((menu-item menu-item) 
                         &key label mnemonic &allow-other-keys)
  (if label
      (if mnemonic
          (gtk-menu-item-new-with-mnemonic label)
          (gtk-menu-item-new-with-label label))
      (gtk-menu-bar-new)))

(defgtkslots menu-item
    right-justified :boolean
    label :string
    use-underline :boolean
    submenu pobject
    accel-path :string
    reserve-indicator :boolean)

(defgtkfun select :void menu-item)
(defgtkfun deselect :void menu-item)
(defgtkfun activate :void menu-item)
(defgtkfun toggle-size-request :void menu-item (requisition :pointer))
(defgtkfun toggle-size-allocate :void menu-item (allocation :int))

(init-slots menu-item nil)