{-# LINE 2 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget SeparatorToolItem -- -- Author : Duncan Coutts -- -- Created: 7 April 2005 -- -- Copyright (C) 2005 Duncan Coutts -- -- 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 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 -- Lesser General Public License for more details. -- -- | -- Maintainer : gtk2hs-users@lists.sourceforge.net -- Stability : provisional -- Portability : portable (depends on GHC) -- -- A toolbar item that separates groups of other toolbar items -- -- * Module available since Gtk+ version 2.4 -- module Graphics.UI.Gtk.MenuComboToolbar.SeparatorToolItem ( -- * Detail -- -- | A 'SeparatorToolItem' is a 'ToolItem' that separates groups of other -- 'ToolItem's. Depending on the theme, a 'SeparatorToolItem' will often look -- like a vertical line on horizontally docked toolbars. -- -- If the property \"expand\" is @True@ and the property \"draw\" is -- @False@, a 'SeparatorToolItem' will act as a \"spring\" that forces other -- items to the ends of the toolbar. -- -- Use 'separatorToolItemNew' to create a new 'SeparatorToolItem'. -- * Class Hierarchy -- | -- @ -- | 'GObject' -- | +----'Object' -- | +----'Widget' -- | +----'Container' -- | +----'Bin' -- | +----'ToolItem' -- | +----SeparatorToolItem -- @ -- * Types SeparatorToolItem, SeparatorToolItemClass, castToSeparatorToolItem, gTypeSeparatorToolItem, toSeparatorToolItem, -- * Constructors separatorToolItemNew, -- * Methods separatorToolItemSetDraw, separatorToolItemGetDraw, -- * Attributes separatorToolItemDraw, ) where import Control.Monad (liftM) import System.Glib.FFI import System.Glib.Attributes import Graphics.UI.Gtk.Abstract.Object (makeNewObject) import Graphics.UI.Gtk.Types {-# LINE 80 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-} {-# LINE 82 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-} -------------------- -- Constructors -- | Create a new 'SeparatorToolItem' -- separatorToolItemNew :: IO SeparatorToolItem separatorToolItemNew = makeNewObject mkSeparatorToolItem $ liftM (castPtr :: Ptr ToolItem -> Ptr SeparatorToolItem) $ gtk_separator_tool_item_new {-# LINE 94 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-} -------------------- -- Methods -- | Whether the separator tool item is drawn as a vertical line, or just -- blank. Setting this @False@ along with -- 'Graphics.UI.Gtk.MenuComboToolbar.ToolItem.toolItemSetExpand' is useful to -- create an item that forces following items to the end of the toolbar. -- separatorToolItemSetDraw :: SeparatorToolItemClass self => self -> Bool -> IO () separatorToolItemSetDraw self draw = (\(SeparatorToolItem arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_separator_tool_item_set_draw argPtr1 arg2) {-# LINE 106 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-} (toSeparatorToolItem self) (fromBool draw) -- | Returns whether the separator tool item is drawn as a line, or just blank. -- See 'separatorToolItemSetDraw'. -- separatorToolItemGetDraw :: SeparatorToolItemClass self => self -> IO Bool separatorToolItemGetDraw self = liftM toBool $ (\(SeparatorToolItem arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_separator_tool_item_get_draw argPtr1) {-# LINE 116 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-} (toSeparatorToolItem self) -------------------- -- Attributes -- | Whether the separator is drawn, or just blank. -- -- Default value: @True@ -- separatorToolItemDraw :: SeparatorToolItemClass self => Attr self Bool separatorToolItemDraw = newAttr separatorToolItemGetDraw separatorToolItemSetDraw foreign import ccall safe "gtk_separator_tool_item_new" gtk_separator_tool_item_new :: (IO (Ptr ToolItem)) foreign import ccall safe "gtk_separator_tool_item_set_draw" gtk_separator_tool_item_set_draw :: ((Ptr SeparatorToolItem) -> (CInt -> (IO ()))) foreign import ccall safe "gtk_separator_tool_item_get_draw" gtk_separator_tool_item_get_draw :: ((Ptr SeparatorToolItem) -> (IO CInt))