{-# LINE 2 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
module Graphics.UI.Gtk.Layout.Notebook (
Notebook,
NotebookClass,
NotebookPage,
castToNotebook, gTypeNotebook,
toNotebook,
notebookNew,
notebookAppendPage,
notebookAppendPageMenu,
notebookPrependPage,
notebookPrependPageMenu,
notebookInsertPage,
notebookInsertPageMenu,
notebookRemovePage,
notebookPageNum,
notebookSetCurrentPage,
notebookNextPage,
notebookPrevPage,
notebookReorderChild,
PositionType(..),
notebookSetTabPos,
notebookGetTabPos,
notebookSetShowTabs,
notebookGetShowTabs,
notebookSetShowBorder,
notebookGetShowBorder,
notebookSetScrollable,
notebookGetScrollable,
notebookSetTabBorder,
notebookSetTabHBorder,
notebookSetTabVBorder,
notebookSetPopup,
notebookGetCurrentPage,
notebookSetMenuLabel,
notebookGetMenuLabel,
notebookSetMenuLabelText,
notebookGetMenuLabelText,
notebookGetNthPage,
notebookGetNPages,
notebookGetTabLabel,
notebookGetTabLabelText,
Packing(..), PackType(..),
notebookQueryTabLabelPacking,
notebookSetTabLabelPacking,
notebookSetHomogeneousTabs,
notebookSetTabLabel,
notebookSetTabLabelText,
notebookSetTabReorderable,
notebookGetTabReorderable,
notebookSetTabDetachable,
notebookGetTabDetachable,
notebookSetActionWidget,
notebookGetActionWidget,
notebookPage,
notebookTabPos,
notebookTabBorder,
notebookTabHborder,
notebookTabVborder,
notebookShowTabs,
notebookShowBorder,
notebookScrollable,
notebookEnablePopup,
notebookHomogeneous,
notebookCurrentPage,
notebookChildTabLabel,
notebookChildMenuLabel,
notebookChildPosition,
notebookChildTabPacking,
notebookChildTabPackType,
notebookChildDetachable,
notebookChildReorderable,
notebookChildTabExpand,
notebookChildTabFill,
notebookStyleArrowSpacing,
notebookStyleHasBackwardStepper,
notebookStyleHasForwardStepper,
notebookStyleHasSecondaryBackwardStepper,
notebookStyleHasSecondaryForwardStepper,
notebookStyleTabCurvature,
notebookStyleTabOverlap,
switchPage,
pageAdded,
pageRemoved,
pageReordered,
onSwitchPage,
afterSwitchPage
) 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 (makeNewObject)
import Graphics.UI.Gtk.Types
{-# LINE 199 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
import Graphics.UI.Gtk.Signals
{-# LINE 200 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
import Graphics.UI.Gtk.Abstract.ContainerChildProperties
import Graphics.UI.Gtk.Display.Label (labelNew)
import Graphics.UI.Gtk.General.Enums (Packing(..), toPacking, fromPacking,
PackType(..), PositionType(..))
{-# LINE 206 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
newtype NotebookPage = NotebookPage (ForeignPtr (NotebookPage))
{-# LINE 209 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
_ignoreNotebookPage = NotebookPage
notebookNew :: IO Notebook
notebookNew :: IO Notebook
notebookNew =
(ForeignPtr Notebook -> Notebook, FinalizerPtr Notebook)
-> IO (Ptr Notebook) -> IO Notebook
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Notebook -> Notebook, FinalizerPtr Notebook)
forall {a}. (ForeignPtr Notebook -> Notebook, FinalizerPtr a)
mkNotebook (IO (Ptr Notebook) -> IO Notebook)
-> IO (Ptr Notebook) -> IO Notebook
forall a b. (a -> b) -> a -> b
$
(Ptr Widget -> Ptr Notebook)
-> IO (Ptr Widget) -> IO (Ptr Notebook)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr Widget -> Ptr Notebook
forall a b. Ptr a -> Ptr b
castPtr :: Ptr Widget -> Ptr Notebook) (IO (Ptr Widget) -> IO (Ptr Notebook))
-> IO (Ptr Widget) -> IO (Ptr Notebook)
forall a b. (a -> b) -> a -> b
$
IO (Ptr Widget)
gtk_notebook_new
{-# LINE 222 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
notebookAppendPage :: (NotebookClass self, WidgetClass child, GlibString string) => self
-> child
-> string
-> IO Int
notebookAppendPage :: forall self child string.
(NotebookClass self, WidgetClass child, GlibString string) =>
self -> child -> string -> IO Int
notebookAppendPage self
self child
child string
tabLabel = do
Label
tab <- Maybe string -> IO Label
forall string. GlibString string => Maybe string -> IO Label
labelNew (string -> Maybe string
forall a. a -> Maybe a
Just string
tabLabel)
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) (Widget ForeignPtr Widget
arg3) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg3 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr3 ->Ptr Notebook -> Ptr Widget -> Ptr Widget -> IO CInt
gtk_notebook_append_page Ptr Notebook
argPtr1 Ptr Widget
argPtr2 Ptr Widget
argPtr3)
{-# LINE 245 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Label -> Widget
forall o. WidgetClass o => o -> Widget
toWidget Label
tab)
{-# LINE 272 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
notebookAppendPageMenu :: (NotebookClass self, WidgetClass child,
WidgetClass tabLabel, WidgetClass menuLabel) => self
-> child
-> tabLabel
-> menuLabel
-> IO Int
self
self child
child tabLabel
tabLabel menuLabel
menuLabel =
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) (Widget ForeignPtr Widget
arg3) (Widget ForeignPtr Widget
arg4) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg3 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr3 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg4 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr4 ->Ptr Notebook -> Ptr Widget -> Ptr Widget -> Ptr Widget -> IO CInt
gtk_notebook_append_page_menu Ptr Notebook
argPtr1 Ptr Widget
argPtr2 Ptr Widget
argPtr3 Ptr Widget
argPtr4)
{-# LINE 293 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(tabLabel -> Widget
forall o. WidgetClass o => o -> Widget
toWidget tabLabel
tabLabel)
(menuLabel -> Widget
forall o. WidgetClass o => o -> Widget
toWidget menuLabel
menuLabel)
{-# LINE 325 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
notebookPrependPage :: (NotebookClass self, WidgetClass child, GlibString string) => self
-> child
-> string
-> IO Int
notebookPrependPage :: forall self child string.
(NotebookClass self, WidgetClass child, GlibString string) =>
self -> child -> string -> IO Int
notebookPrependPage self
self child
child string
tabLabel = do
Label
tab <- Maybe string -> IO Label
forall string. GlibString string => Maybe string -> IO Label
labelNew (string -> Maybe string
forall a. a -> Maybe a
Just string
tabLabel)
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) (Widget ForeignPtr Widget
arg3) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg3 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr3 ->Ptr Notebook -> Ptr Widget -> Ptr Widget -> IO CInt
gtk_notebook_prepend_page Ptr Notebook
argPtr1 Ptr Widget
argPtr2 Ptr Widget
argPtr3)
{-# LINE 343 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Label -> Widget
forall o. WidgetClass o => o -> Widget
toWidget Label
tab)
{-# LINE 370 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
notebookPrependPageMenu :: (NotebookClass self, WidgetClass child,
WidgetClass tabLabel, WidgetClass menuLabel) => self
-> child
-> tabLabel
-> menuLabel
-> IO Int
self
self child
child tabLabel
tabLabel menuLabel
menuLabel =
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) (Widget ForeignPtr Widget
arg3) (Widget ForeignPtr Widget
arg4) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg3 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr3 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg4 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr4 ->Ptr Notebook -> Ptr Widget -> Ptr Widget -> Ptr Widget -> IO CInt
gtk_notebook_prepend_page_menu Ptr Notebook
argPtr1 Ptr Widget
argPtr2 Ptr Widget
argPtr3 Ptr Widget
argPtr4)
{-# LINE 391 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(tabLabel -> Widget
forall o. WidgetClass o => o -> Widget
toWidget tabLabel
tabLabel)
(menuLabel -> Widget
forall o. WidgetClass o => o -> Widget
toWidget menuLabel
menuLabel)
{-# LINE 422 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
notebookInsertPage :: (NotebookClass self, WidgetClass child, GlibString string) => self
-> child
-> string
-> Int
-> IO Int
notebookInsertPage :: forall self child string.
(NotebookClass self, WidgetClass child, GlibString string) =>
self -> child -> string -> Int -> IO Int
notebookInsertPage self
self child
child string
tabLabel Int
position = do
Label
tab <- Maybe string -> IO Label
forall string. GlibString string => Maybe string -> IO Label
labelNew (string -> Maybe string
forall a. a -> Maybe a
Just string
tabLabel)
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) (Widget ForeignPtr Widget
arg3) CInt
arg4 -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg3 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr3 ->Ptr Notebook -> Ptr Widget -> Ptr Widget -> CInt -> IO CInt
gtk_notebook_insert_page Ptr Notebook
argPtr1 Ptr Widget
argPtr2 Ptr Widget
argPtr3 CInt
arg4)
{-# LINE 442 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Label -> Widget
forall o. WidgetClass o => o -> Widget
toWidget Label
tab)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
position)
{-# LINE 473 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
notebookInsertPageMenu :: (NotebookClass self, WidgetClass child,
WidgetClass tabLabel, WidgetClass menuLabel) => self
-> child
-> tabLabel
-> menuLabel
-> Int
-> IO Int
self
self child
child tabLabel
tabLabel menuLabel
menuLabel Int
position =
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) (Widget ForeignPtr Widget
arg3) (Widget ForeignPtr Widget
arg4) CInt
arg5 -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg3 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr3 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg4 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr4 ->Ptr Notebook
-> Ptr Widget -> Ptr Widget -> Ptr Widget -> CInt -> IO CInt
gtk_notebook_insert_page_menu Ptr Notebook
argPtr1 Ptr Widget
argPtr2 Ptr Widget
argPtr3 Ptr Widget
argPtr4 CInt
arg5)
{-# LINE 496 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(tabLabel -> Widget
forall o. WidgetClass o => o -> Widget
toWidget tabLabel
tabLabel)
(menuLabel -> Widget
forall o. WidgetClass o => o -> Widget
toWidget menuLabel
menuLabel)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
position)
{-# LINE 526 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
notebookRemovePage :: NotebookClass self => self
-> Int
-> IO ()
notebookRemovePage :: forall self. NotebookClass self => self -> Int -> IO ()
notebookRemovePage self
self Int
pageNum =
(\(Notebook ForeignPtr Notebook
arg1) CInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CInt -> IO ()
gtk_notebook_remove_page Ptr Notebook
argPtr1 CInt
arg2)
{-# LINE 534 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pageNum)
notebookPageNum :: (NotebookClass self, WidgetClass w) => self
-> w
-> IO (Maybe Int)
notebookPageNum :: forall self w.
(NotebookClass self, WidgetClass w) =>
self -> w -> IO (Maybe Int)
notebookPageNum self
nb w
child =
(CInt -> Maybe Int) -> IO CInt -> IO (Maybe Int)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (\CInt
page -> if CInt
pageCInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
==(-CInt
1) then Maybe Int
forall a. Maybe a
Nothing else Int -> Maybe Int
forall a. a -> Maybe a
Just (CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
page)) (IO CInt -> IO (Maybe Int)) -> IO CInt -> IO (Maybe Int)
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> IO CInt
gtk_notebook_page_num Ptr Notebook
argPtr1 Ptr Widget
argPtr2)
{-# LINE 548 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook nb)
(w -> Widget
forall o. WidgetClass o => o -> Widget
toWidget w
child)
notebookSetCurrentPage :: NotebookClass self => self
-> Int
-> IO ()
notebookSetCurrentPage :: forall self. NotebookClass self => self -> Int -> IO ()
notebookSetCurrentPage self
self Int
pageNum =
(\(Notebook ForeignPtr Notebook
arg1) CInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CInt -> IO ()
gtk_notebook_set_current_page Ptr Notebook
argPtr1 CInt
arg2)
{-# LINE 566 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pageNum)
notebookNextPage :: NotebookClass self => self -> IO ()
notebookNextPage :: forall self. NotebookClass self => self -> IO ()
notebookNextPage self
self =
(\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO ()
gtk_notebook_next_page Ptr Notebook
argPtr1)
{-# LINE 575 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
notebookPrevPage :: NotebookClass self => self -> IO ()
notebookPrevPage :: forall self. NotebookClass self => self -> IO ()
notebookPrevPage self
self =
(\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO ()
gtk_notebook_prev_page Ptr Notebook
argPtr1)
{-# LINE 583 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
notebookReorderChild :: (NotebookClass self, WidgetClass child) => self
-> child
-> Int
-> IO ()
notebookReorderChild :: forall self child.
(NotebookClass self, WidgetClass child) =>
self -> child -> Int -> IO ()
notebookReorderChild self
self child
child Int
position =
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) CInt
arg3 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> CInt -> IO ()
gtk_notebook_reorder_child Ptr Notebook
argPtr1 Ptr Widget
argPtr2 CInt
arg3)
{-# LINE 595 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
position)
notebookSetTabPos :: NotebookClass self => self
-> PositionType
-> IO ()
notebookSetTabPos :: forall self. NotebookClass self => self -> PositionType -> IO ()
notebookSetTabPos self
self PositionType
pos =
(\(Notebook ForeignPtr Notebook
arg1) CInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CInt -> IO ()
gtk_notebook_set_tab_pos Ptr Notebook
argPtr1 CInt
arg2)
{-# LINE 607 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (PositionType -> Int) -> PositionType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PositionType -> Int
forall a. Enum a => a -> Int
fromEnum) PositionType
pos)
notebookGetTabPos :: NotebookClass self => self
-> IO PositionType
notebookGetTabPos :: forall self. NotebookClass self => self -> IO PositionType
notebookGetTabPos self
self =
(CInt -> PositionType) -> IO CInt -> IO PositionType
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> PositionType
forall a. Enum a => Int -> a
toEnum (Int -> PositionType) -> (CInt -> Int) -> CInt -> PositionType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) (IO CInt -> IO PositionType) -> IO CInt -> IO PositionType
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO CInt
gtk_notebook_get_tab_pos Ptr Notebook
argPtr1)
{-# LINE 618 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
notebookSetShowTabs :: NotebookClass self => self
-> Bool
-> IO ()
notebookSetShowTabs :: forall self. NotebookClass self => self -> Bool -> IO ()
notebookSetShowTabs self
self Bool
showTabs =
(\(Notebook ForeignPtr Notebook
arg1) CInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CInt -> IO ()
gtk_notebook_set_show_tabs Ptr Notebook
argPtr1 CInt
arg2)
{-# LINE 627 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
showTabs)
notebookGetShowTabs :: NotebookClass self => self
-> IO Bool
notebookGetShowTabs :: forall self. NotebookClass self => self -> IO Bool
notebookGetShowTabs self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO CInt
gtk_notebook_get_show_tabs Ptr Notebook
argPtr1)
{-# LINE 638 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
notebookSetShowBorder :: NotebookClass self => self
-> Bool
-> IO ()
notebookSetShowBorder :: forall self. NotebookClass self => self -> Bool -> IO ()
notebookSetShowBorder self
self Bool
showBorder =
(\(Notebook ForeignPtr Notebook
arg1) CInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CInt -> IO ()
gtk_notebook_set_show_border Ptr Notebook
argPtr1 CInt
arg2)
{-# LINE 649 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
showBorder)
notebookGetShowBorder :: NotebookClass self => self
-> IO Bool
notebookGetShowBorder :: forall self. NotebookClass self => self -> IO Bool
notebookGetShowBorder self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO CInt
gtk_notebook_get_show_border Ptr Notebook
argPtr1)
{-# LINE 660 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
notebookSetScrollable :: NotebookClass self => self
-> Bool
-> IO ()
notebookSetScrollable :: forall self. NotebookClass self => self -> Bool -> IO ()
notebookSetScrollable self
self Bool
scrollable =
(\(Notebook ForeignPtr Notebook
arg1) CInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CInt -> IO ()
gtk_notebook_set_scrollable Ptr Notebook
argPtr1 CInt
arg2)
{-# LINE 670 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
scrollable)
notebookGetScrollable :: NotebookClass self => self
-> IO Bool
notebookGetScrollable :: forall self. NotebookClass self => self -> IO Bool
notebookGetScrollable self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO CInt
gtk_notebook_get_scrollable Ptr Notebook
argPtr1)
{-# LINE 681 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
notebookSetTabBorder :: NotebookClass self => self
-> Int
-> IO ()
notebookSetTabBorder :: forall self. NotebookClass self => self -> Int -> IO ()
notebookSetTabBorder self
self Int
borderWidth =
(\(Notebook ForeignPtr Notebook
arg1) CUInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CUInt -> IO ()
gtk_notebook_set_tab_border Ptr Notebook
argPtr1 CUInt
arg2)
{-# LINE 698 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
borderWidth)
notebookSetTabHBorder :: NotebookClass self => self
-> Int
-> IO ()
notebookSetTabHBorder :: forall self. NotebookClass self => self -> Int -> IO ()
notebookSetTabHBorder self
self Int
tabHborder =
(\(Notebook ForeignPtr Notebook
arg1) CUInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CUInt -> IO ()
gtk_notebook_set_tab_hborder Ptr Notebook
argPtr1 CUInt
arg2)
{-# LINE 712 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
tabHborder)
notebookSetTabVBorder :: NotebookClass self => self
-> Int
-> IO ()
notebookSetTabVBorder :: forall self. NotebookClass self => self -> Int -> IO ()
notebookSetTabVBorder self
self Int
tabVborder =
(\(Notebook ForeignPtr Notebook
arg1) CUInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CUInt -> IO ()
gtk_notebook_set_tab_vborder Ptr Notebook
argPtr1 CUInt
arg2)
{-# LINE 726 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
tabVborder)
notebookSetPopup :: NotebookClass self => self -> Bool -> IO ()
self
self Bool
enable =
(if Bool
enable
then (\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO ()
gtk_notebook_popup_enable Ptr Notebook
argPtr1)
{-# LINE 738 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
else (\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO ()
gtk_notebook_popup_disable Ptr Notebook
argPtr1))
(self -> Notebook
forall o. NotebookClass o => o -> Notebook
toNotebook self
self)
notebookGetCurrentPage :: NotebookClass self => self
-> IO Int
notebookGetCurrentPage :: forall self. NotebookClass self => self -> IO Int
notebookGetCurrentPage self
self =
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO CInt
gtk_notebook_get_current_page Ptr Notebook
argPtr1)
{-# LINE 749 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
notebookSetMenuLabel :: (NotebookClass self, WidgetClass child, WidgetClass menuLabel) => self
-> child
-> Maybe menuLabel
-> IO ()
self
self child
child Maybe menuLabel
menuLabel =
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) (Widget ForeignPtr Widget
arg3) -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg3 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr3 ->Ptr Notebook -> Ptr Widget -> Ptr Widget -> IO ()
gtk_notebook_set_menu_label Ptr Notebook
argPtr1 Ptr Widget
argPtr2 Ptr Widget
argPtr3)
{-# LINE 760 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Widget -> (menuLabel -> Widget) -> Maybe menuLabel -> Widget
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (ForeignPtr Widget -> Widget
Widget ForeignPtr Widget
forall a. ForeignPtr a
nullForeignPtr) menuLabel -> Widget
forall o. WidgetClass o => o -> Widget
toWidget Maybe menuLabel
menuLabel)
notebookGetMenuLabel :: (NotebookClass self, WidgetClass child) => self
-> child
-> IO (Maybe Widget)
self
self child
child =
(IO (Ptr Widget) -> IO Widget)
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
-> IO (Ptr Widget) -> IO Widget
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr Notebook
-> (Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget
-> (Ptr Widget -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Widget -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> IO (Ptr Widget)
gtk_notebook_get_menu_label Ptr Notebook
argPtr1 Ptr Widget
argPtr2)
{-# LINE 775 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
notebookSetMenuLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self
-> child
-> string
-> IO ()
self
self child
child string
menuText =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
menuText ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
menuTextPtr ->
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) CString
arg3 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> CString -> IO ()
gtk_notebook_set_menu_label_text Ptr Notebook
argPtr1 Ptr Widget
argPtr2 CString
arg3)
{-# LINE 787 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
CString
menuTextPtr
notebookGetMenuLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self
-> child
-> IO (Maybe string)
self
self child
child =
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CString) -> IO CString)
-> (Ptr Notebook -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CString) -> IO CString)
-> (Ptr Widget -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> IO CString
gtk_notebook_get_menu_label_text Ptr Notebook
argPtr1 Ptr Widget
argPtr2)
{-# LINE 802 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
IO CString -> (CString -> IO (Maybe string)) -> IO (Maybe string)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (CString -> IO string) -> CString -> IO (Maybe string)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek CString -> IO string
forall s. GlibString s => CString -> IO s
peekUTFString
notebookGetNthPage :: NotebookClass self => self
-> Int
-> IO (Maybe Widget)
notebookGetNthPage :: forall self. NotebookClass self => self -> Int -> IO (Maybe Widget)
notebookGetNthPage self
self Int
pageNum =
(IO (Ptr Widget) -> IO Widget)
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
-> IO (Ptr Widget) -> IO Widget
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) CInt
arg2 -> ForeignPtr Notebook
-> (Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CInt -> IO (Ptr Widget)
gtk_notebook_get_nth_page Ptr Notebook
argPtr1 CInt
arg2)
{-# LINE 816 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pageNum)
notebookGetNPages :: NotebookClass self => self -> IO Int
notebookGetNPages :: forall self. NotebookClass self => self -> IO Int
notebookGetNPages self
self =
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> IO CInt
gtk_notebook_get_n_pages Ptr Notebook
argPtr1)
{-# LINE 828 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
notebookGetTabLabel :: (NotebookClass self, WidgetClass child) => self
-> child
-> IO (Maybe Widget)
notebookGetTabLabel :: forall self child.
(NotebookClass self, WidgetClass child) =>
self -> child -> IO (Maybe Widget)
notebookGetTabLabel self
self child
child =
(IO (Ptr Widget) -> IO Widget)
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
-> IO (Ptr Widget) -> IO Widget
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr Notebook
-> (Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget
-> (Ptr Widget -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Widget -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> IO (Ptr Widget)
gtk_notebook_get_tab_label Ptr Notebook
argPtr1 Ptr Widget
argPtr2)
{-# LINE 841 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
notebookGetTabLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self
-> child
-> IO (Maybe string)
notebookGetTabLabelText :: forall self child string.
(NotebookClass self, WidgetClass child, GlibString string) =>
self -> child -> IO (Maybe string)
notebookGetTabLabelText self
self child
child =
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CString) -> IO CString)
-> (Ptr Notebook -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CString) -> IO CString)
-> (Ptr Widget -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> IO CString
gtk_notebook_get_tab_label_text Ptr Notebook
argPtr1 Ptr Widget
argPtr2)
{-# LINE 853 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
IO CString -> (CString -> IO (Maybe string)) -> IO (Maybe string)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (CString -> IO string) -> CString -> IO (Maybe string)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek CString -> IO string
forall s. GlibString s => CString -> IO s
peekUTFString
notebookQueryTabLabelPacking :: (NotebookClass self, WidgetClass child) => self
-> child
-> IO (Packing,PackType)
notebookQueryTabLabelPacking :: forall self child.
(NotebookClass self, WidgetClass child) =>
self -> child -> IO (Packing, PackType)
notebookQueryTabLabelPacking self
self child
child =
(Ptr CInt -> IO (Packing, PackType)) -> IO (Packing, PackType)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Packing, PackType)) -> IO (Packing, PackType))
-> (Ptr CInt -> IO (Packing, PackType)) -> IO (Packing, PackType)
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
expPtr ->
(Ptr CInt -> IO (Packing, PackType)) -> IO (Packing, PackType)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Packing, PackType)) -> IO (Packing, PackType))
-> (Ptr CInt -> IO (Packing, PackType)) -> IO (Packing, PackType)
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
fillPtr ->
(Ptr CInt -> IO (Packing, PackType)) -> IO (Packing, PackType)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Packing, PackType)) -> IO (Packing, PackType))
-> (Ptr CInt -> IO (Packing, PackType)) -> IO (Packing, PackType)
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
packPtr -> do
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) Ptr CInt
arg3 Ptr CInt
arg4 Ptr CInt
arg5 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook
-> Ptr Widget -> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO ()
gtk_notebook_query_tab_label_packing Ptr Notebook
argPtr1 Ptr Widget
argPtr2 Ptr CInt
arg3 Ptr CInt
arg4 Ptr CInt
arg5)
{-# LINE 870 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
Ptr CInt
expPtr
Ptr CInt
fillPtr
Ptr CInt
packPtr
Bool
expand <- (CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$ Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
expPtr
Bool
fill <- (CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$ Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
fillPtr
PackType
pt <- (CInt -> PackType) -> IO CInt -> IO PackType
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> PackType
forall a. Enum a => Int -> a
toEnum (Int -> PackType) -> (CInt -> Int) -> CInt -> PackType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) (IO CInt -> IO PackType) -> IO CInt -> IO PackType
forall a b. (a -> b) -> a -> b
$ Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
packPtr
(Packing, PackType) -> IO (Packing, PackType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool -> Bool -> Packing
toPacking Bool
expand Bool
fill, PackType
pt)
notebookSetTabLabelPacking :: (NotebookClass self, WidgetClass child) => self
-> child
-> Packing
-> PackType
-> IO ()
notebookSetTabLabelPacking :: forall self child.
(NotebookClass self, WidgetClass child) =>
self -> child -> Packing -> PackType -> IO ()
notebookSetTabLabelPacking self
self child
child Packing
pack PackType
packType =
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) CInt
arg3 CInt
arg4 CInt
arg5 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> CInt -> CInt -> CInt -> IO ()
gtk_notebook_set_tab_label_packing Ptr Notebook
argPtr1 Ptr Widget
argPtr2 CInt
arg3 CInt
arg4 CInt
arg5)
{-# LINE 892 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
expand)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
fill)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (PackType -> Int) -> PackType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PackType -> Int
forall a. Enum a => a -> Int
fromEnum) PackType
packType)
where (Bool
expand, Bool
fill) = Packing -> (Bool, Bool)
fromPacking Packing
pack
notebookSetHomogeneousTabs :: NotebookClass self => self
-> Bool
-> IO ()
notebookSetHomogeneousTabs :: forall self. NotebookClass self => self -> Bool -> IO ()
notebookSetHomogeneousTabs self
self Bool
homogeneous =
(\(Notebook ForeignPtr Notebook
arg1) CInt
arg2 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CInt -> IO ()
gtk_notebook_set_homogeneous_tabs Ptr Notebook
argPtr1 CInt
arg2)
{-# LINE 911 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
homogeneous)
notebookSetTabLabel :: (NotebookClass self, WidgetClass child, WidgetClass tabLabel) => self
-> child
-> tabLabel
-> IO ()
notebookSetTabLabel :: forall self child tabLabel.
(NotebookClass self, WidgetClass child, WidgetClass tabLabel) =>
self -> child -> tabLabel -> IO ()
notebookSetTabLabel self
self child
child tabLabel
tabLabel =
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) (Widget ForeignPtr Widget
arg3) -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg3 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr3 ->Ptr Notebook -> Ptr Widget -> Ptr Widget -> IO ()
gtk_notebook_set_tab_label Ptr Notebook
argPtr1 Ptr Widget
argPtr2 Ptr Widget
argPtr3)
{-# LINE 924 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(tabLabel -> Widget
forall o. WidgetClass o => o -> Widget
toWidget tabLabel
tabLabel)
notebookSetTabLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self
-> child
-> string
-> IO ()
notebookSetTabLabelText :: forall self child string.
(NotebookClass self, WidgetClass child, GlibString string) =>
self -> child -> string -> IO ()
notebookSetTabLabelText self
self child
child string
tabText =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
tabText ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
tabTextPtr ->
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) CString
arg3 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> CString -> IO ()
gtk_notebook_set_tab_label_text Ptr Notebook
argPtr1 Ptr Widget
argPtr2 CString
arg3)
{-# LINE 938 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
CString
tabTextPtr
notebookSetTabReorderable :: (NotebookClass self, WidgetClass child) => self
-> child
-> Bool
-> IO ()
notebookSetTabReorderable :: forall self child.
(NotebookClass self, WidgetClass child) =>
self -> child -> Bool -> IO ()
notebookSetTabReorderable self
self child
child Bool
reorderable =
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) CInt
arg3 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> CInt -> IO ()
gtk_notebook_set_tab_reorderable Ptr Notebook
argPtr1 Ptr Widget
argPtr2 CInt
arg3)
{-# LINE 953 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
reorderable)
notebookGetTabReorderable :: (NotebookClass self, WidgetClass child) => self
-> child
-> IO Bool
notebookGetTabReorderable :: forall self child.
(NotebookClass self, WidgetClass child) =>
self -> child -> IO Bool
notebookGetTabReorderable self
self child
child = (CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> IO CInt
gtk_notebook_get_tab_reorderable Ptr Notebook
argPtr1 Ptr Widget
argPtr2)
{-# LINE 966 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
notebookSetTabDetachable :: (NotebookClass self, WidgetClass child) => self
-> child
-> Bool
-> IO ()
notebookSetTabDetachable :: forall self child.
(NotebookClass self, WidgetClass child) =>
self -> child -> Bool -> IO ()
notebookSetTabDetachable self
self child
child Bool
detachable =
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) CInt
arg3 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> CInt -> IO ()
gtk_notebook_set_tab_detachable Ptr Notebook
argPtr1 Ptr Widget
argPtr2 CInt
arg3)
{-# LINE 986 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
detachable)
notebookGetTabDetachable :: (NotebookClass self, WidgetClass child) => self
-> child
-> IO Bool
notebookGetTabDetachable :: forall self child.
(NotebookClass self, WidgetClass child) =>
self -> child -> IO Bool
notebookGetTabDetachable self
self child
child = (CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr Notebook -> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO CInt) -> IO CInt)
-> (Ptr Notebook -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO CInt) -> IO CInt)
-> (Ptr Widget -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> IO CInt
gtk_notebook_get_tab_detachable Ptr Notebook
argPtr1 Ptr Widget
argPtr2)
{-# LINE 999 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
notebookSetActionWidget :: (NotebookClass self, WidgetClass widget) => self
-> widget
-> PackType
-> IO ()
notebookSetActionWidget :: forall self widget.
(NotebookClass self, WidgetClass widget) =>
self -> widget -> PackType -> IO ()
notebookSetActionWidget self
self widget
widget PackType
packType =
(\(Notebook ForeignPtr Notebook
arg1) (Widget ForeignPtr Widget
arg2) CInt
arg3 -> ForeignPtr Notebook -> (Ptr Notebook -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO ()) -> IO ())
-> (Ptr Notebook -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Notebook -> Ptr Widget -> CInt -> IO ()
gtk_notebook_set_action_widget Ptr Notebook
argPtr1 Ptr Widget
argPtr2 CInt
arg3)
{-# LINE 1019 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
(widget -> Widget
forall o. WidgetClass o => o -> Widget
toWidget widget
widget)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (PackType -> Int) -> PackType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PackType -> Int
forall a. Enum a => a -> Int
fromEnum) PackType
packType)
notebookGetActionWidget :: NotebookClass self => self
-> PackType
-> IO (Maybe Widget)
notebookGetActionWidget :: forall self.
NotebookClass self =>
self -> PackType -> IO (Maybe Widget)
notebookGetActionWidget self
self PackType
packType =
(IO (Ptr Widget) -> IO Widget)
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
-> IO (Ptr Widget) -> IO Widget
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$
(\(Notebook ForeignPtr Notebook
arg1) CInt
arg2 -> ForeignPtr Notebook
-> (Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Notebook
arg1 ((Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Notebook -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Notebook
argPtr1 ->Ptr Notebook -> CInt -> IO (Ptr Widget)
gtk_notebook_get_action_widget Ptr Notebook
argPtr1 CInt
arg2)
{-# LINE 1033 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
(toNotebook self)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (PackType -> Int) -> PackType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PackType -> Int
forall a. Enum a => a -> Int
fromEnum) PackType
packType)
notebookPage :: NotebookClass self => Attr self Int
notebookPage :: forall self. NotebookClass self => Attr self Int
notebookPage = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromIntProperty String
"page"
notebookTabPos :: NotebookClass self => Attr self PositionType
notebookTabPos :: forall self. NotebookClass self => Attr self PositionType
notebookTabPos = (self -> IO PositionType)
-> (self -> PositionType -> IO ())
-> ReadWriteAttr self PositionType PositionType
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO PositionType
forall self. NotebookClass self => self -> IO PositionType
notebookGetTabPos
self -> PositionType -> IO ()
forall self. NotebookClass self => self -> PositionType -> IO ()
notebookSetTabPos
notebookTabBorder :: NotebookClass self => WriteAttr self Int
notebookTabBorder :: forall self. NotebookClass self => WriteAttr self Int
notebookTabBorder = String -> WriteAttr self Int
forall gobj. GObjectClass gobj => String -> WriteAttr gobj Int
writeAttrFromUIntProperty String
"tab-border"
notebookTabHborder :: NotebookClass self => Attr self Int
notebookTabHborder :: forall self. NotebookClass self => Attr self Int
notebookTabHborder = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromUIntProperty String
"tab-hborder"
notebookTabVborder :: NotebookClass self => Attr self Int
notebookTabVborder :: forall self. NotebookClass self => Attr self Int
notebookTabVborder = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromUIntProperty String
"tab-vborder"
notebookShowTabs :: NotebookClass self => Attr self Bool
notebookShowTabs :: forall self. NotebookClass self => Attr self Bool
notebookShowTabs = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. NotebookClass self => self -> IO Bool
notebookGetShowTabs
self -> Bool -> IO ()
forall self. NotebookClass self => self -> Bool -> IO ()
notebookSetShowTabs
notebookShowBorder :: NotebookClass self => Attr self Bool
notebookShowBorder :: forall self. NotebookClass self => Attr self Bool
notebookShowBorder = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. NotebookClass self => self -> IO Bool
notebookGetShowBorder
self -> Bool -> IO ()
forall self. NotebookClass self => self -> Bool -> IO ()
notebookSetShowBorder
notebookScrollable :: NotebookClass self => Attr self Bool
notebookScrollable :: forall self. NotebookClass self => Attr self Bool
notebookScrollable = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. NotebookClass self => self -> IO Bool
notebookGetScrollable
self -> Bool -> IO ()
forall self. NotebookClass self => self -> Bool -> IO ()
notebookSetScrollable
notebookEnablePopup :: NotebookClass self => Attr self Bool
= String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"enable-popup"
notebookHomogeneous :: NotebookClass self => Attr self Bool
notebookHomogeneous :: forall self. NotebookClass self => Attr self Bool
notebookHomogeneous = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"homogeneous"
notebookCurrentPage :: NotebookClass self => Attr self Int
notebookCurrentPage :: forall self. NotebookClass self => Attr self Int
notebookCurrentPage = (self -> IO Int)
-> (self -> Int -> IO ()) -> ReadWriteAttr self Int Int
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Int
forall self. NotebookClass self => self -> IO Int
notebookGetCurrentPage
self -> Int -> IO ()
forall self. NotebookClass self => self -> Int -> IO ()
notebookSetCurrentPage
notebookChildTabLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string
notebookChildTabLabel :: forall self child string.
(NotebookClass self, WidgetClass child, GlibString string) =>
child -> Attr self string
notebookChildTabLabel = String -> child -> Attr self string
forall container child string.
(ContainerClass container, WidgetClass child, GlibString string) =>
String -> child -> Attr container string
newAttrFromContainerChildStringProperty String
"tab-label"
notebookChildMenuLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string
= String -> child -> Attr self string
forall container child string.
(ContainerClass container, WidgetClass child, GlibString string) =>
String -> child -> Attr container string
newAttrFromContainerChildStringProperty String
"menu-label"
notebookChildPosition :: (NotebookClass self, WidgetClass child) => child -> Attr self Int
notebookChildPosition :: forall self child.
(NotebookClass self, WidgetClass child) =>
child -> Attr self Int
notebookChildPosition = String -> child -> Attr self Int
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> Attr container Int
newAttrFromContainerChildIntProperty String
"position"
notebookChildTabPacking :: (NotebookClass self, WidgetClass child) => child -> Attr self Packing
notebookChildTabPacking :: forall self child.
(NotebookClass self, WidgetClass child) =>
child -> Attr self Packing
notebookChildTabPacking child
child = (self -> IO Packing)
-> (self -> Packing -> IO ()) -> ReadWriteAttr self Packing Packing
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
(\self
container -> do
Bool
expand <- String -> child -> self -> IO Bool
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> container -> IO Bool
containerChildGetPropertyBool String
"tab-expand" child
child self
container
Bool
fill <- String -> child -> self -> IO Bool
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> container -> IO Bool
containerChildGetPropertyBool String
"tab-fill" child
child self
container
Packing -> IO Packing
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool -> Bool -> Packing
toPacking Bool
expand Bool
fill))
(\self
container Packing
packing ->
case Packing -> (Bool, Bool)
fromPacking Packing
packing of
(Bool
expand, Bool
fill) -> do
String -> child -> self -> Bool -> IO ()
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> container -> Bool -> IO ()
containerChildSetPropertyBool String
"tab-expand" child
child self
container Bool
expand
String -> child -> self -> Bool -> IO ()
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> container -> Bool -> IO ()
containerChildSetPropertyBool String
"tab-fill" child
child self
container Bool
fill)
notebookChildTabPackType :: (NotebookClass self, WidgetClass child) => child -> Attr self PackType
notebookChildTabPackType :: forall self child.
(NotebookClass self, WidgetClass child) =>
child -> Attr self PackType
notebookChildTabPackType = String -> GType -> child -> Attr self PackType
forall container child enum.
(ContainerClass container, WidgetClass child, Enum enum) =>
String -> GType -> child -> Attr container enum
newAttrFromContainerChildEnumProperty String
"tab-pack"
GType
gtk_pack_type_get_type
{-# LINE 1184 "./Graphics/UI/Gtk/Layout/Notebook.chs" #-}
notebookChildDetachable :: NotebookClass self => Attr self Bool
notebookChildDetachable :: forall self. NotebookClass self => Attr self Bool
notebookChildDetachable = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"detachable"
notebookChildReorderable :: NotebookClass self => Attr self Bool
notebookChildReorderable :: forall self. NotebookClass self => Attr self Bool
notebookChildReorderable = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"reorderable"
notebookChildTabExpand :: NotebookClass self => Attr self Bool
notebookChildTabExpand :: forall self. NotebookClass self => Attr self Bool
notebookChildTabExpand = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"tab-expand"
notebookChildTabFill :: NotebookClass self => Attr self Bool
notebookChildTabFill :: forall self. NotebookClass self => Attr self Bool
notebookChildTabFill = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"tab-fill"
notebookStyleArrowSpacing :: NotebookClass self => ReadAttr self Bool
notebookStyleArrowSpacing :: forall self. NotebookClass self => ReadAttr self Bool
notebookStyleArrowSpacing = String -> ReadAttr self Bool
forall gobj. GObjectClass gobj => String -> ReadAttr gobj Bool
readAttrFromBoolProperty String
"arrow-spacing"
notebookStyleHasBackwardStepper :: NotebookClass self => ReadAttr self Bool
notebookStyleHasBackwardStepper :: forall self. NotebookClass self => ReadAttr self Bool
notebookStyleHasBackwardStepper = String -> ReadAttr self Bool
forall gobj. GObjectClass gobj => String -> ReadAttr gobj Bool
readAttrFromBoolProperty String
"has-backward-stepper"
notebookStyleHasForwardStepper :: NotebookClass self => ReadAttr self Bool
notebookStyleHasForwardStepper :: forall self. NotebookClass self => ReadAttr self Bool
notebookStyleHasForwardStepper = String -> ReadAttr self Bool
forall gobj. GObjectClass gobj => String -> ReadAttr gobj Bool
readAttrFromBoolProperty String
"has-forward-stepper"
notebookStyleHasSecondaryBackwardStepper :: NotebookClass self => ReadAttr self Bool
notebookStyleHasSecondaryBackwardStepper :: forall self. NotebookClass self => ReadAttr self Bool
notebookStyleHasSecondaryBackwardStepper = String -> ReadAttr self Bool
forall gobj. GObjectClass gobj => String -> ReadAttr gobj Bool
readAttrFromBoolProperty String
"has-secondary-backward-stepper"
notebookStyleHasSecondaryForwardStepper :: NotebookClass self => ReadAttr self Bool
notebookStyleHasSecondaryForwardStepper :: forall self. NotebookClass self => ReadAttr self Bool
notebookStyleHasSecondaryForwardStepper = String -> ReadAttr self Bool
forall gobj. GObjectClass gobj => String -> ReadAttr gobj Bool
readAttrFromBoolProperty String
"has-secondary-forward-stepper"
notebookStyleTabCurvature :: NotebookClass self => ReadAttr self Int
notebookStyleTabCurvature :: forall self. NotebookClass self => ReadAttr self Int
notebookStyleTabCurvature = String -> ReadAttr self Int
forall gobj. GObjectClass gobj => String -> ReadAttr gobj Int
readAttrFromIntProperty String
"tab-curvature"
notebookStyleTabOverlap :: NotebookClass self => ReadAttr self Int
notebookStyleTabOverlap :: forall self. NotebookClass self => ReadAttr self Int
notebookStyleTabOverlap = String -> ReadAttr self Int
forall gobj. GObjectClass gobj => String -> ReadAttr gobj Int
readAttrFromIntProperty String
"tab-overlap"
switchPage :: NotebookClass self => Signal self (Int -> IO ())
switchPage :: forall self. NotebookClass self => Signal self (Int -> IO ())
switchPage = (Bool -> self -> (Int -> IO ()) -> IO (ConnectId self))
-> Signal self (Int -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (\Bool
after self
obj Int -> IO ()
act ->
String
-> Bool
-> self
-> (Ptr Any -> Word -> IO ())
-> IO (ConnectId self)
forall obj a.
GObjectClass obj =>
String
-> Bool -> obj -> (Ptr a -> Word -> IO ()) -> IO (ConnectId obj)
connect_PTR_WORD__NONE String
"switch-page" Bool
after self
obj
(\Ptr Any
_ Word
page -> Int -> IO ()
act (Word -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
page)))
pageReordered :: NotebookClass self => Signal self (Widget -> Int -> IO ())
= (Bool -> self -> (Widget -> Int -> IO ()) -> IO (ConnectId self))
-> Signal self (Widget -> Int -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool -> self -> (Widget -> Int -> IO ()) -> IO (ConnectId self)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> Int -> IO ()) -> IO (ConnectId obj)
connect_OBJECT_INT__NONE String
"page-reordered")
pageRemoved :: NotebookClass self => Signal self (Widget -> Int -> IO ())
= (Bool -> self -> (Widget -> Int -> IO ()) -> IO (ConnectId self))
-> Signal self (Widget -> Int -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool -> self -> (Widget -> Int -> IO ()) -> IO (ConnectId self)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> Int -> IO ()) -> IO (ConnectId obj)
connect_OBJECT_INT__NONE String
"page-removed")
pageAdded :: NotebookClass self => Signal self (Widget -> Int -> IO ())
pageAdded :: forall self.
NotebookClass self =>
Signal self (Widget -> Int -> IO ())
pageAdded = (Bool -> self -> (Widget -> Int -> IO ()) -> IO (ConnectId self))
-> Signal self (Widget -> Int -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool -> self -> (Widget -> Int -> IO ()) -> IO (ConnectId self)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> Int -> IO ()) -> IO (ConnectId obj)
connect_OBJECT_INT__NONE String
"page-added")
onSwitchPage, afterSwitchPage :: NotebookClass nb => nb -> (Int -> IO ()) ->
IO (ConnectId nb)
onSwitchPage :: forall nb.
NotebookClass nb =>
nb -> (Int -> IO ()) -> IO (ConnectId nb)
onSwitchPage nb
nb Int -> IO ()
fun = String
-> (Ptr Any -> IO ())
-> Bool
-> nb
-> (() -> Word -> IO ())
-> IO (ConnectId nb)
forall obj a' a.
GObjectClass obj =>
String
-> (Ptr a' -> IO a)
-> Bool
-> obj
-> (a -> Word -> IO ())
-> IO (ConnectId obj)
connect_BOXED_WORD__NONE String
"switch-page"
(IO () -> Ptr Any -> IO ()
forall a b. a -> b -> a
const (IO () -> Ptr Any -> IO ()) -> IO () -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()) Bool
False nb
nb
(\()
_ Word
page -> Int -> IO ()
fun (Word -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
page))
afterSwitchPage :: forall nb.
NotebookClass nb =>
nb -> (Int -> IO ()) -> IO (ConnectId nb)
afterSwitchPage nb
nb Int -> IO ()
fun = String
-> (Ptr Any -> IO ())
-> Bool
-> nb
-> (() -> Word -> IO ())
-> IO (ConnectId nb)
forall obj a' a.
GObjectClass obj =>
String
-> (Ptr a' -> IO a)
-> Bool
-> obj
-> (a -> Word -> IO ())
-> IO (ConnectId obj)
connect_BOXED_WORD__NONE String
"switch-page"
(IO () -> Ptr Any -> IO ()
forall a b. a -> b -> a
const (IO () -> Ptr Any -> IO ()) -> IO () -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()) Bool
True nb
nb
(\()
_ Word
page -> Int -> IO ()
fun (Word -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
page))
foreign import ccall unsafe "gtk_notebook_new"
gtk_notebook_new :: (IO (Ptr Widget))
foreign import ccall safe "gtk_notebook_append_page"
gtk_notebook_append_page :: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr Widget) -> (IO CInt))))
foreign import ccall safe "gtk_notebook_append_page_menu"
:: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr Widget) -> ((Ptr Widget) -> (IO CInt)))))
foreign import ccall safe "gtk_notebook_prepend_page"
gtk_notebook_prepend_page :: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr Widget) -> (IO CInt))))
foreign import ccall safe "gtk_notebook_prepend_page_menu"
:: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr Widget) -> ((Ptr Widget) -> (IO CInt)))))
foreign import ccall safe "gtk_notebook_insert_page"
gtk_notebook_insert_page :: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr Widget) -> (CInt -> (IO CInt)))))
foreign import ccall safe "gtk_notebook_insert_page_menu"
:: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr Widget) -> ((Ptr Widget) -> (CInt -> (IO CInt))))))
foreign import ccall safe "gtk_notebook_remove_page"
gtk_notebook_remove_page :: ((Ptr Notebook) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_notebook_page_num"
gtk_notebook_page_num :: ((Ptr Notebook) -> ((Ptr Widget) -> (IO CInt)))
foreign import ccall safe "gtk_notebook_set_current_page"
gtk_notebook_set_current_page :: ((Ptr Notebook) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_notebook_next_page"
gtk_notebook_next_page :: ((Ptr Notebook) -> (IO ()))
foreign import ccall safe "gtk_notebook_prev_page"
gtk_notebook_prev_page :: ((Ptr Notebook) -> (IO ()))
foreign import ccall safe "gtk_notebook_reorder_child"
gtk_notebook_reorder_child :: ((Ptr Notebook) -> ((Ptr Widget) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_notebook_set_tab_pos"
gtk_notebook_set_tab_pos :: ((Ptr Notebook) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_notebook_get_tab_pos"
gtk_notebook_get_tab_pos :: ((Ptr Notebook) -> (IO CInt))
foreign import ccall safe "gtk_notebook_set_show_tabs"
gtk_notebook_set_show_tabs :: ((Ptr Notebook) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_notebook_get_show_tabs"
gtk_notebook_get_show_tabs :: ((Ptr Notebook) -> (IO CInt))
foreign import ccall safe "gtk_notebook_set_show_border"
gtk_notebook_set_show_border :: ((Ptr Notebook) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_notebook_get_show_border"
gtk_notebook_get_show_border :: ((Ptr Notebook) -> (IO CInt))
foreign import ccall unsafe "gtk_notebook_set_scrollable"
gtk_notebook_set_scrollable :: ((Ptr Notebook) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_notebook_get_scrollable"
gtk_notebook_get_scrollable :: ((Ptr Notebook) -> (IO CInt))
foreign import ccall safe "gtk_notebook_set_tab_border"
gtk_notebook_set_tab_border :: ((Ptr Notebook) -> (CUInt -> (IO ())))
foreign import ccall safe "gtk_notebook_set_tab_hborder"
gtk_notebook_set_tab_hborder :: ((Ptr Notebook) -> (CUInt -> (IO ())))
foreign import ccall safe "gtk_notebook_set_tab_vborder"
gtk_notebook_set_tab_vborder :: ((Ptr Notebook) -> (CUInt -> (IO ())))
foreign import ccall safe "gtk_notebook_popup_enable"
:: ((Ptr Notebook) -> (IO ()))
foreign import ccall safe "gtk_notebook_popup_disable"
:: ((Ptr Notebook) -> (IO ()))
foreign import ccall unsafe "gtk_notebook_get_current_page"
gtk_notebook_get_current_page :: ((Ptr Notebook) -> (IO CInt))
foreign import ccall safe "gtk_notebook_set_menu_label"
:: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr Widget) -> (IO ()))))
foreign import ccall unsafe "gtk_notebook_get_menu_label"
:: ((Ptr Notebook) -> ((Ptr Widget) -> (IO (Ptr Widget))))
foreign import ccall safe "gtk_notebook_set_menu_label_text"
:: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr CChar) -> (IO ()))))
foreign import ccall unsafe "gtk_notebook_get_menu_label_text"
:: ((Ptr Notebook) -> ((Ptr Widget) -> (IO (Ptr CChar))))
foreign import ccall unsafe "gtk_notebook_get_nth_page"
gtk_notebook_get_nth_page :: ((Ptr Notebook) -> (CInt -> (IO (Ptr Widget))))
foreign import ccall unsafe "gtk_notebook_get_n_pages"
gtk_notebook_get_n_pages :: ((Ptr Notebook) -> (IO CInt))
foreign import ccall unsafe "gtk_notebook_get_tab_label"
gtk_notebook_get_tab_label :: ((Ptr Notebook) -> ((Ptr Widget) -> (IO (Ptr Widget))))
foreign import ccall unsafe "gtk_notebook_get_tab_label_text"
gtk_notebook_get_tab_label_text :: ((Ptr Notebook) -> ((Ptr Widget) -> (IO (Ptr CChar))))
foreign import ccall unsafe "gtk_notebook_query_tab_label_packing"
gtk_notebook_query_tab_label_packing :: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO ()))))))
foreign import ccall safe "gtk_notebook_set_tab_label_packing"
gtk_notebook_set_tab_label_packing :: ((Ptr Notebook) -> ((Ptr Widget) -> (CInt -> (CInt -> (CInt -> (IO ()))))))
foreign import ccall safe "gtk_notebook_set_homogeneous_tabs"
gtk_notebook_set_homogeneous_tabs :: ((Ptr Notebook) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_notebook_set_tab_label"
gtk_notebook_set_tab_label :: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr Widget) -> (IO ()))))
foreign import ccall safe "gtk_notebook_set_tab_label_text"
gtk_notebook_set_tab_label_text :: ((Ptr Notebook) -> ((Ptr Widget) -> ((Ptr CChar) -> (IO ()))))
foreign import ccall safe "gtk_notebook_set_tab_reorderable"
gtk_notebook_set_tab_reorderable :: ((Ptr Notebook) -> ((Ptr Widget) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_notebook_get_tab_reorderable"
gtk_notebook_get_tab_reorderable :: ((Ptr Notebook) -> ((Ptr Widget) -> (IO CInt)))
foreign import ccall safe "gtk_notebook_set_tab_detachable"
gtk_notebook_set_tab_detachable :: ((Ptr Notebook) -> ((Ptr Widget) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_notebook_get_tab_detachable"
gtk_notebook_get_tab_detachable :: ((Ptr Notebook) -> ((Ptr Widget) -> (IO CInt)))
foreign import ccall safe "gtk_notebook_set_action_widget"
gtk_notebook_set_action_widget :: ((Ptr Notebook) -> ((Ptr Widget) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_notebook_get_action_widget"
gtk_notebook_get_action_widget :: ((Ptr Notebook) -> (CInt -> (IO (Ptr Widget))))
foreign import ccall unsafe "gtk_pack_type_get_type"
gtk_pack_type_get_type :: CULong