module Graphics.UI.Gtk.MenuComboToolbar.ToolItemGroup (
ToolItemGroup,
ToolItemGroupClass,
castToToolItemGroup,
toToolItemGroup,
toolItemGroupNew,
toolItemGroupGetDropItem,
toolItemGroupGetItemPosition,
toolItemGroupGetNItems,
toolItemGroupGetNthItem,
toolItemGroupInsert,
toolItemGroupSetItemPosition,
toolItemGroupCollapsed,
toolItemGroupEllipsize,
toolItemGroupHeaderRelief,
toolItemGroupLabel,
toolItemGroupLabelWidget,
toolItemGroupChildExpand,
toolItemGroupChildFill,
toolItemGroupChildHomogeneous,
toolItemGroupChildNewRow,
toolItemGroupChildPosition,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Attributes
import System.Glib.Properties
import System.Glib.UTFString
import Graphics.Rendering.Pango.Enums (EllipsizeMode (..))
import Graphics.UI.Gtk.General.Enums (ReliefStyle(..))
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
toolItemGroupNew :: GlibString string => string
-> IO ToolItemGroup
toolItemGroupNew label =
makeNewObject mkToolItemGroup $
liftM (castPtr :: Ptr Widget -> Ptr ToolItemGroup) $
withUTFString label $ \ labelPtr ->
gtk_tool_item_group_new
labelPtr
toolItemGroupGetDropItem :: ToolItemGroupClass self => self
-> (Int, Int)
-> IO ToolItem
toolItemGroupGetDropItem group (x, y) =
makeNewObject mkToolItem $
(\(ToolItemGroup arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_tool_item_group_get_drop_item argPtr1 arg2 arg3)
(toToolItemGroup group)
(fromIntegral x)
(fromIntegral y)
toolItemGroupGetItemPosition :: (ToolItemGroupClass group, ToolItemClass item)
=> group
-> item
-> IO Int
toolItemGroupGetItemPosition group item =
liftM fromIntegral $
(\(ToolItemGroup arg1) (ToolItem arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_tool_item_group_get_item_position argPtr1 argPtr2)
(toToolItemGroup group)
(toToolItem item)
toolItemGroupGetNItems :: ToolItemGroupClass group => group
-> IO Int
toolItemGroupGetNItems group =
liftM fromIntegral $
(\(ToolItemGroup arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_tool_item_group_get_n_items argPtr1)
(toToolItemGroup group)
toolItemGroupGetNthItem :: ToolItemGroupClass group => group
-> Int
-> IO ToolItem
toolItemGroupGetNthItem group index =
makeNewObject mkToolItem $
(\(ToolItemGroup arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_tool_item_group_get_nth_item argPtr1 arg2)
(toToolItemGroup group)
(fromIntegral index)
toolItemGroupInsert :: (ToolItemGroupClass group, ToolItemClass item)
=> group
-> item
-> Int
-> IO ()
toolItemGroupInsert group item position =
(\(ToolItemGroup arg1) (ToolItem arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_tool_item_group_insert argPtr1 argPtr2 arg3)
(toToolItemGroup group)
(toToolItem item)
(fromIntegral position)
toolItemGroupSetItemPosition :: (ToolItemGroupClass group, ToolItemClass item)
=> group
-> item
-> Int
-> IO ()
toolItemGroupSetItemPosition group item position =
(\(ToolItemGroup arg1) (ToolItem arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_tool_item_group_set_item_position argPtr1 argPtr2 arg3)
(toToolItemGroup group)
(toToolItem item)
(fromIntegral position)
toolItemGroupCollapsed :: ToolItemGroupClass group => Attr group Bool
toolItemGroupCollapsed =
newAttrFromBoolProperty "collapsed"
toolItemGroupEllipsize :: ToolItemGroupClass group => Attr group EllipsizeMode
toolItemGroupEllipsize =
newAttrFromEnumProperty "ellipsize"
pango_ellipsize_mode_get_type
toolItemGroupHeaderRelief :: ToolItemGroupClass group => Attr group ReliefStyle
toolItemGroupHeaderRelief =
newAttrFromEnumProperty "header-relief"
gtk_relief_style_get_type
toolItemGroupLabel :: GlibString string => ToolItemGroupClass group => Attr group string
toolItemGroupLabel =
newAttrFromStringProperty "label"
toolItemGroupLabelWidget :: ToolItemGroupClass group => Attr group Widget
toolItemGroupLabelWidget =
newAttrFromObjectProperty "label-widget"
gtk_widget_get_type
toolItemGroupChildExpand :: ToolItemGroupClass group => Attr group Bool
toolItemGroupChildExpand =
newAttrFromBoolProperty "expand"
toolItemGroupChildFill :: ToolItemGroupClass group => Attr group Bool
toolItemGroupChildFill =
newAttrFromBoolProperty "fill"
toolItemGroupChildHomogeneous :: ToolItemGroupClass group => Attr group Bool
toolItemGroupChildHomogeneous =
newAttrFromBoolProperty "homogeneous"
toolItemGroupChildNewRow :: ToolItemGroupClass group => Attr group Bool
toolItemGroupChildNewRow =
newAttrFromBoolProperty "new-row"
toolItemGroupChildPosition :: ToolItemGroupClass group => Attr group Int
toolItemGroupChildPosition =
newAttrFromIntProperty "position"
foreign import ccall safe "gtk_tool_item_group_new"
gtk_tool_item_group_new :: ((Ptr CChar) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_tool_item_group_get_drop_item"
gtk_tool_item_group_get_drop_item :: ((Ptr ToolItemGroup) -> (CInt -> (CInt -> (IO (Ptr ToolItem)))))
foreign import ccall safe "gtk_tool_item_group_get_item_position"
gtk_tool_item_group_get_item_position :: ((Ptr ToolItemGroup) -> ((Ptr ToolItem) -> (IO CInt)))
foreign import ccall safe "gtk_tool_item_group_get_n_items"
gtk_tool_item_group_get_n_items :: ((Ptr ToolItemGroup) -> (IO CUInt))
foreign import ccall safe "gtk_tool_item_group_get_nth_item"
gtk_tool_item_group_get_nth_item :: ((Ptr ToolItemGroup) -> (CUInt -> (IO (Ptr ToolItem))))
foreign import ccall safe "gtk_tool_item_group_insert"
gtk_tool_item_group_insert :: ((Ptr ToolItemGroup) -> ((Ptr ToolItem) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_tool_item_group_set_item_position"
gtk_tool_item_group_set_item_position :: ((Ptr ToolItemGroup) -> ((Ptr ToolItem) -> (CInt -> (IO ()))))
foreign import ccall unsafe "pango_ellipsize_mode_get_type"
pango_ellipsize_mode_get_type :: CULong
foreign import ccall unsafe "gtk_relief_style_get_type"
gtk_relief_style_get_type :: CULong
foreign import ccall unsafe "gtk_widget_get_type"
gtk_widget_get_type :: CULong