{-# LINE 2 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) Widget Viewport---- Author : Axel Simon---- Created: 23 May 2001---- Copyright (C) 1999-2005 Axel Simon---- 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.---- Issues:---- The binding of this widget is superfluous as far as I can tell.---- The only signal this widget registers is \"set-scroll-adjustments\". It is-- not bound because it is meant to be received by the 'Viewport'-- and sent by 'ScrolledWindow'.---- |-- Maintainer : gtk2hs-users@lists.sourceforge.net-- Stability : provisional-- Portability : portable (depends on GHC)---- An adapter which makes widgets scrollable--moduleGraphics.UI.Gtk.Misc.Viewport(-- * Detail---- | A 'Viewport' is a helper widget that adds Adjustment slots to a-- widget, i.e. the widget becomes scrollable. It can then be put into-- 'ScrolledWindow' and will behave as expected.-- * Class Hierarchy-- |-- @-- | 'GObject'-- | +----'Object'-- | +----'Widget'-- | +----'Container'-- | +----'Bin'-- | +----Viewport-- @-- * TypesViewport,ViewportClass,ShadowType(..),castToViewport,gTypeViewport,toViewport,-- * ConstructorsviewportNew,-- * MethodsviewportGetHAdjustment,viewportGetVAdjustment,viewportSetHAdjustment,viewportSetVAdjustment,viewportSetShadowType,viewportGetShadowType,viewportGetBinWindow,viewportGetViewWindow,-- * AttributesviewportHAdjustment,viewportVAdjustment,viewportShadowType,)whereimportControl.Monad(liftM)importSystem.Glib.FFIimportSystem.Glib.AttributesimportGraphics.UI.Gtk.Abstract.Object(makeNewObject)importGraphics.UI.Gtk.Types{-# LINE 90 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}importGraphics.UI.Gtk.General.Enums(ShadowType(..)){-# LINE 93 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}---------------------- Constructors-- | Creates a new 'Viewport' with the given adjustments.--viewportNew::Adjustment-- ^ @hadjustment@ - horizontal adjustment.->Adjustment-- ^ @vadjustment@ - vertical adjustment.->IOViewportviewportNewhadjustmentvadjustment=makeNewObjectmkViewport$liftM(castPtr::PtrWidget->PtrViewport)$(\(Adjustmentarg1)(Adjustmentarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_viewport_newargPtr1argPtr2){-# LINE 107 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}hadjustmentvadjustment---------------------- Methods-- | Returns the horizontal adjustment of the viewport.--viewportGetHAdjustment::ViewportClassself=>self->IOAdjustmentviewportGetHAdjustmentself=makeNewObjectmkAdjustment$(\(Viewportarg1)->withForeignPtrarg1$\argPtr1->gtk_viewport_get_hadjustmentargPtr1){-# LINE 119 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}(toViewportself)-- | Returns the vertical adjustment of the viewport.--viewportGetVAdjustment::ViewportClassself=>self->IOAdjustmentviewportGetVAdjustmentself=makeNewObjectmkAdjustment$(\(Viewportarg1)->withForeignPtrarg1$\argPtr1->gtk_viewport_get_vadjustmentargPtr1){-# LINE 127 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}(toViewportself)-- | Sets the horizontal adjustment of the viewport.--viewportSetHAdjustment::ViewportClassself=>self->Adjustment->IO()viewportSetHAdjustmentselfadjustment=(\(Viewportarg1)(Adjustmentarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_viewport_set_hadjustmentargPtr1argPtr2){-# LINE 134 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}(toViewportself)adjustment-- | Sets the vertical adjustment of the viewport.--viewportSetVAdjustment::ViewportClassself=>self->Adjustment->IO()viewportSetVAdjustmentselfadjustment=(\(Viewportarg1)(Adjustmentarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_viewport_set_vadjustmentargPtr1argPtr2){-# LINE 142 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}(toViewportself)adjustment-- | Sets the shadow type of the viewport.--viewportSetShadowType::ViewportClassself=>self->ShadowType-- ^ @type@ - the new shadow type.->IO()viewportSetShadowTypeselftype_=(\(Viewportarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_viewport_set_shadow_typeargPtr1arg2){-# LINE 152 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}(toViewportself)((fromIntegral.fromEnum)type_)-- | Gets the shadow type of the 'Viewport'. See 'viewportSetShadowType'.--viewportGetShadowType::ViewportClassself=>self->IOShadowType-- ^ returns the shadow typeviewportGetShadowTypeself=liftM(toEnum.fromIntegral)$(\(Viewportarg1)->withForeignPtrarg1$\argPtr1->gtk_viewport_get_shadow_typeargPtr1){-# LINE 162 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}(toViewportself)-- | Gets the bin window of the 'Viewport'.---- * Available since Gtk version 2.20--viewportGetBinWindow::ViewportClassself=>self->IODrawWindowviewportGetBinWindowself=makeNewGObjectmkDrawWindow$(\(Viewportarg1)->withForeignPtrarg1$\argPtr1->gtk_viewport_get_bin_windowargPtr1){-# LINE 173 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}(toViewportself)-- | Gets the view window of the 'Viewport'.---- * Available since Gtk+ version 2.22--viewportGetViewWindow::ViewportClassself=>self->IODrawWindowviewportGetViewWindowself=makeNewGObjectmkDrawWindow$(\(Viewportarg1)->withForeignPtrarg1$\argPtr1->gtk_viewport_get_view_windowargPtr1){-# LINE 185 "./Graphics/UI/Gtk/Misc/Viewport.chs" #-}(toViewportself)---------------------- Attributes-- | The 'Adjustment' that determines the values of the horizontal position-- for this viewport.--viewportHAdjustment::ViewportClassself=>AttrselfAdjustmentviewportHAdjustment=newAttrviewportGetHAdjustmentviewportSetHAdjustment-- | The 'Adjustment' that determines the values of the vertical position for-- this viewport.--viewportVAdjustment::ViewportClassself=>AttrselfAdjustmentviewportVAdjustment=newAttrviewportGetVAdjustmentviewportSetVAdjustment-- | Determines how the shadowed box around the viewport is drawn.---- Default value: 'ShadowIn'--viewportShadowType::ViewportClassself=>AttrselfShadowTypeviewportShadowType=newAttrviewportGetShadowTypeviewportSetShadowType---------------------- Signalsforeignimportccallunsafe"gtk_viewport_new"gtk_viewport_new::((PtrAdjustment)->((PtrAdjustment)->(IO(PtrWidget))))foreignimportccallunsafe"gtk_viewport_get_hadjustment"gtk_viewport_get_hadjustment::((PtrViewport)->(IO(PtrAdjustment)))foreignimportccallunsafe"gtk_viewport_get_vadjustment"gtk_viewport_get_vadjustment::((PtrViewport)->(IO(PtrAdjustment)))foreignimportccallsafe"gtk_viewport_set_hadjustment"gtk_viewport_set_hadjustment::((PtrViewport)->((PtrAdjustment)->(IO())))foreignimportccallsafe"gtk_viewport_set_vadjustment"gtk_viewport_set_vadjustment::((PtrViewport)->((PtrAdjustment)->(IO())))foreignimportccallsafe"gtk_viewport_set_shadow_type"gtk_viewport_set_shadow_type::((PtrViewport)->(CInt->(IO())))foreignimportccallunsafe"gtk_viewport_get_shadow_type"gtk_viewport_get_shadow_type::((PtrViewport)->(IOCInt))foreignimportccallsafe"gtk_viewport_get_bin_window"gtk_viewport_get_bin_window::((PtrViewport)->(IO(PtrDrawWindow)))foreignimportccallsafe"gtk_viewport_get_view_window"gtk_viewport_get_view_window::((PtrViewport)->(IO(PtrDrawWindow)))