{-# LINE 2 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) Widget ImageNav---- 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)--moduleGraphics.UI.Gtk.ImageView.ImageNav(-- * Details-- | 'ImageNav' is a popup window that shows a downscaled preview of the pixbuf that 'ImageView' is-- showing. The user can drag around a rectangle which indicates the current view of the image.---- This class is used by 'ImageScrollWin' itself. It is probably not very useful for clients of this-- library.---- 'ImageNav' has the same keybindings that 'ImageView' has. All keypresses that it receives are-- passed along to the view.-- * TypesImageNav,ImageNavClass,-- * MethodsimageNavNew,imageNavGetPixbuf,imageNavGrab,imageNavRelease,imageNavShowAndGrab,)whereimportControl.Monad(liftM)importData.Maybe(fromMaybe)importGraphics.UI.Gtk.Abstract.Object(makeNewObject)importGraphics.UI.Gtk.ImageView.EnumsimportSystem.Glib.AttributesimportSystem.Glib.FFIimportSystem.Glib.UTFStringimportGraphics.UI.Gtk.ImageView.Signals{-# LINE 59 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}importGraphics.UI.Gtk.ImageView.Types{-# LINE 60 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}importSystem.Glib.Properties{-# LINE 61 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}{-# LINE 63 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}-- | Creates a new 'ImageNav' for showing thumbnails of the view.imageNavNew::ImageViewClassview=>view->IOImageNavimageNavNewview=makeNewObjectmkImageNav$liftM(castPtr::PtrWidget->PtrImageNav)$(\(ImageViewarg1)->withForeignPtrarg1$\argPtr1->gtk_image_nav_newargPtr1){-# LINE 70 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}(toImageViewview)-- | Returns the downscaled pixbuf of the views pixbuf that this 'ImageNav' shows, or 'Nothing' if that-- pixbuf has not been created yet.imageNavGetPixbuf::ImageNavClassnav=>nav->IO(MaybePixbuf)-- ^ returns the pixbuf in the navigation area this image navigator shows, or 'Nothing' if none exist.imageNavGetPixbufnav=maybeNull(wrapNewGObjectmkPixbuf)$(\(ImageNavarg1)->withForeignPtrarg1$\argPtr1->gtk_image_nav_get_pixbufargPtr1){-# LINE 79 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}(toImageNavnav)-- |imageNavGrab::ImageNavClassnav=>nav->IO()imageNavGrabnav=(\(ImageNavarg1)->withForeignPtrarg1$\argPtr1->gtk_image_nav_grabargPtr1){-# LINE 85 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}(toImageNavnav)-- |imageNavRelease::ImageNavClassnav=>nav->IO()imageNavReleasenav=(\(ImageNavarg1)->withForeignPtrarg1$\argPtr1->gtk_image_nav_releaseargPtr1){-# LINE 91 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}(toImageNavnav)-- | Show the 'ImageNav' centered around the point (@centerX@, @centerY@) and grab mouse and keyboard-- events. The grab continues until a button release event is received which causes the widget to hide.imageNavShowAndGrab::ImageNavClassnav=>nav->Int-- ^ @centerX@ x coordinate of center position->Int-- ^ @centerY@ y coordinate of center position->IO()imageNavShowAndGrabnavcenterXcenterY=(\(ImageNavarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gtk_image_nav_show_and_grabargPtr1arg2arg3){-# LINE 101 "./Graphics/UI/Gtk/ImageView/ImageNav.chs" #-}(toImageNavnav)(fromIntegralcenterX)(fromIntegralcenterY)foreignimportccallunsafe"gtk_image_nav_new"gtk_image_nav_new::((PtrImageView)->(IO(PtrWidget)))foreignimportccallsafe"gtk_image_nav_get_pixbuf"gtk_image_nav_get_pixbuf::((PtrImageNav)->(IO(PtrPixbuf)))foreignimportccallsafe"gtk_image_nav_grab"gtk_image_nav_grab::((PtrImageNav)->(IO()))foreignimportccallsafe"gtk_image_nav_release"gtk_image_nav_release::((PtrImageNav)->(IO()))foreignimportccallsafe"gtk_image_nav_show_and_grab"gtk_image_nav_show_and_grab::((PtrImageNav)->(CInt->(CInt->(IO()))))