From: Axel S. <as...@us...> - 2004-12-12 18:24:37
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9191/gtk/menuComboToolbar Modified Files: Toolbar.chs.pp Log Message: Changed comments in Toolbar, removed duplicated entry in Adjustment. Index: Toolbar.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/Toolbar.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Toolbar.chs.pp 1 Dec 2004 10:12:39 -0000 1.2 +++ Toolbar.chs.pp 12 Dec 2004 18:23:58 -0000 1.3 @@ -19,49 +19,47 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- | --- --- Create bars of buttons and other widgets. --- --- * This widget underwent a signficant overhaul in gtk 2.4 and the recommended --- api changed substantially. The old interface is still supported but it is --- not recommended. --- --- * The following information applies to the /new/ interface only. --- --- A toolbar is created using 'toolbarNew'. A toolbar can contain instances of --- a subclass of "ToolItem". To add a "ToolItem" to the a toolbar, use --- 'toolbarInsert'. To remove an item from the toolbar use 'containerRemove'. --- To add a button to the toolbar, add an instance of "ToolButton". --- --- Toolbar items can be visually grouped by adding instances of --- "SeparatorToolItem" to the toolbar. If a "SeparatorToolItem" has the --- \"expand\" property set to True and the \"draw\" property set to False the --- effect is to force all following items to the end of the toolbar. --- --- Creating a context menu for the toolbar can be done using --- 'onPopupContextMenu'. --- +{- | Create bars of buttons and other widgets. + + * This widget underwent a signficant overhaul in gtk 2.4 and the recommended + api changed substantially. The old interface is still supported but it is + not recommended. + + * The following information applies to the new interface only. + + A toolbar is created using 'toolbarNew'. A toolbar can contain instances of + a subclass of "ToolItem". To add a "ToolItem" to the a toolbar, use + 'toolbarInsert'. To remove an item from the toolbar use 'containerRemove'. + To add a button to the toolbar, add an instance of "ToolButton". + + Toolbar items can be visually grouped by adding instances of + "SeparatorToolItem" to the toolbar. If a "SeparatorToolItem" has the + \"expand\" property set to True and the \"draw\" property set to False the + effect is to force all following items to the end of the toolbar. + + Creating a context menu for the toolbar can be done using + 'onPopupContextMenu'. + #ifndef DISABLE_DEPRECATED --- * The following information applies to the old interface only. --- --- 'Button's, 'RadioButton's and 'ToggleButton's can be added by refering to --- stock images. Their size can be changed by calling 'toolbarSetIconSize'. In --- contrast, normal widget cannot be added. Due to the bad interface of --- GtkToolbar mnemonics of 'RadioButton's and 'ToggleButton's are not honored. --- --- All the append, insert and prepend functions use an internal function to --- do the actual work. In fact the interface is pretty skrewed up: To insert --- icons by using stock items is definitely the best practice as all other --- images cannot react to 'toolbarSetIconSize' and other theming actions. On --- the other hand 'toolbarInsertStock' always generates simple 'Button's --- but is the only function that is able to insert 'Mnemonic's on the label. --- Our solution is to use 'StockItem's to specify all 'Images' of the --- 'Buttons'. If the user inserts 'RadioButton's or 'ToggleButton's, the stock --- image lookup is done manually. A mnemonic in the labels is sadly not --- honored this way. --- + * The following information applies to the old interface only. + + 'Button's, 'RadioButton's and 'ToggleButton's can be added by refering to + stock images. Their size can be changed by calling 'toolbarSetIconSize'. In + contrast, normal widget cannot be added. Due to the bad interface of + GtkToolbar mnemonics of 'RadioButton's and 'ToggleButton's are not honored. + + All the append, insert and prepend functions use an internal function to + do the actual work. In fact the interface is pretty skrewed up: To insert + icons by using stock items is definitely the best practice as all other + images cannot react to 'toolbarSetIconSize' and other theming actions. On + the other hand 'toolbarInsertStock' always generates simple 'Button's + but is the only function that is able to insert 'Mnemonic's on the label. + Our solution is to use 'StockItem's to specify all 'Images' of the + 'Buttons'. If the user inserts 'RadioButton's or 'ToggleButton's, the stock + image lookup is done manually. A mnemonic in the labels is sadly not + honored this way. #endif +-} module Toolbar( Toolbar, ToolbarClass, |