From: Duncan C. <dun...@us...> - 2005-03-13 19:35:17
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30354/gtk/Graphics/UI/Gtk/Misc Modified Files: EventBox.chs.pp HandleBox.chs SizeGroup.chs Viewport.chs Log Message: Add properties. For the first round, just the easy properties that are implemented in terms of existing getter/setter functions and where there are no issues with NULL/Maybe types. Add Attributes file to glib package and modify Makefile.am accordingly. Index: Viewport.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/Viewport.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Viewport.chs 25 Feb 2005 01:11:35 -0000 1.3 +++ Viewport.chs 13 Mar 2005 19:34:35 -0000 1.4 @@ -64,12 +64,18 @@ viewportSetVAdjustment, ShadowType(..), viewportSetShadowType, - viewportGetShadowType + viewportGetShadowType, + +-- * Properties + viewportHAdjustment, + viewportVAdjustment, + viewportShadowType ) where import Monad (liftM) import System.Glib.FFI +import System.Glib.Attributes (Attr(..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -129,5 +135,33 @@ {#call unsafe viewport_get_shadow_type#} (toViewport v) -------------------- +-- Properties + +-- | The 'Adjustment' that determines the values of the horizontal position +-- for this viewport. +-- +viewportHAdjustment :: Attr Viewport Adjustment +viewportHAdjustment = Attr + viewportGetHAdjustment + viewportSetHAdjustment + +-- | The 'Adjustment' that determines the values of the vertical position for +-- this viewport. +-- +viewportVAdjustment :: Attr Viewport Adjustment +viewportVAdjustment = Attr + viewportGetVAdjustment + viewportSetVAdjustment + +-- | Determines how the shadowed box around the viewport is drawn. +-- +-- Default value: 'ShadowIn' +-- +viewportShadowType :: Attr Viewport ShadowType +viewportShadowType = Attr + viewportGetShadowType + viewportSetShadowType + +-------------------- -- Signals Index: HandleBox.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/HandleBox.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- HandleBox.chs 25 Feb 2005 01:11:35 -0000 1.3 +++ HandleBox.chs 13 Mar 2005 19:34:35 -0000 1.4 @@ -78,6 +78,11 @@ handleBoxSetSnapEdge, handleBoxGetSnapEdge, +-- * Properties + handleBoxShadowType, + handleBoxHandlePosition, + handleBoxSnapEdge, + -- * Signals onChildAttached, afterChildAttached, @@ -88,6 +93,7 @@ import Monad (liftM) import System.Glib.FFI +import System.Glib.Attributes (Attr(..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -154,6 +160,37 @@ {#call unsafe handle_box_get_snap_edge#} (toHandleBox hb) -------------------- +-- Properties + +-- | Appearance of the shadow that surrounds the container. +-- +-- Default value: 'ShadowEtchedOut' +-- +handleBoxShadowType :: Attr HandleBox ShadowType +handleBoxShadowType = Attr + handleBoxGetShadowType + handleBoxSetShadowType + +-- | Position of the handle relative to the child widget. +-- +-- Default value: 'PosLeft' +-- +handleBoxHandlePosition :: Attr HandleBox PositionType +handleBoxHandlePosition = Attr + handleBoxGetHandlePosition + handleBoxSetHandlePosition + +-- | Side of the handlebox that's lined up with the docking point to dock the +-- handlebox. +-- +-- Default value: 'PosTop' +-- +handleBoxSnapEdge :: Attr HandleBox PositionType +handleBoxSnapEdge = Attr + handleBoxGetSnapEdge + handleBoxSetSnapEdge + +-------------------- -- Signals -- | Emitted when the contents of the handlebox @@ -175,4 +212,3 @@ onChildDetached = connect_NONE__NONE "child-detached" False afterChildDetached = connect_NONE__NONE "child-detached" True - Index: EventBox.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/EventBox.chs.pp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EventBox.chs.pp 25 Feb 2005 01:11:35 -0000 1.3 +++ EventBox.chs.pp 13 Mar 2005 19:34:35 -0000 1.4 @@ -58,13 +58,18 @@ ,eventBoxSetVisibleWindow, eventBoxGetVisibleWindow, eventBoxSetAboveChild, - eventBoxGetAboveChild + eventBoxGetAboveChild, + +-- * Properties + eventBoxVisibleWindow, + eventBoxAboveChild #endif ) where import Monad (liftM) import System.Glib.FFI +import System.Glib.Attributes (Attr(..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -115,4 +120,21 @@ eventBoxGetAboveChild :: EventBox -> IO Bool eventBoxGetAboveChild ebox = liftM toBool $ {#call unsafe event_box_get_above_child#} ebox + +-------------------- +-- Properties + +-- | +-- +eventBoxVisibleWindow :: Attr EventBox Bool +eventBoxVisibleWindow = Attr + eventBoxGetVisibleWindow + eventBoxSetVisibleWindow + +-- | +-- +eventBoxAboveChild :: Attr EventBox Bool +eventBoxAboveChild = Attr + eventBoxGetAboveChild + eventBoxSetAboveChild #endif Index: SizeGroup.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/SizeGroup.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- SizeGroup.chs 25 Feb 2005 22:53:41 -0000 1.4 +++ SizeGroup.chs 13 Mar 2005 19:34:35 -0000 1.5 @@ -74,13 +74,17 @@ sizeGroupSetMode, sizeGroupGetMode, sizeGroupAddWidget, - sizeGroupRemoveWidget + sizeGroupRemoveWidget, + +-- * Properties + sizeGroupMode ) where import Monad (liftM) import System.Glib.FFI -import System.Glib.GObject (makeNewGObject) +import System.Glib.Attributes (Attr(..)) +import System.Glib.GObject (makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -132,3 +136,16 @@ sizeGroupSetMode :: SizeGroupClass obj => obj -> SizeGroupMode -> IO () sizeGroupSetMode obj mode = {#call size_group_set_mode#} (toSizeGroup obj) ((fromIntegral.fromEnum) mode) + +-------------------- +-- Properties + +-- | The directions in which the size group effects the requested sizes of its +-- component widgets. +-- +-- Default value: 'SizeGroupHorizontal' +-- +sizeGroupMode :: Attr SizeGroup SizeGroupMode +sizeGroupMode = Attr + sizeGroupGetMode + sizeGroupSetMode |