{-# LINE 2 "./Graphics/UI/Gtk/Abstract/ButtonBox.chs" #-}
module Graphics.UI.Gtk.Abstract.ButtonBox (
ButtonBox,
ButtonBoxClass,
castToButtonBox, gTypeButtonBox,
toButtonBox,
ButtonBoxStyle(..),
buttonBoxGetLayout,
buttonBoxSetLayout,
buttonBoxSetChildSecondary,
buttonBoxGetChildSecondary,
buttonBoxSetChildNonHomogeneous,
buttonBoxGetChildNonHomogeneous,
buttonBoxLayoutStyle,
buttonBoxChildSecondary,
buttonBoxChildNonHomogeneous,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Attributes
import Graphics.UI.Gtk.Types
{-# LINE 100 "./Graphics/UI/Gtk/Abstract/ButtonBox.chs" #-}
import Graphics.UI.Gtk.General.Enums (ButtonBoxStyle(..))
import Graphics.UI.Gtk.Abstract.ContainerChildProperties
{-# LINE 104 "./Graphics/UI/Gtk/Abstract/ButtonBox.chs" #-}
buttonBoxGetLayout :: ButtonBoxClass self => self -> IO ButtonBoxStyle
buttonBoxGetLayout self =
liftM (toEnum . fromIntegral) $
(\(ButtonBox arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_button_box_get_layout argPtr1)
{-# LINE 114 "./Graphics/UI/Gtk/Abstract/ButtonBox.chs" #-}
(toButtonBox self)
buttonBoxGetChildSecondary :: (ButtonBoxClass self, WidgetClass child) => self
-> child
-> IO Bool
buttonBoxGetChildSecondary self child =
liftM toBool $
(\(ButtonBox arg1) (Widget arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_button_box_get_child_secondary argPtr1 argPtr2)
{-# LINE 128 "./Graphics/UI/Gtk/Abstract/ButtonBox.chs" #-}
(toButtonBox self)
(toWidget child)
buttonBoxSetChildNonHomogeneous :: (ButtonBoxClass self, WidgetClass child) => self
-> child
-> Bool
-> IO ()
buttonBoxSetChildNonHomogeneous self child nonHomogeneous =
(\(ButtonBox arg1) (Widget arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_button_box_set_child_non_homogeneous argPtr1 argPtr2 arg3)
{-# LINE 141 "./Graphics/UI/Gtk/Abstract/ButtonBox.chs" #-}
(toButtonBox self)
(toWidget child)
(fromBool nonHomogeneous)
buttonBoxGetChildNonHomogeneous :: (ButtonBoxClass self, WidgetClass child) => self
-> child
-> IO Bool
buttonBoxGetChildNonHomogeneous self child =
liftM toBool $
(\(ButtonBox arg1) (Widget arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_button_box_get_child_non_homogeneous argPtr1 argPtr2)
{-# LINE 153 "./Graphics/UI/Gtk/Abstract/ButtonBox.chs" #-}
(toButtonBox self)
(toWidget child)
buttonBoxSetLayout :: ButtonBoxClass self => self
-> ButtonBoxStyle
-> IO ()
buttonBoxSetLayout self layoutStyle =
(\(ButtonBox arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_button_box_set_layout argPtr1 arg2)
{-# LINE 164 "./Graphics/UI/Gtk/Abstract/ButtonBox.chs" #-}
(toButtonBox self)
((fromIntegral . fromEnum) layoutStyle)
buttonBoxSetChildSecondary :: (ButtonBoxClass self, WidgetClass child) => self
-> child
-> Bool
-> IO ()
buttonBoxSetChildSecondary self child isSecondary =
(\(ButtonBox arg1) (Widget arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_button_box_set_child_secondary argPtr1 argPtr2 arg3)
{-# LINE 186 "./Graphics/UI/Gtk/Abstract/ButtonBox.chs" #-}
(toButtonBox self)
(toWidget child)
(fromBool isSecondary)
buttonBoxLayoutStyle :: ButtonBoxClass self => Attr self ButtonBoxStyle
buttonBoxLayoutStyle = newAttr
buttonBoxGetLayout
buttonBoxSetLayout
buttonBoxChildSecondary :: (ButtonBoxClass self, WidgetClass child) => child -> Attr self Bool
buttonBoxChildSecondary = newAttrFromContainerChildBoolProperty "secondary"
buttonBoxChildNonHomogeneous :: (ButtonBoxClass self, WidgetClass child) => child -> Attr self Bool
buttonBoxChildNonHomogeneous = newAttrFromContainerChildBoolProperty "non-homogeneous"
foreign import ccall safe "gtk_button_box_get_layout"
gtk_button_box_get_layout :: ((Ptr ButtonBox) -> (IO CInt))
foreign import ccall safe "gtk_button_box_get_child_secondary"
gtk_button_box_get_child_secondary :: ((Ptr ButtonBox) -> ((Ptr Widget) -> (IO CInt)))
foreign import ccall safe "gtk_button_box_set_child_non_homogeneous"
gtk_button_box_set_child_non_homogeneous :: ((Ptr ButtonBox) -> ((Ptr Widget) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_button_box_get_child_non_homogeneous"
gtk_button_box_get_child_non_homogeneous :: ((Ptr ButtonBox) -> ((Ptr Widget) -> (IO CInt)))
foreign import ccall safe "gtk_button_box_set_layout"
gtk_button_box_set_layout :: ((Ptr ButtonBox) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_button_box_set_child_secondary"
gtk_button_box_set_child_secondary :: ((Ptr ButtonBox) -> ((Ptr Widget) -> (CInt -> (IO ()))))