From: Duncan C. <dun...@us...> - 2005-02-25 01:12:38
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24163/gtk/Graphics/UI/Gtk/Layout Modified Files: Alignment.chs.pp AspectFrame.chs Expander.chs.pp Fixed.chs HBox.chs HButtonBox.chs HPaned.chs Layout.chs Notebook.chs.pp Table.chs VBox.chs VButtonBox.chs VPaned.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: Fixed.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/Fixed.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Fixed.chs 12 Feb 2005 17:19:23 -0000 1.2 +++ Fixed.chs 25 Feb 2005 01:11:34 -0000 1.3 @@ -34,24 +34,25 @@ -- automatic layout management. -- -- For most applications, you should not use this container! It keeps you --- from having to learn about the other GTK+ containers, but it results in --- broken applications. +-- from having to learn about the other Gtk+ containers, but it results in +-- broken applications. With 'Fixed', the following things will result in +-- truncated text, overlapping widgets, and other display bugs: -- -- * Themes, which may change widget sizes. -- -- * Fonts other than the one you used to write the app will of course -- change the size of widgets containing text; keep in mind that users may use -- a larger font because of difficulty reading the default, or they may be --- using Windows or the framebuffer port of GTK+, where different fonts are +-- using Windows or the framebuffer port of Gtk+, where different fonts are -- available. -- -- * Translation of text into other languages changes its size. Also, -- display of non-English text will use a different font in many cases. -- --- In addition, the fixed widget can\'t properly be mirrored in --- right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+ will --- flip the interface to put labels to the right of the thing they label, but --- it can\'t do that with "Fixed". So your application will not be usable in +-- In addition, the fixed widget can't properly be mirrored in right-to-left +-- languages such as Hebrew and Arabic. i.e. normally Gtk+ will flip the +-- interface to put labels to the right of the thing they label, but it can't +-- do that with "Fixed". So your application will not be usable in -- right-to-left languages. -- -- Finally, fixed positioning makes it kind of annoying to add\/remove GUI @@ -62,7 +63,25 @@ -- prefer the simplicity of "Fixed", by all means use the widget. But you -- should be aware of the tradeoffs. +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----Fixed +-- @ + +-- * Types + Fixed, + FixedClass, + castToFixed, + +-- * Constructors fixedNew, + +-- * Methods fixedPut, fixedMove, fixedSetHasWindow, @@ -78,6 +97,8 @@ {# context lib="gtk" prefix="gtk" #} +-------------------- +-- Constructors -- | Creates a new 'Fixed' container. -- @@ -85,6 +106,9 @@ fixedNew = makeNewObject mkFixed $ liftM castPtr $ {#call unsafe fixed_new#} +-------------------- +-- Methods + -- | Adds a widget to a 'Fixed' container at the given position. -- fixedPut :: (FixedClass obj, WidgetClass widget) => obj Index: Notebook.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/Notebook.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Notebook.chs.pp 12 Feb 2005 17:19:23 -0000 1.2 +++ Notebook.chs.pp 25 Feb 2005 01:11:34 -0000 1.3 @@ -19,25 +19,50 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Lesser General Public License for more details. -- +-- TODO +-- +-- The signals focus-tab and select-page are not bound because it is unclear +-- what they mean. As far as I can see they are not emitted anywhere. +-- -- | -- Maintainer : gtk...@li... -- Stability : provisional -- Portability : portable (depends on GHC) -- --- This widget can display several pages of widgets. Each page can be selected --- by a tab at the top of the widget. It is useful in dialogs where a lot of --- information has to be displayed. --- --- TODO --- --- * The signals focus-tab and select-page are not bound because it is unclear --- what they mean. As far as I can see they are not emitted anywhere. +-- A tabbed notebook container. -- module Graphics.UI.Gtk.Layout.Notebook ( +-- * Description +-- +-- | The 'Notebook' widget is a 'Container' whose children are pages that can +-- be switched between using tab labels along one edge. +-- +-- There are many configuration options for 'Notebook'. Among other things, +-- you can choose on which edge the tabs appear (see 'notebookSetTabPos'), +-- whether, if there are too many tabs to fit the noteobook should be made +-- bigger or scrolling arrows added (see 'notebookSetScrollable'), and +-- whether there will be a popup menu allowing the users to switch pages. (see +-- 'notebookEnablePopup', 'noteobookDisablePopup') + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----Notebook +-- @ + +-- * Types Notebook, NotebookClass, castToNotebook, + +-- * Constructors notebookNew, + +-- * Methods notebookAppendPage, notebookAppendPageMenu, notebookPrependPage, @@ -83,6 +108,8 @@ #endif notebookSetTabLabel, notebookSetTabLabelText, + +-- * Signals onSwitchPage, afterSwitchPage ) where @@ -100,7 +127,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | Create a new notebook. -- @@ -108,6 +136,9 @@ notebookNew = makeNewObject mkNotebook $ liftM castPtr {#call unsafe notebook_new#} +-------------------- +-- Methods + #if GTK_CHECK_VERSION(2,4,0) -- | Insert a new tab to the right of the existing tabs. -- @@ -635,8 +666,8 @@ withUTFString label $ \labelPtr -> {#call notebook_set_tab_label_text#} (toNotebook nb) (toWidget child) labelPtr - --- signals +-------------------- +-- Signals -- | This signal is emitted when a new page is -- selected. @@ -649,6 +680,3 @@ afterSwitchPage nb fun = connect_BOXED_WORD__NONE "switch-page" (const $ return ()) True nb (\_ page -> fun (fromIntegral page)) - - - Index: HButtonBox.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/HButtonBox.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- HButtonBox.chs 8 Jan 2005 15:23:11 -0000 1.1 +++ HButtonBox.chs 25 Feb 2005 01:11:34 -0000 1.2 @@ -2,30 +2,67 @@ -- GIMP Toolkit (GTK) Widget HButtonBox -- -- Author : Matthew Walton --- +-- -- Created: 29 April 2004 -- -- Version $Revision$ from $Date$ -- --- Copyright (c) 2004 Matthew Walton +-- Copyright (C) 2004-2005 Matthew Walton -- --- This file is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- 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 file is distributed in the hope that it will be useful, +-- 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 General Public License for more details. +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. -- -- | +-- Maintainer : gtk...@li... +-- Stability : provisional +-- Portability : portable (depends on GHC) +-- +-- A container for arranging buttons horizontally -- - module Graphics.UI.Gtk.Layout.HButtonBox ( +-- * Description +-- +-- | A button box should be used to provide a consistent layout of buttons +-- throughout your application. The layout\/spacing can be altered by the +-- programmer, or if desired, by the user to alter the \'feel\' of a program to +-- a small degree. +-- +-- A 'HButtonBox' is created with 'hButtonBoxNew'. Buttons are packed into a +-- button box the same way widgets are added to any other container, using +-- 'containerAdd'. You can also use 'boxPackStart' or 'boxPackEnd', but for +-- button boxes both these functions work just like 'containerAdd', ie., they +-- pack the button in a way that depends on the current layout style and on +-- whether the button has had 'buttonBoxSetChildSecondary' called on it. +-- +-- The spacing between buttons can be set with 'boxSetSpacing'. The +-- arrangement and layout of the buttons can be changed with +-- 'buttonBoxSetLayout'. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Box' +-- | +----'ButtonBox' +-- | +----HButtonBox +-- @ + +-- * Types HButtonBox, HButtonBoxClass, castToHButtonBox, + +-- * Constructors hButtonBoxNew ) where @@ -38,11 +75,11 @@ {# context lib="gtk" prefix="gtk" #} ---methods +-------------------- +-- Constructors -- | -- hButtonBoxNew :: IO HButtonBox hButtonBoxNew = makeNewObject mkHButtonBox $ liftM castPtr {#call unsafe hbutton_box_new#} - Index: HBox.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/HBox.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- HBox.chs 12 Feb 2005 17:19:23 -0000 1.2 +++ HBox.chs 25 Feb 2005 01:11:34 -0000 1.3 @@ -28,9 +28,34 @@ -- widgets in a horizontal line. -- module Graphics.UI.Gtk.Layout.HBox ( +-- * Description +-- +-- | 'HBox' is a container that organizes child widgets into a single row. +-- +-- Use the 'Box' packing interface to determine the arrangement, spacing, +-- width, and alignment of 'HBox' children. +-- +-- All children are allocated the same height. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Box' +-- | +----HBox +-- | +----'Combo' +-- | +----'Statusbar' +-- @ + +-- * Types HBox, HBoxClass, castToHBox, + +-- * Constructors hBoxNew ) where @@ -43,7 +68,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | -- Create a container that shows several children horizontally. If @@ -54,6 +80,3 @@ hBoxNew :: Bool -> Int -> IO HBox hBoxNew homogeneous spacing = makeNewObject mkHBox $ liftM castPtr $ {#call unsafe hbox_new#} (fromBool homogeneous) (fromIntegral spacing) - - --- Index: AspectFrame.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/AspectFrame.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AspectFrame.chs 12 Feb 2005 17:19:23 -0000 1.2 +++ AspectFrame.chs 25 Feb 2005 01:11:34 -0000 1.3 @@ -26,20 +26,36 @@ -- -- A frame that constrains its child to a particular aspect ratio. -- --- * The 'AspectFrame' is useful when you want pack a widget so --- that it can --- resize but always retains the same aspect ratio. For instance, one might --- be drawing a small preview of a larger image. 'AspectFrame' --- derives from --- 'Frame', so it can draw a label and a frame around the child. --- The frame --- will be \"shrink-wrapped\" to the size of the child. --- module Graphics.UI.Gtk.Layout.AspectFrame ( +-- * Description +-- +-- | The 'AspectFrame' is useful when you want pack a widget so that it can +-- resize but always retains the same aspect ratio. For instance, one might be +-- drawing a small preview of a larger image. 'AspectFrame' derives from +-- 'Frame', so it can draw a label and a frame around the child. The frame will +-- be \"shrink-wrapped\" to the size of the child. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----'Frame' +-- | +----AspectFrame +-- @ + +-- * Types AspectFrame, AspectFrameClass, castToAspectFrame, + +-- * Constructors aspectFrameNew, + +-- * Methods aspectFrameSet ) where @@ -53,7 +69,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | Create an AspectFrame widget. -- @@ -67,6 +84,8 @@ liftM castPtr $ {#call unsafe aspect_frame_new#} nullPtr (realToFrac xalign) (realToFrac yalign) (maybe 0.0 realToFrac ratio) (fromBool $ isNothing ratio) +-------------------- +-- Methods -- | Change the space use behaviour of an -- 'AspectFrame'. Index: Alignment.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/Alignment.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Alignment.chs.pp 12 Feb 2005 17:19:23 -0000 1.2 +++ Alignment.chs.pp 25 Feb 2005 01:11:34 -0000 1.3 @@ -27,10 +27,41 @@ -- A widget which controls the alignment and size of its child -- module Graphics.UI.Gtk.Layout.Alignment ( +-- * Description +-- +-- | The 'Alignment' widget controls the alignment and size of its child +-- widget. It has four settings: xscale, yscale, xalign, and yalign. +-- +-- The scale settings are used to specify how much the child widget should +-- expand to fill the space allocated to the 'Alignment'. The values can range +-- from 0 (meaning the child doesn't expand at all) to 1 (meaning the child +-- expands to fill all of the available space). +-- +-- The align settings are used to place the child widget within the +-- available area. The values range from 0 (top or left) to 1 (bottom or +-- right). Of course, if the scale settings are both set to 1, the alignment +-- settings have no effect. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----Alignment +-- @ + +-- * Types Alignment, AlignmentClass, castToAlignment, + +-- * Constructors alignmentNew, + +-- * Methods alignmentSet #if GTK_CHECK_VERSION(2,4,0) ,alignmentSetPadding, @@ -47,7 +78,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | Create an alignment widget. This widget tells -- its child widget how to use the given space. @@ -57,6 +89,8 @@ liftM castPtr $ {#call unsafe alignment_new#} (realToFrac xalign) (realToFrac yalign) (realToFrac xscale) (realToFrac yscale) +-------------------- +-- Methods -- | Change the space use behaviour of an 'Alignment'. -- Index: VPaned.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/VPaned.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VPaned.chs 12 Feb 2005 17:19:23 -0000 1.2 +++ VPaned.chs 25 Feb 2005 01:11:34 -0000 1.3 @@ -27,9 +27,29 @@ -- A container with two panes arranged vertically. -- module Graphics.UI.Gtk.Layout.VPaned ( +-- * Description +-- +-- | The VPaned widget is a container widget with two children arranged +-- vertically. The division between the two panes is adjustable by the user by +-- dragging a handle. See 'Paned' for details. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Paned' +-- | +----VPaned +-- @ + +-- * Types VPaned, VPanedClass, castToVPaned, + +-- * Constructors vPanedNew ) where @@ -42,7 +62,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | -- Index: Layout.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/Layout.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Layout.chs 12 Feb 2005 17:19:23 -0000 1.2 +++ Layout.chs 25 Feb 2005 01:11:34 -0000 1.3 @@ -20,17 +20,41 @@ -- Lesser General Public License for more details. -- -- | --- Maintainer : gtk2hs-users\@lists.sourceforge.net +-- Maintainer : gtk...@li... -- Stability : provisional -- Portability : portable (depends on GHC) -- --- A layout widget can hold several widgets at arbitrary positions. +-- Infinite scrollable area containing child widgets and\/or custom drawing -- module Graphics.UI.Gtk.Layout.Layout ( +-- * Description +-- +-- | 'Layout' is similar to 'DrawingArea' in that it's a \"blank slate\" and +-- doesn't do anything but paint a blank background by default. It's different +-- in that it supports scrolling natively (you can add it to a +-- 'ScrolledWindow'), and it can contain child widgets, since it's a +-- 'Container'. However if you\'re just going to draw, a 'DrawingArea' is a +-- better choice since it has lower overhead. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----Layout +-- @ + +-- * Types Layout, LayoutClass, castToLayout, + +-- * Constructors layoutNew, + +-- * Methods layoutPut, layoutMove, layoutSetSize, @@ -39,6 +63,8 @@ layoutGetVAdjustment, layoutSetHAdjustment, layoutSetVAdjustment, + +-- * Signals onSetScrollAdjustments, afterSetScrollAdjustments ) where @@ -53,7 +79,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | Create a new layout widget. -- @@ -64,6 +91,8 @@ fromMAdj :: Maybe Adjustment -> Adjustment fromMAdj = fromMaybe $ mkAdjustment nullForeignPtr +-------------------- +-- Methods -- | Insert a widget into the layout container. -- @@ -115,7 +144,8 @@ layoutSetVAdjustment :: LayoutClass l => l -> Adjustment -> IO () layoutSetVAdjustment l adj = {#call layout_set_vadjustment#} (toLayout l) adj --- signals +-------------------- +-- Signals -- | In case the adjustments are -- replaced, this signal is emitted. Index: VBox.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/VBox.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VBox.chs 12 Feb 2005 17:19:23 -0000 1.2 +++ VBox.chs 25 Feb 2005 01:11:34 -0000 1.3 @@ -28,9 +28,36 @@ -- in a vertical line. -- module Graphics.UI.Gtk.Layout.VBox ( +-- * Description +-- +-- | 'VBox' is a container that organizes child widgets into a single column. +-- +-- Use the 'Box' packing interface to determine the arrangement, spacing, +-- height, and alignment of 'VBox' children. +-- +-- All children are allocated the same width. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Box' +-- | +----VBox +-- | +----'ColorSelection' +-- | +----'FileChooserWidget' +-- | +----'FontSelection' +-- | +----'GammaCurve' +-- @ + +-- * Types VBox, VBoxClass, castToVBox, + +-- * Constructors vBoxNew ) where @@ -43,7 +70,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | -- Create a container that shows several children vertically. @@ -55,6 +83,3 @@ vBoxNew :: Bool -> Int -> IO VBox vBoxNew homogeneous spacing = makeNewObject mkVBox $ liftM castPtr $ {#call unsafe vbox_new#} (fromBool homogeneous) (fromIntegral spacing) - - - Index: Table.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/Table.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Table.chs 12 Feb 2005 17:19:23 -0000 1.2 +++ Table.chs 25 Feb 2005 01:11:34 -0000 1.3 @@ -27,10 +27,46 @@ -- The table widget is a container in which widgets can be aligned in cells. -- module Graphics.UI.Gtk.Layout.Table ( +-- * Description +-- +-- | The 'Table' functions allow the programmer to arrange widgets in rows and +-- columns, making it easy to align many widgets next to each other, +-- horizontally and vertically. +-- +-- Tables are created with a call to 'tableNew', the size of which can later +-- be changed with 'tableResize'. +-- +-- Widgets can be added to a table using 'tableAttach' or the more +-- convenient (but slightly less flexible) 'tableAttachDefaults'. +-- +-- To alter the space next to a specific row, use 'tableSetRowSpacing', and +-- for a column, 'tableSetColSpacing'. +-- +-- The gaps between /all/ rows or columns can be changed by calling +-- 'tableSetRowSpacings' or 'tableSetColSpacings' respectively. +-- +-- 'tableSetHomogeneous', can be used to set whether all cells in the table +-- will resize themselves to the size of the largest widget in the table. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----Table +-- @ + +-- * Types Table, TableClass, castToTable, + +-- * Constructors tableNew, + +-- * Methods tableResize, AttachOptions(..), tableAttach, @@ -57,7 +93,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | Create a new table with the specified dimensions. -- Set @homogeneous@ to True if all cells should be of the same size. @@ -67,6 +104,9 @@ {#call unsafe table_new#} (fromIntegral rows) (fromIntegral columns) (fromBool homogeneous) +-------------------- +-- Methods + -- | Change the dimensions of an already existing table. -- tableResize :: TableClass tb => tb -> Int -> Int -> IO () Index: Expander.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/Expander.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Expander.chs.pp 12 Feb 2005 17:19:23 -0000 1.2 +++ Expander.chs.pp 25 Feb 2005 01:11:34 -0000 1.3 @@ -24,22 +24,43 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- An Expander allows the user to hide or show its child by clicking on an --- expander triangle similar to the triangles used in a TreeView. +-- A container which can hide its child -- --- Normally you use an expander as you would use any other descendant of GtkBin --- you create the child widget and use containerAdd to add it to the expander. --- When the expander is toggled, it will take care of showing and hiding the --- child automatically. +module Graphics.UI.Gtk.Layout.Expander ( +-- * Description +-- +-- | A 'Expander' allows the user to hide or show its child by clicking on an +-- expander triangle similar to the triangles used in a 'TreeView'. -- --- * Added in GTK+ 2.4 +-- Normally you use an expander as you would use any other descendant of +-- 'Bin'; you create the child widget and use 'containerAdd' to add it to the +-- expander. When the expander is toggled, it will take care of showing and +-- hiding the child automatically. -- -module Graphics.UI.Gtk.Layout.Expander ( +-- * Module available since Gtk version 2.4 + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----Expander +-- @ + #if GTK_CHECK_VERSION(2,4,0) +-- * Types Expander, ExpanderClass, + castToExpander, + +-- * Constructors expanderNew, expanderNewWithMnemonic, + +-- * Methods expanderSetExpanded, expanderGetExpanded, expanderSetSpacing, @@ -52,6 +73,8 @@ expanderGetUseMarkup, expanderSetLabelWidget, expanderGetLabelWidget, + +-- * Signals onActivate, afterActivate #endif @@ -69,6 +92,9 @@ {# context lib="gtk" prefix ="gtk" #} +-------------------- +-- Constructors + expanderNew :: String -> IO Expander expanderNew label = makeNewObject mkExpander $ liftM castPtr $ @@ -81,6 +107,9 @@ withUTFString label $ \strPtr -> {# call gtk_expander_new_with_mnemonic #} strPtr +-------------------- +-- Methods + expanderSetExpanded :: Expander -> Bool -> IO () expanderSetExpanded expander expanded = {# call gtk_expander_set_expanded #} expander (fromBool expanded) @@ -132,6 +161,9 @@ makeNewObject mkWidget $ {# call gtk_expander_get_label_widget #} expander +-------------------- +-- Signals + onActivate :: Expander -> IO () -> IO (ConnectId Expander) afterActivate :: Expander -> IO () -> IO (ConnectId Expander) onActivate = connect_NONE__NONE "activate" False Index: HPaned.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/HPaned.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- HPaned.chs 12 Feb 2005 17:19:23 -0000 1.2 +++ HPaned.chs 25 Feb 2005 01:11:34 -0000 1.3 @@ -27,9 +27,29 @@ -- A container with two panes arranged horizontally. -- module Graphics.UI.Gtk.Layout.HPaned ( +-- * Description +-- +-- | The HPaned widget is a container widget with two children arranged +-- horizontally. The division between the two panes is adjustable by the user +-- by dragging a handle. See 'Paned' for details. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Paned' +-- | +----HPaned +-- @ + +-- * Types HPaned, HPanedClass, castToHPaned, + +-- * Constructors hPanedNew ) where @@ -42,7 +62,8 @@ {# context lib="gtk" prefix="gtk" #} --- methods +-------------------- +-- Constructors -- | -- Index: VButtonBox.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/VButtonBox.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VButtonBox.chs 8 Jan 2005 15:23:39 -0000 1.1 +++ VButtonBox.chs 25 Feb 2005 01:11:34 -0000 1.2 @@ -2,30 +2,67 @@ -- GIMP Toolkit (GTK) Widget VButtonBox -- -- Author : Matthew Walton --- +-- -- Created: 28 April 2004 -- -- Version $Revision$ from $Date$ -- --- Copyright (c) 2004 Matthew Walton +-- Copyright (C) 2004-2005 Matthew Walton -- --- This file is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- 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 file is distributed in the hope that it will be useful, +-- 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 General Public License for more details. +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. -- -- | +-- Maintainer : gtk...@li... +-- Stability : provisional +-- Portability : portable (depends on GHC) +-- +-- A container for arranging buttons vertically +-- +module Graphics.UI.Gtk.Layout.VButtonBox ( +-- * Description +-- +-- | A button box should be used to provide a consistent layout of buttons +-- throughout your application. The layout\/spacing can be altered by the +-- programmer, or if desired, by the user to alter the \'feel\' of a program to +-- a small degree. -- +-- A 'VButtonBox' is created with 'vButtonBoxNew'. Buttons are packed into a +-- button box the same way widgets are added to any other container, using +-- 'containerAdd'. You can also use 'boxPackStart' or 'boxPackEnd', but for +-- button boxes both these functions work just like 'containerAdd', ie., they +-- pack the button in a way that depends on the current layout style and on +-- whether the button has had 'buttonBoxSetChildSecondary' called on it. +-- +-- The spacing between buttons can be set with 'boxSetSpacing'. The +-- arrangement and layout of the buttons can be changed with +-- 'buttonBoxSetLayout'. -module Graphics.UI.Gtk.Layout.VButtonBox ( +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Box' +-- | +----'ButtonBox' +-- | +----VButtonBox +-- @ + +-- * Types VButtonBox, VButtonBoxClass, castToVButtonBox, + +-- * Constructors vButtonBoxNew ) where @@ -38,11 +75,11 @@ {# context lib="gtk" prefix="gtk" #} ---methods +-------------------- +-- Constructors -- | -- vButtonBoxNew :: IO VButtonBox vButtonBoxNew = makeNewObject mkVButtonBox $ liftM castPtr {#call unsafe vbutton_box_new#} - |