    {-# LINE 2 "./Graphics/UI/Gtk/Layout/StackSwitcher.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) Widgets StackSwitcher
    --
    -- Author : Moritz Schulte
    --
    -- Created: 27 April 2016
    --
    -- Copyright (C) 2016 Moritz Schulte
    --
    -- This library is free software; you can redistribute it and/or
    -- modify it under the terms of the GNU Lesser General Public
    -- License as published by the Free Software Foundation; either
    -- version 2.1 of the License, or (at your option) any later version.
    --
    -- This library is distributed in the hope that it will be useful,
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    -- Lesser General Public License for more details.
    --
    -- |
    -- Maintainer : gtk2hs-users@lists.sourceforge.net
    -- Stability : provisional
    -- Portability : portable (depends on GHC)
    --
    -- A widget which controls the alignment and size of its child
    --
    module Graphics.UI.Gtk.Layout.StackSwitcher (
    -- * Detail
    --
    -- [...]
    --
    -- * Class Hierarchy
    -- |
    -- @
    -- | 'GObject'
    -- | +----'Object'
    -- | +----'Widget'
    -- | +----'Container'
    -- | +----'Box'
    -- | +----'StackSwitcher'
    -- @

    -- * Types

        StackSwitcher
      , castToStackSwitcher
      , gTypeStackSwitcher
      , toStackSwitcher

    -- * Constructors
      , stackSwitcherNew

    -- * Methods
      , stackSwitcherSetStack
      , stackSwitcherGetStack

    -- * Attributes
      , stackSwitcherIconSize
      , stackSwitcherStack

    ) 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
    {-# LINE 73 "./Graphics/UI/Gtk/Layout/StackSwitcher.chs" #-}

    {-# LINE 75 "./Graphics/UI/Gtk/Layout/StackSwitcher.chs" #-}

    --------------------
    -- Constructors

    -- | Creates a new 'StackSwitcher'.
    --
    stackSwitcherNew :: IO StackSwitcher
    stackSwitcherNew :: IO StackSwitcher
    stackSwitcherNew =
      (ForeignPtr StackSwitcher -> StackSwitcher,
     FinalizerPtr StackSwitcher)
    -> IO (Ptr StackSwitcher) -> IO StackSwitcher
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr StackSwitcher -> StackSwitcher,
     FinalizerPtr StackSwitcher)
    forall {a}.
    (ForeignPtr StackSwitcher -> StackSwitcher, FinalizerPtr a)
    mkStackSwitcher (IO (Ptr StackSwitcher) -> IO StackSwitcher)
    -> IO (Ptr StackSwitcher) -> IO StackSwitcher
    forall a b. (a -> b) -> a -> b
    $
      (Ptr Widget -> Ptr StackSwitcher)
    -> IO (Ptr Widget) -> IO (Ptr StackSwitcher)
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Ptr Widget -> Ptr StackSwitcher
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr Widget -> Ptr StackSwitcher) (IO (Ptr Widget) -> IO (Ptr StackSwitcher))
    -> IO (Ptr Widget) -> IO (Ptr StackSwitcher)
    forall a b. (a -> b) -> a -> b
    $
      IO (Ptr Widget)
    gtk_stack_switcher_new
    {-# LINE 86 "./Graphics/UI/Gtk/Layout/StackSwitcher.chs" #-}

    --------------------
    -- Methods

    -- | Sets the stack to control.
    stackSwitcherSetStack :: (StackSwitcherClass self, StackClass stack) => self
     -> stack
     -> IO ()
    stackSwitcherSetStack :: forall self stack.
    (StackSwitcherClass self, StackClass stack) =>
    self -> stack -> IO ()
    stackSwitcherSetStack self
    self stack
    stack =
      (\(StackSwitcher ForeignPtr StackSwitcher
    arg1) (Stack ForeignPtr Stack
    arg2) -> ForeignPtr StackSwitcher -> (Ptr StackSwitcher -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr StackSwitcher
    arg1 ((Ptr StackSwitcher -> IO ()) -> IO ())
    -> (Ptr StackSwitcher -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr StackSwitcher
    argPtr1 ->ForeignPtr Stack -> (Ptr Stack -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Stack
    arg2 ((Ptr Stack -> IO ()) -> IO ()) -> (Ptr Stack -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Stack
    argPtr2 ->Ptr StackSwitcher -> Ptr Stack -> IO ()
    gtk_stack_switcher_set_stack Ptr StackSwitcher
    argPtr1 Ptr Stack
    argPtr2)
    {-# LINE 96 "./Graphics/UI/Gtk/Layout/StackSwitcher.chs" #-}
        (toStackSwitcher self)
        (stack -> Stack
    forall o. StackClass o => o -> Stack
    toStack stack
    stack)

    -- | Retrieves the stack.
    stackSwitcherGetStack :: StackSwitcherClass self => self
     -> IO (Maybe Stack)
    stackSwitcherGetStack :: forall self. StackSwitcherClass self => self -> IO (Maybe Stack)
    stackSwitcherGetStack self
    self =
      (IO (Ptr Stack) -> IO Stack) -> IO (Ptr Stack) -> IO (Maybe Stack)
    forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
    maybeNull ((ForeignPtr Stack -> Stack, FinalizerPtr Stack)
    -> IO (Ptr Stack) -> IO Stack
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr Stack -> Stack, FinalizerPtr Stack)
    forall {a}. (ForeignPtr Stack -> Stack, FinalizerPtr a)
    mkStack) (IO (Ptr Stack) -> IO (Maybe Stack))
    -> IO (Ptr Stack) -> IO (Maybe Stack)
    forall a b. (a -> b) -> a -> b
    $
      (\(StackSwitcher ForeignPtr StackSwitcher
    arg1) -> ForeignPtr StackSwitcher
    -> (Ptr StackSwitcher -> IO (Ptr Stack)) -> IO (Ptr Stack)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr StackSwitcher
    arg1 ((Ptr StackSwitcher -> IO (Ptr Stack)) -> IO (Ptr Stack))
    -> (Ptr StackSwitcher -> IO (Ptr Stack)) -> IO (Ptr Stack)
    forall a b. (a -> b) -> a -> b
    $ \Ptr StackSwitcher
    argPtr1 ->Ptr StackSwitcher -> IO (Ptr Stack)
    gtk_stack_switcher_get_stack Ptr StackSwitcher
    argPtr1)
    {-# LINE 105 "./Graphics/UI/Gtk/Layout/StackSwitcher.chs" #-}
        (toStackSwitcher self)

    --------------------
    -- Attributes

    -- | Use the "icon-size" property to change the size of the image
    -- displayed when a GtkStackSwitcher is displaying icons.
    --
    -- Default value: @1@
    --
    stackSwitcherIconSize :: StackSwitcherClass self => Attr self Int
    stackSwitcherIconSize :: forall self. StackSwitcherClass self => Attr self Int
    stackSwitcherIconSize = String -> Attr self Int
    forall gobj. GObjectClass gobj => String -> Attr gobj Int
    newAttrFromIntProperty String
    "icon-size"

    -- | The 'Stack' controlled by this 'StackSwitcher'.
    --
    stackSwitcherStack :: (StackSwitcherClass self, StackClass stack) =>
      ReadWriteAttr self (Maybe Stack) (Maybe stack)
    stackSwitcherStack :: forall self stack.
    (StackSwitcherClass self, StackClass stack) =>
    ReadWriteAttr self (Maybe Stack) (Maybe stack)
    stackSwitcherStack = String -> GType -> ReadWriteAttr self (Maybe Stack) (Maybe stack)
    forall gobj gobj' gobj''.
    (GObjectClass gobj, GObjectClass gobj', GObjectClass gobj'') =>
    String -> GType -> ReadWriteAttr gobj (Maybe gobj') (Maybe gobj'')
    newAttrFromMaybeObjectProperty String
    "stack" GType
    gTypeContainer

    foreign import ccall unsafe "gtk_stack_switcher_new"
      gtk_stack_switcher_new :: (IO (Ptr Widget))

    foreign import ccall safe "gtk_stack_switcher_set_stack"
      gtk_stack_switcher_set_stack :: ((Ptr StackSwitcher) -> ((Ptr Stack) -> (IO ())))

    foreign import ccall safe "gtk_stack_switcher_get_stack"
      gtk_stack_switcher_get_stack :: ((Ptr StackSwitcher) -> (IO (Ptr Stack)))