module Graphics.UI.Gtk.Layout.Expander (
Expander,
ExpanderClass,
castToExpander, gTypeExpander,
toExpander,
expanderNew,
expanderNewWithMnemonic,
expanderSetExpanded,
expanderGetExpanded,
expanderSetSpacing,
expanderGetSpacing,
expanderSetLabel,
expanderGetLabel,
expanderSetUseUnderline,
expanderGetUseUnderline,
expanderSetUseMarkup,
expanderGetUseMarkup,
expanderSetLabelWidget,
expanderGetLabelWidget,
expanderExpanded,
expanderLabel,
expanderUseUnderline,
expanderUseMarkup,
expanderSpacing,
expanderLabelWidget,
expanderLabelFill,
onActivate,
afterActivate,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.Attributes
import System.Glib.Properties
import Graphics.UI.Gtk.Abstract.Object
import Graphics.UI.Gtk.Types
import Graphics.UI.Gtk.Signals
expanderNew :: String -> IO Expander
expanderNew label =
makeNewObject mkExpander $
liftM (castPtr :: Ptr Widget -> Ptr Expander) $
withUTFString label $ \labelPtr ->
gtk_expander_new
labelPtr
expanderNewWithMnemonic ::
String
-> IO Expander
expanderNewWithMnemonic label =
makeNewObject mkExpander $
liftM (castPtr :: Ptr Widget -> Ptr Expander) $
withUTFString label $ \labelPtr ->
gtk_expander_new_with_mnemonic
labelPtr
expanderSetExpanded :: Expander -> Bool -> IO ()
expanderSetExpanded self expanded =
(\(Expander arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_set_expanded argPtr1 arg2)
self
(fromBool expanded)
expanderGetExpanded :: Expander -> IO Bool
expanderGetExpanded self =
liftM toBool $
(\(Expander arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_get_expanded argPtr1)
self
expanderSetSpacing :: Expander -> Int -> IO ()
expanderSetSpacing self spacing =
(\(Expander arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_set_spacing argPtr1 arg2)
self
(fromIntegral spacing)
expanderGetSpacing :: Expander
-> IO Int
expanderGetSpacing self =
liftM fromIntegral $
(\(Expander arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_get_spacing argPtr1)
self
expanderSetLabel :: Expander -> String -> IO ()
expanderSetLabel self label =
withUTFString label $ \labelPtr ->
(\(Expander arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_set_label argPtr1 arg2)
self
labelPtr
expanderGetLabel :: Expander -> IO String
expanderGetLabel self =
(\(Expander arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_get_label argPtr1)
self
>>= peekUTFString
expanderSetUseUnderline :: Expander
-> Bool
-> IO ()
expanderSetUseUnderline self useUnderline =
(\(Expander arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_set_use_underline argPtr1 arg2)
self
(fromBool useUnderline)
expanderGetUseUnderline :: Expander
-> IO Bool
expanderGetUseUnderline self =
liftM toBool $
(\(Expander arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_get_use_underline argPtr1)
self
expanderSetUseMarkup :: Expander
-> Bool
-> IO ()
expanderSetUseMarkup self useMarkup =
(\(Expander arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_set_use_markup argPtr1 arg2)
self
(fromBool useMarkup)
expanderGetUseMarkup :: Expander -> IO Bool
expanderGetUseMarkup self =
liftM toBool $
(\(Expander arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_get_use_markup argPtr1)
self
expanderSetLabelWidget :: WidgetClass labelWidget => Expander
-> labelWidget
-> IO ()
expanderSetLabelWidget self labelWidget =
(\(Expander arg1) (Widget arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_expander_set_label_widget argPtr1 argPtr2)
self
(toWidget labelWidget)
expanderGetLabelWidget :: Expander
-> IO Widget
expanderGetLabelWidget self =
makeNewObject mkWidget $
(\(Expander arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_expander_get_label_widget argPtr1)
self
expanderExpanded :: Attr Expander Bool
expanderExpanded = newAttr
expanderGetExpanded
expanderSetExpanded
expanderLabel :: Attr Expander String
expanderLabel = newAttr
expanderGetLabel
expanderSetLabel
expanderUseUnderline :: Attr Expander Bool
expanderUseUnderline = newAttr
expanderGetUseUnderline
expanderSetUseUnderline
expanderUseMarkup :: Attr Expander Bool
expanderUseMarkup = newAttr
expanderGetUseMarkup
expanderSetUseMarkup
expanderSpacing :: Attr Expander Int
expanderSpacing = newAttr
expanderGetSpacing
expanderSetSpacing
expanderLabelWidget :: WidgetClass labelWidget => ReadWriteAttr Expander Widget labelWidget
expanderLabelWidget = newAttr
expanderGetLabelWidget
expanderSetLabelWidget
expanderLabelFill :: Attr Expander Bool
expanderLabelFill = newAttrFromBoolProperty "label-fill"
onActivate, afterActivate :: Expander
-> IO ()
-> IO (ConnectId Expander)
onActivate = connect_NONE__NONE "activate" False
afterActivate = connect_NONE__NONE "activate" True
foreign import ccall safe "gtk_expander_new"
gtk_expander_new :: ((Ptr CChar) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_expander_new_with_mnemonic"
gtk_expander_new_with_mnemonic :: ((Ptr CChar) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_expander_set_expanded"
gtk_expander_set_expanded :: ((Ptr Expander) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_expander_get_expanded"
gtk_expander_get_expanded :: ((Ptr Expander) -> (IO CInt))
foreign import ccall safe "gtk_expander_set_spacing"
gtk_expander_set_spacing :: ((Ptr Expander) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_expander_get_spacing"
gtk_expander_get_spacing :: ((Ptr Expander) -> (IO CInt))
foreign import ccall safe "gtk_expander_set_label"
gtk_expander_set_label :: ((Ptr Expander) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_expander_get_label"
gtk_expander_get_label :: ((Ptr Expander) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_expander_set_use_underline"
gtk_expander_set_use_underline :: ((Ptr Expander) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_expander_get_use_underline"
gtk_expander_get_use_underline :: ((Ptr Expander) -> (IO CInt))
foreign import ccall safe "gtk_expander_set_use_markup"
gtk_expander_set_use_markup :: ((Ptr Expander) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_expander_get_use_markup"
gtk_expander_get_use_markup :: ((Ptr Expander) -> (IO CInt))
foreign import ccall safe "gtk_expander_set_label_widget"
gtk_expander_set_label_widget :: ((Ptr Expander) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_expander_get_label_widget"
gtk_expander_get_label_widget :: ((Ptr Expander) -> (IO (Ptr Widget)))