From: Duncan C. <dun...@us...> - 2005-03-13 19:35:17
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30354/gtk/Graphics/UI/Gtk/MenuComboToolbar Modified Files: CheckMenuItem.chs.pp ComboBoxEntry.chs.pp Menu.chs.pp MenuItem.chs ToolItem.chs.pp Toolbar.chs.pp 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: ComboBoxEntry.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ComboBoxEntry.chs.pp 25 Feb 2005 22:53:41 -0000 1.4 +++ ComboBoxEntry.chs.pp 13 Mar 2005 19:34:35 -0000 1.5 @@ -59,15 +59,19 @@ -- * Methods comboBoxEntrySetTextColumn, comboBoxEntryGetTextColumn, + +-- * Properties + comboBoxEntryTextColumn #endif -) where + ) where #if GTK_CHECK_VERSION(2,4,0) import Monad (liftM) import System.Glib.FFI +import System.Glib.Attributes (Attr(..)) +import System.Glib.GObject (makeNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) -import System.Glib.GObject (makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -104,4 +108,17 @@ liftM fromIntegral $ {# call gtk_combo_box_entry_get_text_column #} (toComboBoxEntry combo) +-------------------- +-- Properties + +-- | A column in the data source model to get the strings from. +-- +-- Allowed values: >= -1 +-- +-- Default value: -1 +-- +comboBoxEntryTextColumn :: Attr ComboBoxEntry Int +comboBoxEntryTextColumn = Attr + comboBoxEntryGetTextColumn + comboBoxEntrySetTextColumn #endif Index: Menu.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/Menu.chs.pp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Menu.chs.pp 25 Feb 2005 01:11:34 -0000 1.3 +++ Menu.chs.pp 13 Mar 2005 19:34:35 -0000 1.4 @@ -96,6 +96,10 @@ #if GTK_CHECK_VERSION(2,4,0) menuSetMonitor, #endif + +-- * Properties + menuTearoffState, + menuAccelGroup, ) where import Monad (liftM) @@ -103,6 +107,7 @@ import System.Glib.FFI import System.Glib.UTFString +import System.Glib.Attributes (Attr(..)) import System.Glib.GObject (makeNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} @@ -269,3 +274,20 @@ menuSetMonitor m monitorNum = {#call menu_set_monitor#} (toMenu m) (fromIntegral monitorNum) #endif + +-------------------- +-- Properties + +-- | +-- +menuTearoffState :: Attr Menu Bool +menuTearoffState = Attr + menuGetTearoffState + menuSetTearoffState + +-- | \'accelGroup\' property. See 'menuGetAccelGroup' and 'menuSetAccelGroup' +-- +menuAccelGroup :: Attr Menu AccelGroup +menuAccelGroup = Attr + menuGetAccelGroup + menuSetAccelGroup Index: ToolItem.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs.pp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ToolItem.chs.pp 25 Feb 2005 01:11:35 -0000 1.3 +++ ToolItem.chs.pp 13 Mar 2005 19:34:35 -0000 1.4 @@ -84,7 +84,15 @@ toolItemGetReliefStyle, toolItemRetrieveProxyMenuItem, toolItemGetProxyMenuItem, - toolItemSetProxyMenuItem + toolItemSetProxyMenuItem, + +-- * Properties + toolItemVisibleHorizontal, + toolItemVisibleVertical, + toolItemIsImportant, + toolItemExpand, + toolItemHomogeneous, + toolItemUseDragWindow #endif ) where @@ -94,6 +102,7 @@ import System.Glib.FFI import System.Glib.UTFString +import System.Glib.Attributes (Attr(..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -275,4 +284,59 @@ {#call tool_item_set_proxy_menu_item#} (toToolItem item) strPtr (toWidget menuItem) +-------------------- +-- Properties + +-- | Whether the toolbar item is visible when the toolbar is in a horizontal +-- orientation. +-- +-- Default value: @True@ +-- +toolItemVisibleHorizontal :: Attr ToolItem Bool +toolItemVisibleHorizontal = Attr + toolItemGetVisibleHorizontal + toolItemSetVisibleHorizontal + +-- | Whether the toolbar item is visible when the toolbar is in a vertical +-- orientation. +-- +-- Default value: @True@ +-- +toolItemVisibleVertical :: Attr ToolItem Bool +toolItemVisibleVertical = Attr + toolItemGetVisibleVertical + toolItemSetVisibleVertical + +-- | Whether the toolbar item is considered important. When @True@, toolbar +-- buttons show text in 'ToolbarBothHoriz' mode. +-- +-- Default value: @False@ +-- +toolItemIsImportant :: Attr ToolItem Bool +toolItemIsImportant = Attr + toolItemGetIsImportant + toolItemSetIsImportant + +-- | \'expand\' property. See 'toolItemGetExpand' and 'toolItemSetExpand' +-- +toolItemExpand :: Attr ToolItem Bool +toolItemExpand = Attr + toolItemGetExpand + toolItemSetExpand + +-- | \'homogeneous\' property. See 'toolItemGetHomogeneous' and +-- 'toolItemSetHomogeneous' +-- +toolItemHomogeneous :: Attr ToolItem Bool +toolItemHomogeneous = Attr + toolItemGetHomogeneous + toolItemSetHomogeneous + +-- | \'useDragWindow\' property. See 'toolItemGetUseDragWindow' and +-- 'toolItemSetUseDragWindow' +-- +toolItemUseDragWindow :: Attr ToolItem Bool +toolItemUseDragWindow = Attr + toolItemGetUseDragWindow + toolItemSetUseDragWindow #endif Index: MenuItem.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MenuItem.chs 25 Feb 2005 22:53:41 -0000 1.4 +++ MenuItem.chs 13 Mar 2005 19:34:35 -0000 1.5 @@ -90,6 +90,9 @@ onActivateItem, afterActivateItem, +-- * Properties + menuItemRightJustified, + -- * Signals onSelect, afterSelect, @@ -103,6 +106,7 @@ import System.Glib.FFI import System.Glib.UTFString +import System.Glib.Attributes (Attr(..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -204,6 +208,17 @@ {#call menu_item_set_accel_path#} (toMenuItem mi) strPtr -------------------- +-- Properties + +-- | \'rightJustified\' property. See 'menuItemGetRightJustified' and +-- 'menuItemSetRightJustified' +-- +menuItemRightJustified :: Attr MenuItem Bool +menuItemRightJustified = Attr + menuItemGetRightJustified + menuItemSetRightJustified + +-------------------- -- Signals -- | The user has chosen the menu item and the item does not contain a submenu. Index: CheckMenuItem.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs.pp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CheckMenuItem.chs.pp 25 Feb 2005 22:53:41 -0000 1.4 +++ CheckMenuItem.chs.pp 13 Mar 2005 19:34:34 -0000 1.5 @@ -65,17 +65,23 @@ checkMenuItemGetActive, checkMenuItemToggled, checkMenuItemSetInconsistent, - checkMenuItemGetInconsistent + checkMenuItemGetInconsistent, #if GTK_CHECK_VERSION(2,4,0) - ,checkMenuItemGetDrawAsRadio, - checkMenuItemSetDrawAsRadio + checkMenuItemGetDrawAsRadio, + checkMenuItemSetDrawAsRadio, #endif + +-- * Properties + checkMenuItemActive, + checkMenuItemInconsistent, + checkMenuItemDrawAsRadio ) where import Monad (liftM) import System.Glib.FFI import System.Glib.UTFString +import System.Glib.Attributes (Attr(..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -156,3 +162,32 @@ {#call unsafe check_menu_item_get_draw_as_radio#} (toCheckMenuItem mi) #endif +-------------------- +-- Properties + +-- | Whether the menu item is checked. +-- +-- Default value: @False@ +-- +checkMenuItemActive :: Attr CheckMenuItem Bool +checkMenuItemActive = Attr + checkMenuItemGetActive + checkMenuItemSetActive + +-- | Whether to display an \"inconsistent\" state. +-- +-- Default value: @False@ +-- +checkMenuItemInconsistent :: Attr CheckMenuItem Bool +checkMenuItemInconsistent = Attr + checkMenuItemGetInconsistent + checkMenuItemSetInconsistent + +-- | Whether the menu item looks like a radio menu item. +-- +-- Default value: @False@ +-- +checkMenuItemDrawAsRadio :: Attr CheckMenuItem Bool +checkMenuItemDrawAsRadio = Attr + checkMenuItemGetDrawAsRadio + checkMenuItemSetDrawAsRadio Index: Toolbar.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs.pp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Toolbar.chs.pp 25 Feb 2005 01:11:35 -0000 1.3 +++ Toolbar.chs.pp 13 Mar 2005 19:34:35 -0000 1.4 @@ -132,6 +132,14 @@ ReliefStyle(..), toolbarGetReliefStyle, #endif + +-- * Properties + toolbarOrientation, + toolbarShowArrow, + toolbarStyle, + toolbarTooltips, + +-- * Signals onOrientationChanged, afterOrientationChanged, onStyleChanged, @@ -145,6 +153,7 @@ import System.Glib.FFI import System.Glib.UTFString +import System.Glib.Attributes (Attr(..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -506,6 +515,41 @@ #endif -------------------- +-- Properties + +-- | The orientation of the toolbar. +-- +-- Default value: 'OrientationHorizontal' +-- +toolbarOrientation :: Attr Toolbar Orientation +toolbarOrientation = Attr + toolbarGetOrientation + toolbarSetOrientation + +-- | If an arrow should be shown if the toolbar doesn't fit. +-- +-- Default value: @True@ +-- +toolbarShowArrow :: Attr Toolbar Bool +toolbarShowArrow = Attr + toolbarGetShowArrow + toolbarSetShowArrow + +-- | \'style\' property. See 'toolbarGetStyle' and 'toolbarSetStyle' +-- +toolbarStyle :: Attr Toolbar ToolbarStyle +toolbarStyle = Attr + toolbarGetStyle + toolbarSetStyle + +-- | \'tooltips\' property. See 'toolbarGetTooltips' and 'toolbarSetTooltips' +-- +toolbarTooltips :: Attr Toolbar Bool +toolbarTooltips = Attr + toolbarGetTooltips + toolbarSetTooltips + +-------------------- -- Signals -- | Emitted when toolbarSetOrientation is called. |