{-# LANGUAGE CPP #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget ImageToolDragger -- -- 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.ImageToolDragger ( -- * Details -- | 'ImageToolDragger' is the default image tool for 'ImageView'. Its only feature is that it can drag -- the image around. -- * Types ImageToolDragger, ImageToolDraggerClass, -- * Methods ) 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#} {#import Graphics.UI.Gtk.ImageView.Types#} {#import System.Glib.Properties#} {# context lib="gtk" prefix="gtk" #} -- | Creates and returns a new dragger tool. imageToolDraggerNew :: ImageViewClass view => view -> IO ImageToolDragger imageToolDraggerNew view = wrapNewGObject mkImageToolDragger $ liftM (castPtr :: Ptr IImageTool -> Ptr ImageToolDragger) $ {# call unsafe gtk_image_tool_dragger_new #} (toImageView view)