module Graphics.UI.Gtk.MenuComboToolbar.CheckMenuItem (
CheckMenuItem,
CheckMenuItemClass,
castToCheckMenuItem, gTypeCheckMenuItem,
toCheckMenuItem,
checkMenuItemNew,
checkMenuItemNewWithLabel,
checkMenuItemNewWithMnemonic,
checkMenuItemSetActive,
checkMenuItemGetActive,
checkMenuItemEmitToggled,
checkMenuItemSetInconsistent,
checkMenuItemGetInconsistent,
checkMenuItemGetDrawAsRadio,
checkMenuItemSetDrawAsRadio,
checkMenuItemActive,
checkMenuItemInconsistent,
checkMenuItemDrawAsRadio,
checkMenuItemToggled
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.Attributes
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Signals
import Graphics.UI.Gtk.Types
checkMenuItemNew :: IO CheckMenuItem
checkMenuItemNew =
makeNewObject mkCheckMenuItem $
liftM (castPtr :: Ptr Widget -> Ptr CheckMenuItem) $
gtk_check_menu_item_new
checkMenuItemNewWithLabel :: GlibString string
=> string
-> IO CheckMenuItem
checkMenuItemNewWithLabel label =
makeNewObject mkCheckMenuItem $
liftM (castPtr :: Ptr Widget -> Ptr CheckMenuItem) $
withUTFString label $ \labelPtr ->
gtk_check_menu_item_new_with_label
labelPtr
checkMenuItemNewWithMnemonic :: GlibString string
=> string
-> IO CheckMenuItem
checkMenuItemNewWithMnemonic label =
makeNewObject mkCheckMenuItem $
liftM (castPtr :: Ptr Widget -> Ptr CheckMenuItem) $
withUTFString label $ \labelPtr ->
gtk_check_menu_item_new_with_mnemonic
labelPtr
checkMenuItemSetActive :: CheckMenuItemClass self => self -> Bool -> IO ()
checkMenuItemSetActive self isActive =
(\(CheckMenuItem arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_check_menu_item_set_active argPtr1 arg2)
(toCheckMenuItem self)
(fromBool isActive)
checkMenuItemGetActive :: CheckMenuItemClass self => self -> IO Bool
checkMenuItemGetActive self =
liftM toBool $
(\(CheckMenuItem arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_check_menu_item_get_active argPtr1)
(toCheckMenuItem self)
checkMenuItemEmitToggled :: CheckMenuItemClass self => self -> IO ()
checkMenuItemEmitToggled self =
(\(CheckMenuItem arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_check_menu_item_toggled argPtr1)
(toCheckMenuItem self)
checkMenuItemSetInconsistent :: CheckMenuItemClass self => self -> Bool -> IO ()
checkMenuItemSetInconsistent self setting =
(\(CheckMenuItem arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_check_menu_item_set_inconsistent argPtr1 arg2)
(toCheckMenuItem self)
(fromBool setting)
checkMenuItemGetInconsistent :: CheckMenuItemClass self => self -> IO Bool
checkMenuItemGetInconsistent self =
liftM toBool $
(\(CheckMenuItem arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_check_menu_item_get_inconsistent argPtr1)
(toCheckMenuItem self)
checkMenuItemSetDrawAsRadio :: CheckMenuItemClass self => self -> Bool -> IO ()
checkMenuItemSetDrawAsRadio self drawAsRadio =
(\(CheckMenuItem arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_check_menu_item_set_draw_as_radio argPtr1 arg2)
(toCheckMenuItem self)
(fromBool drawAsRadio)
checkMenuItemGetDrawAsRadio :: CheckMenuItemClass self => self -> IO Bool
checkMenuItemGetDrawAsRadio self =
liftM toBool $
(\(CheckMenuItem arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_check_menu_item_get_draw_as_radio argPtr1)
(toCheckMenuItem self)
checkMenuItemActive :: CheckMenuItemClass self => Attr self Bool
checkMenuItemActive = newAttr
checkMenuItemGetActive
checkMenuItemSetActive
checkMenuItemInconsistent :: CheckMenuItemClass self => Attr self Bool
checkMenuItemInconsistent = newAttr
checkMenuItemGetInconsistent
checkMenuItemSetInconsistent
checkMenuItemDrawAsRadio :: CheckMenuItemClass self => Attr self Bool
checkMenuItemDrawAsRadio = newAttr
checkMenuItemGetDrawAsRadio
checkMenuItemSetDrawAsRadio
checkMenuItemToggled :: CheckMenuItemClass self => Signal self (IO ())
checkMenuItemToggled = Signal (connect_NONE__NONE "toggled")
foreign import ccall unsafe "gtk_check_menu_item_new"
gtk_check_menu_item_new :: (IO (Ptr Widget))
foreign import ccall unsafe "gtk_check_menu_item_new_with_label"
gtk_check_menu_item_new_with_label :: ((Ptr CChar) -> (IO (Ptr Widget)))
foreign import ccall unsafe "gtk_check_menu_item_new_with_mnemonic"
gtk_check_menu_item_new_with_mnemonic :: ((Ptr CChar) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_check_menu_item_set_active"
gtk_check_menu_item_set_active :: ((Ptr CheckMenuItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_check_menu_item_get_active"
gtk_check_menu_item_get_active :: ((Ptr CheckMenuItem) -> (IO CInt))
foreign import ccall safe "gtk_check_menu_item_toggled"
gtk_check_menu_item_toggled :: ((Ptr CheckMenuItem) -> (IO ()))
foreign import ccall safe "gtk_check_menu_item_set_inconsistent"
gtk_check_menu_item_set_inconsistent :: ((Ptr CheckMenuItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_check_menu_item_get_inconsistent"
gtk_check_menu_item_get_inconsistent :: ((Ptr CheckMenuItem) -> (IO CInt))
foreign import ccall safe "gtk_check_menu_item_set_draw_as_radio"
gtk_check_menu_item_set_draw_as_radio :: ((Ptr CheckMenuItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_check_menu_item_get_draw_as_radio"
gtk_check_menu_item_get_draw_as_radio :: ((Ptr CheckMenuItem) -> (IO CInt))