{-# LINE 2 "./Graphics/UI/Gtk/ImageView/ImageScrollWin.chs" #-}
-- -*-haskell-*-
-- GIMP Toolkit (GTK) Widget ImageScrollWin
--
-- Author : Andy Stewart
--
-- Created: 19 Aug 2010
--
-- Copyright (C) 2010 Andy Stewart
--
-- 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)
--
module Graphics.UI.Gtk.ImageView.ImageScrollWin (
-- * Details
-- | 'ImageScrollWin' provides a widget similar in appearance to 'ScrollableWindow' that is more
-- suitable for displaying 'ImageView''s.

-- * Types
   ImageScrollWin,
   ImageScrollWinClass,

-- * Methods
   imageScrollWinNew,
) where

import Control.Monad (liftM)
import Data.Maybe (fromMaybe)

import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.ImageView.Enums
import System.Glib.Attributes
import System.Glib.FFI
import System.Glib.UTFString

import Graphics.UI.Gtk.ImageView.Signals
{-# LINE 49 "./Graphics/UI/Gtk/ImageView/ImageScrollWin.chs" #-}
import Graphics.UI.Gtk.ImageView.Types
{-# LINE 50 "./Graphics/UI/Gtk/ImageView/ImageScrollWin.chs" #-}
import System.Glib.Properties
{-# LINE 51 "./Graphics/UI/Gtk/ImageView/ImageScrollWin.chs" #-}


{-# LINE 53 "./Graphics/UI/Gtk/ImageView/ImageScrollWin.chs" #-}

-- | Creates a new 'ImageScrollWin' containing the 'ImageView'.
--
-- The widget is built using four subwidgets arranged inside a 'Table' with two columns and two
-- rows. Two scrollbars, one navigator button (the decorations) and one 'ImageView'.
--
-- When the 'ImageView' fits inside the window, the decorations are hidden.
imageScrollWinNew :: ImageViewClass view => view -> IO ImageScrollWin
imageScrollWinNew view =
  makeNewObject mkImageScrollWin $
  liftM (castPtr :: Ptr Widget -> Ptr ImageScrollWin) $
  (\(ImageView arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_image_scroll_win_new argPtr1)
{-# LINE 65 "./Graphics/UI/Gtk/ImageView/ImageScrollWin.chs" #-}
    (toImageView view)

foreign import ccall unsafe "gtk_image_scroll_win_new"
  gtk_image_scroll_win_new :: ((Ptr ImageView) -> (IO (Ptr Widget)))