module Graphics.UI.Gtk.Abstract.Paned (
Paned,
PanedClass,
castToPaned, gTypePaned,
toPaned,
panedAdd1,
panedAdd2,
panedPack1,
panedPack2,
panedSetPosition,
panedGetPosition,
panedGetChild1,
panedGetChild2,
panedGetHandleWindow,
panedPosition,
panedPositionSet,
panedMinPosition,
panedMaxPosition,
panedChildResize,
panedChildShrink,
onCycleChildFocus,
afterCycleChildFocus,
onToggleHandleFocus,
afterToggleHandleFocus,
onMoveHandle,
afterMoveHandle,
onCycleHandleFocus,
afterCycleHandleFocus,
onAcceptPosition,
afterAcceptPosition,
onCancelPosition,
afterCancelPosition,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Attributes
import System.Glib.Properties
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
import Graphics.UI.Gtk.Signals
import Graphics.UI.Gtk.General.Enums (ScrollType)
import Graphics.UI.Gtk.Abstract.ContainerChildProperties
panedAdd1 :: (PanedClass self, WidgetClass child) => self
-> child
-> IO ()
panedAdd1 self child =
(\(Paned arg1) (Widget arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_paned_add1 argPtr1 argPtr2)
(toPaned self)
(toWidget child)
panedAdd2 :: (PanedClass self, WidgetClass child) => self
-> child
-> IO ()
panedAdd2 self child =
(\(Paned arg1) (Widget arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_paned_add2 argPtr1 argPtr2)
(toPaned self)
(toWidget child)
panedPack1 :: (PanedClass self, WidgetClass child) => self
-> child
-> Bool
-> Bool
-> IO ()
panedPack1 self child resize shrink =
(\(Paned arg1) (Widget arg2) arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_paned_pack1 argPtr1 argPtr2 arg3 arg4)
(toPaned self)
(toWidget child)
(fromBool resize)
(fromBool shrink)
panedPack2 :: (PanedClass self, WidgetClass child) => self
-> child
-> Bool
-> Bool
-> IO ()
panedPack2 self child resize shrink =
(\(Paned arg1) (Widget arg2) arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_paned_pack2 argPtr1 argPtr2 arg3 arg4)
(toPaned self)
(toWidget child)
(fromBool resize)
(fromBool shrink)
panedSetPosition :: PanedClass self => self
-> Int
-> IO ()
panedSetPosition self position =
(\(Paned arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_paned_set_position argPtr1 arg2)
(toPaned self)
(fromIntegral position)
panedGetPosition :: PanedClass self => self
-> IO Int
panedGetPosition self =
liftM fromIntegral $
(\(Paned arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_paned_get_position argPtr1)
(toPaned self)
panedGetChild1 :: PanedClass self => self
-> IO (Maybe Widget)
panedGetChild1 self =
maybeNull (makeNewObject mkWidget) $
(\(Paned arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_paned_get_child1 argPtr1)
(toPaned self)
panedGetChild2 :: PanedClass self => self
-> IO (Maybe Widget)
panedGetChild2 self =
maybeNull (makeNewObject mkWidget) $
(\(Paned arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_paned_get_child2 argPtr1)
(toPaned self)
panedGetHandleWindow :: PanedClass self => self
-> IO DrawWindow
panedGetHandleWindow self =
makeNewGObject mkDrawWindow $
(\(Paned arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_paned_get_handle_window argPtr1)
(toPaned self)
panedPosition :: PanedClass self => Attr self Int
panedPosition = newAttr
panedGetPosition
panedSetPosition
panedPositionSet :: PanedClass self => Attr self Bool
panedPositionSet = newAttrFromBoolProperty "position-set"
panedMinPosition :: PanedClass self => ReadAttr self Int
panedMinPosition = readAttrFromIntProperty "min-position"
panedMaxPosition :: PanedClass self => ReadAttr self Int
panedMaxPosition = readAttrFromIntProperty "max-position"
panedChildResize :: (PanedClass self, WidgetClass child) => child -> Attr self Bool
panedChildResize = newAttrFromContainerChildBoolProperty "resize"
panedChildShrink :: (PanedClass self, WidgetClass child) => child -> Attr self Bool
panedChildShrink = newAttrFromContainerChildBoolProperty "shrink"
onCycleChildFocus, afterCycleChildFocus :: PanedClass self => self
-> (Bool -> IO Bool)
-> IO (ConnectId self)
onCycleChildFocus = connect_BOOL__BOOL "cycle_child_focus" False
afterCycleChildFocus = connect_BOOL__BOOL "cycle_child_focus" True
onToggleHandleFocus, afterToggleHandleFocus :: PanedClass self => self
-> IO Bool
-> IO (ConnectId self)
onToggleHandleFocus = connect_NONE__BOOL "toggle_handle_focus" False
afterToggleHandleFocus = connect_NONE__BOOL "toggle_handle_focus" True
onMoveHandle, afterMoveHandle :: PanedClass self => self
-> (ScrollType -> IO Bool)
-> IO (ConnectId self)
onMoveHandle = connect_ENUM__BOOL "move_handle" False
afterMoveHandle = connect_ENUM__BOOL "move_handle" True
onCycleHandleFocus, afterCycleHandleFocus :: PanedClass self => self
-> (Bool -> IO Bool)
-> IO (ConnectId self)
onCycleHandleFocus = connect_BOOL__BOOL "cycle_handle_focus" False
afterCycleHandleFocus = connect_BOOL__BOOL "cycle_handle_focus" True
onAcceptPosition, afterAcceptPosition :: PanedClass self => self
-> IO Bool
-> IO (ConnectId self)
onAcceptPosition = connect_NONE__BOOL "accept_position" False
afterAcceptPosition = connect_NONE__BOOL "accept_position" True
onCancelPosition, afterCancelPosition :: PanedClass self => self
-> IO Bool
-> IO (ConnectId self)
onCancelPosition = connect_NONE__BOOL "cancel_position" False
afterCancelPosition = connect_NONE__BOOL "cancel_position" True
foreign import ccall safe "gtk_paned_add1"
gtk_paned_add1 :: ((Ptr Paned) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_paned_add2"
gtk_paned_add2 :: ((Ptr Paned) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_paned_pack1"
gtk_paned_pack1 :: ((Ptr Paned) -> ((Ptr Widget) -> (CInt -> (CInt -> (IO ())))))
foreign import ccall safe "gtk_paned_pack2"
gtk_paned_pack2 :: ((Ptr Paned) -> ((Ptr Widget) -> (CInt -> (CInt -> (IO ())))))
foreign import ccall safe "gtk_paned_set_position"
gtk_paned_set_position :: ((Ptr Paned) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_paned_get_position"
gtk_paned_get_position :: ((Ptr Paned) -> (IO CInt))
foreign import ccall unsafe "gtk_paned_get_child1"
gtk_paned_get_child1 :: ((Ptr Paned) -> (IO (Ptr Widget)))
foreign import ccall unsafe "gtk_paned_get_child2"
gtk_paned_get_child2 :: ((Ptr Paned) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_paned_get_handle_window"
gtk_paned_get_handle_window :: ((Ptr Paned) -> (IO (Ptr DrawWindow)))