From: Duncan C. <dun...@us...> - 2005-02-25 01:11:46
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Scrolling In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24163/gtk/Graphics/UI/Gtk/Scrolling Modified Files: HScrollbar.chs ScrolledWindow.chs VScrollbar.chs Log Message: Add more module level documentation and tidy up exiting documentation. Also add/modify section headers. Also LGPL'ify remaining modules with permission from Matthew Walton. Index: VScrollbar.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Scrolling/VScrollbar.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VScrollbar.chs 12 Feb 2005 17:19:25 -0000 1.2 +++ VScrollbar.chs 25 Feb 2005 01:11:36 -0000 1.3 @@ -24,13 +24,36 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- This widget provides a stand-alone scrollbar. All interesting functions --- can be found in 'Range', from which it is derived. +-- A vertical scrollbar -- module Graphics.UI.Gtk.Scrolling.VScrollbar ( +-- * Description +-- +-- | The 'VScrollbar' widget is a widget arranged vertically creating a +-- scrollbar. See 'Scrollbar' for details on scrollbars. An 'Adjustment' +-- may be added to handle the adjustment of the scrollbar using +-- 'vScrollbarNew' or you can use 'vScrollbarNewDefaults' in +-- which case one will be created for you. See 'Adjustment' for details. +-- +-- All interesting functions can be found in 'Range', from which it is derived. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Range' +-- | +----'Scrollbar' +-- | +----VScrollbar +-- @ + +-- * Types VScrollbar, VScrollbarClass, castToVScrollbar, + +-- * Constructors vScrollbarNew, vScrollbarNewDefaults ) where @@ -44,7 +67,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | Create a new HScrollbar. -- Index: ScrolledWindow.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ScrolledWindow.chs 12 Feb 2005 17:19:25 -0000 1.2 +++ ScrolledWindow.chs 25 Feb 2005 01:11:36 -0000 1.3 @@ -26,16 +26,62 @@ -- -- 'ScrolledWindow' is a container that adds scroll bars to its child -- --- * Some widgets have native scrolling support, in which case the scrolling action --- is performed by the child itself (e.g. a TreeView widget does this by only --- moving the table part and not the titles of a table). If a widget does --- not support native scrolling it can be put into a 'ScrolledWindow' widget. --- module Graphics.UI.Gtk.Scrolling.ScrolledWindow ( +-- * Description +-- +-- | 'ScrolledWindow' is a 'Bin' subclass: it's a container the accepts a +-- single child widget. 'ScrolledWindow' adds scrollbars to the child widget +-- and optionally draws a beveled frame around the child widget. +-- +-- The scrolled window can work in two ways. Some widgets have native +-- scrolling support; these widgets have \"slots\" for 'Adjustment' objects. +-- Widgets with native scroll support include 'TreeView', 'TextView', and +-- 'Layout'. +-- +-- For widgets that lack native scrolling support, the 'Viewport' widget +-- acts as an adaptor class, implementing scrollability for child widgets that +-- lack their own scrolling capabilities. Use 'Viewport' to scroll child +-- widgets such as 'Table', 'Box', and so on. +-- +-- If a widget has native scrolling abilities, it can be added to the +-- 'ScrolledWindow' with 'containerAdd'. If a widget does not, you must first +-- add the widget to a 'Viewport', then add the 'Viewport' to the scrolled +-- window. The convenience function 'scrolledWindowAddWithViewport' does +-- exactly this, so you can ignore the presence of the viewport. +-- +-- The position of the scrollbars is controlled by the scroll adjustments. +-- See 'Adjustment' for the fields in an adjustment - for 'Scrollbar', used by +-- 'ScrolledWindow', the \"value\" field represents the position of the +-- scrollbar, which must be between the \"lower\" field and \"upper - +-- page_size.\" The \"page_size\" field represents the size of the visible +-- scrollable area. The \"step_increment\" and \"page_increment\" fields are +-- used when the user asks to step down (using the small stepper arrows) or +-- page down (using for example the PageDown key). +-- +-- If a 'ScrolledWindow' doesn't behave quite as you would like, or doesn't +-- have exactly the right layout, it's very possible to set up your own +-- scrolling with 'Scrollbar' and for example a 'Table'. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----ScrolledWindow +-- @ + +-- * Types ScrolledWindow, ScrolledWindowClass, castToScrolledWindow, + +-- * Constructors scrolledWindowNew, + +-- * Methods scrolledWindowGetHAdjustment, scrolledWindowGetVAdjustment, PolicyType(..), @@ -63,7 +109,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | Create a new 'ScrolledWindow'. -- @@ -74,6 +121,9 @@ fromMAdj :: Maybe Adjustment -> Adjustment fromMAdj = fromMaybe $ mkAdjustment nullForeignPtr +-------------------- +-- Methods + -- | Retrieve the horizontal 'Adjustment' of the 'ScrolledWindow'. -- scrolledWindowGetHAdjustment :: ScrolledWindowClass w => w -> IO Adjustment Index: HScrollbar.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Scrolling/HScrollbar.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- HScrollbar.chs 12 Feb 2005 17:19:25 -0000 1.2 +++ HScrollbar.chs 25 Feb 2005 01:11:36 -0000 1.3 @@ -24,13 +24,36 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- This widget provides a stand-alone scrollbar. All interesting functions --- can be found in 'Range', from which it is derived. +-- A horizontal scrollbar -- module Graphics.UI.Gtk.Scrolling.HScrollbar ( +-- * Description +-- +-- | The 'HScrollbar' widget is a widget arranged horizontally creating a +-- scrollbar. See 'Scrollbar' for details on scrollbars. An 'Adjustment' +-- may be added to handle the adjustment of the scrollbar using +-- 'hScrollbarNew' or you can use 'hScrollbarNewDefaults' in +-- which case one will be created for you. See 'Adjustment' for details. +-- +-- All interesting functions can be found in 'Range', from which it is derived. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Range' +-- | +----'Scrollbar' +-- | +----HScrollbar +-- @ + +-- * Types HScrollbar, HScrollbarClass, castToHScrollbar, + +-- * Constructors hScrollbarNew, hScrollbarNewDefaults ) where @@ -44,7 +67,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | Create a new HScrollbar. -- @@ -58,4 +82,3 @@ hScrollbarNewDefaults = makeNewObject mkHScrollbar $ liftM castPtr $ {#call unsafe hscrollbar_new#} (mkAdjustment nullForeignPtr) - |