{-# LINE 2 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) Widget Toolbar---- Author : Axel Simon---- Created: 23 May 2001---- Copyright (C) 1999-2005 Axel Simon---- 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)---- Create bars of buttons and other widgets--moduleGraphics.UI.Gtk.MenuComboToolbar.Toolbar(-- * Detail---- | 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 with a call to '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'.-- | * 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-- "Toolbar" 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.-- * Class Hierarchy-- |-- @-- | 'GObject'-- | +----'Object'-- | +----'Widget'-- | +----'Container'-- | +----Toolbar-- @-- * TypesToolbar,ToolbarClass,castToToolbar,gTypeToolbar,toToolbar,Orientation(..),ToolbarStyle(..),-- * ConstructorstoolbarNew,-- * MethodstoolbarInsertNewButton,toolbarAppendNewButton,toolbarPrependNewButton,toolbarInsertNewToggleButton,toolbarAppendNewToggleButton,toolbarPrependNewToggleButton,toolbarInsertNewRadioButton,toolbarAppendNewRadioButton,toolbarPrependNewRadioButton,toolbarInsertNewWidget,toolbarAppendNewWidget,toolbarPrependNewWidget,toolbarSetOrientation,toolbarGetOrientation,toolbarSetStyle,toolbarGetStyle,toolbarUnsetStyle,toolbarSetTooltips,toolbarGetTooltips,IconSize(..),toolbarSetIconSize,toolbarGetIconSize,toolbarInsert,toolbarGetItemIndex,toolbarGetNItems,toolbarGetNthItem,toolbarGetDropIndex,toolbarSetDropHighlightItem,toolbarSetShowArrow,toolbarGetShowArrow,ReliefStyle(..),toolbarGetReliefStyle,-- * AttributestoolbarOrientation,toolbarShowArrow,toolbarTooltips,toolbarStyle,-- * Child AttributestoolbarChildExpand,toolbarChildHomogeneous,-- * SignalsonOrientationChanged,afterOrientationChanged,onStyleChanged,afterStyleChanged,onPopupContextMenu,afterPopupContextMenu,)whereimportControl.Monad(liftM)importData.Maybe(fromJust)importSystem.Glib.FFIimportSystem.Glib.UTFStringimportSystem.Glib.AttributesimportSystem.Glib.PropertiesimportGraphics.UI.Gtk.Abstract.Object(makeNewObject)importGraphics.UI.Gtk.Types{-# LINE 165 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}importGraphics.UI.Gtk.Signals{-# LINE 166 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}importGraphics.UI.Gtk.Abstract.ContainerChildPropertiesimportGraphics.UI.Gtk.General.Enums(Orientation(..),ToolbarStyle(..),ReliefStyle(..))importGraphics.UI.Gtk.General.StockItemsimportGraphics.UI.Gtk.General.Structs(toolbarChildToggleButton,toolbarChildRadioButton,IconSize(..))importGraphics.UI.Gtk.General.StockItems(stockLookupItem,siLabel,stockMissingImage)importGraphics.UI.Gtk.Display.Image(imageNewFromStock){-# LINE 180 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}---------------------- Constructors-- | Creates a new toolbar.--toolbarNew::IOToolbartoolbarNew=makeNewObjectmkToolbar$liftM(castPtr::PtrWidget->PtrToolbar)$gtk_toolbar_new{-# LINE 191 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}-- Make tooltips or not?--mkToolText::Maybe(String,String)->(CString->CString->IOa)->IOamkToolTextNothingfun=funnullPtrnullPtrmkToolText(Just(text,private))fun=withUTFStringtext$\txtPtr->withUTFStringprivate$\prvPtr->funtxtPtrprvPtr---------------------- Methods-- | Insert a new 'Button' into the 'Toolbar'.---- The new 'Button' is created at position @pos@, counting from 0.---- The icon and label for the button is referenced by @stockId@-- which must be a valid entry in the 'Toolbar's Style or the-- default 'IconFactory'.---- If you whish to have 'Tooltips' added to this button you can-- specify @Just (tipText, tipPrivate)@ , otherwise specify @Nothing@.---- The newly created 'Button' is returned. Use this button to-- add an action function with @\"connectToClicked\"@.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarInsertNewButton::ToolbarClassself=>self->Int->StockId->Maybe(String,String)->IOButtontoolbarInsertNewButtonselfposstockIdtooltips=withUTFStringstockId$\stockPtr->mkToolTexttooltips$\textPtrprivPtr->makeNewObjectmkButton$liftMcastPtr$(\(Toolbararg1)arg2arg3arg4arg5arg6arg7->withForeignPtrarg1$\argPtr1->gtk_toolbar_insert_stockargPtr1arg2arg3arg4arg5arg6arg7){-# LINE 230 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)stockPtrtextPtrprivPtrnullFunPtrnullPtr(fromIntegralpos)-- | Append a new 'Button' to the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarAppendNewButton::ToolbarClassself=>self->String->Maybe(String,String)->IOButtontoolbarAppendNewButtonself=toolbarInsertNewButtonself(-1)-- | Prepend a new 'Button' to the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarPrependNewButton::ToolbarClassself=>self->String->Maybe(String,String)->IOButtontoolbarPrependNewButtonself=toolbarInsertNewButtonself0-- | Insert a new 'ToggleButton' into the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarInsertNewToggleButton::ToolbarClassself=>self->Int->StockId->Maybe(String,String)->IOToggleButtontoolbarInsertNewToggleButtonselfposstockIdtooltips=domItem<-stockLookupItemstockIditem<-casemItemof(Justitem)->returnitemNothing->liftMfromJust$stockLookupItemstockMissingImageletlabel=(filter(/='_'))$siLabelitemsize<-toolbarGetIconSize(toToolbarself)image<-imageNewFromStockstockIdsizemakeNewObjectmkToggleButton$liftMcastPtr$withUTFStringlabel$\lblPtr->mkToolTexttooltips$\textPtrprivPtr->(\(Toolbararg1)arg2(Widgetarg3)arg4arg5arg6(Widgetarg7)arg8arg9arg10->withForeignPtrarg1$\argPtr1->withForeignPtrarg3$\argPtr3->withForeignPtrarg7$\argPtr7->gtk_toolbar_insert_elementargPtr1arg2argPtr3arg4arg5arg6argPtr7arg8arg9arg10)(toToolbarself)toolbarChildToggleButton(WidgetnullForeignPtr)lblPtrtextPtrprivPtr(toWidgetimage)nullFunPtrnullPtr(fromIntegralpos)-- | Append a new 'ToggleButton' to the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarAppendNewToggleButton::ToolbarClassself=>self->String->Maybe(String,String)->IOToggleButtontoolbarAppendNewToggleButtonself=toolbarInsertNewToggleButtonself(-1)-- | Prepend a new 'ToggleButton' to the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarPrependNewToggleButton::ToolbarClassself=>self->String->Maybe(String,String)->IOToggleButtontoolbarPrependNewToggleButtonself=toolbarInsertNewToggleButtonself0-- | Insert a new 'RadioButton' into the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.---- The @parent@ argument must be set to another-- 'RadioButton' in the group. If @Nothing@ is given,-- a new group is generated (which is the desired behavious for the-- first button of a group).---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarInsertNewRadioButton::(ToolbarClassself,RadioButtonClassrb)=>self->Int->StockId->Maybe(String,String)->Mayberb->IORadioButtontoolbarInsertNewRadioButtonselfposstockIdtooltipsrb=domItem<-stockLookupItemstockIditem<-casemItemof(Justitem)->returnitemNothing->liftMfromJust$stockLookupItemstockMissingImageletlabel=(filter(/='_'))$siLabelitemsize<-toolbarGetIconSize(toToolbarself)image<-imageNewFromStockstockIdsizemakeNewObjectmkRadioButton$liftMcastPtr$withUTFStringlabel$\lblPtr->mkToolTexttooltips$\textPtrprivPtr->(\(Toolbararg1)arg2(Widgetarg3)arg4arg5arg6(Widgetarg7)arg8arg9arg10->withForeignPtrarg1$\argPtr1->withForeignPtrarg3$\argPtr3->withForeignPtrarg7$\argPtr7->gtk_toolbar_insert_elementargPtr1arg2argPtr3arg4arg5arg6argPtr7arg8arg9arg10)(toToolbarself)toolbarChildRadioButton(maybe(WidgetnullForeignPtr)toWidgetrb)lblPtrtextPtrprivPtr(toWidgetimage)nullFunPtrnullPtr(fromIntegralpos)-- | Append a new 'RadioButton' to the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarAppendNewRadioButton::(ToolbarClassself,RadioButtonClassrb)=>self->String->Maybe(String,String)->Mayberb->IORadioButtontoolbarAppendNewRadioButtonself=toolbarInsertNewRadioButtonself(-1)-- | Prepend a new 'RadioButton' to the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarPrependNewRadioButton::(ToolbarClassself,RadioButtonClassrb)=>self->String->Maybe(String,String)->Mayberb->IORadioButtontoolbarPrependNewRadioButtonself=toolbarInsertNewRadioButtonself0-- | Insert an arbitrary widget to the 'Toolbar'.---- The 'Widget' should not be a button. Adding 'Button's-- with the 'toolbarInsertButton',... functions with stock-- objects is much better as it takes care of theme handling.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarInsertNewWidget::(ToolbarClassself,WidgetClassw)=>self->Int->w->Maybe(String,String)->IO()toolbarInsertNewWidgetselfposwtooltips=mkToolTexttooltips$\textPtrprivPtr->(\(Toolbararg1)(Widgetarg2)arg3arg4arg5->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_toolbar_insert_widgetargPtr1argPtr2arg3arg4arg5){-# LINE 397 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)(toWidgetw)textPtrprivPtr(fromIntegralpos)-- | Append a new 'Widget' to the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarAppendNewWidget::(ToolbarClassself,WidgetClassw)=>self->w->Maybe(String,String)->IO()toolbarAppendNewWidgetself=toolbarInsertNewWidgetself(-1)-- | Prepend a new 'Widget' to the 'Toolbar'.---- See 'toolbarInsertNewButton' for details.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarPrependNewWidget::(ToolbarClassself,WidgetClassw)=>self->w->Maybe(String,String)->IO()toolbarPrependNewWidgetself=toolbarInsertNewWidgetself0-- | Sets whether a toolbar should appear horizontally or vertically.--toolbarSetOrientation::ToolbarClassself=>self->Orientation->IO()toolbarSetOrientationselforientation=(\(Toolbararg1)arg2->withForeignPtrarg1$\argPtr1->gtk_toolbar_set_orientationargPtr1arg2){-# LINE 435 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)((fromIntegral.fromEnum)orientation)-- | Retrieves the current orientation of the toolbar. See-- 'toolbarSetOrientation'.--toolbarGetOrientation::ToolbarClassself=>self->IOOrientationtoolbarGetOrientationself=liftM(toEnum.fromIntegral)$(\(Toolbararg1)->withForeignPtrarg1$\argPtr1->gtk_toolbar_get_orientationargPtr1){-# LINE 445 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)-- | Alters the view of the toolbar to display either icons only, text only, or-- both.--toolbarSetStyle::ToolbarClassself=>self->ToolbarStyle->IO()toolbarSetStyleselfstyle=(\(Toolbararg1)arg2->withForeignPtrarg1$\argPtr1->gtk_toolbar_set_styleargPtr1arg2){-# LINE 453 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)((fromIntegral.fromEnum)style)-- | Retrieves whether the toolbar has text, icons, or both. See-- 'toolbarSetStyle'.--toolbarGetStyle::ToolbarClassself=>self->IOToolbarStyletoolbarGetStyleself=liftM(toEnum.fromIntegral)$(\(Toolbararg1)->withForeignPtrarg1$\argPtr1->gtk_toolbar_get_styleargPtr1){-# LINE 463 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)-- | Unsets a toolbar style set with 'toolbarSetStyle', so that user-- preferences will be used to determine the toolbar style.--toolbarUnsetStyle::ToolbarClassself=>self->IO()toolbarUnsetStyleself=(\(Toolbararg1)->withForeignPtrarg1$\argPtr1->gtk_toolbar_unset_styleargPtr1){-# LINE 471 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)-- | Sets if the tooltips of a toolbar should be active or not.--toolbarSetTooltips::ToolbarClassself=>self->Bool-- ^ @enable@ - set to @False@ to disable the tooltips, or @True@ to-- enable them.->IO()toolbarSetTooltipsselfenable=(\(Toolbararg1)arg2->withForeignPtrarg1$\argPtr1->gtk_toolbar_set_tooltipsargPtr1arg2){-# LINE 481 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)(fromBoolenable)-- | Retrieves whether tooltips are enabled. See 'toolbarSetTooltips'.--toolbarGetTooltips::ToolbarClassself=>self->IOBooltoolbarGetTooltipsself=liftMtoBool$(\(Toolbararg1)->withForeignPtrarg1$\argPtr1->gtk_toolbar_get_tooltipsargPtr1){-# LINE 490 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)-- | This function sets the size of stock icons in the toolbar. You can call-- it both before you add the icons and after they\'ve been added. The size you-- set will override user preferences for the default icon size.---- It might be sensible to restrict oneself to 'IconSizeSmallToolbar' and-- 'IconSizeLargeToolbar'.---- * Warning: this function is deprecated and should not be used in-- newly-written code.--toolbarSetIconSize::ToolbarClassself=>self->IconSize->IO()toolbarSetIconSizeselficonSize=(\(Toolbararg1)arg2->withForeignPtrarg1$\argPtr1->gtk_toolbar_set_icon_sizeargPtr1arg2){-# LINE 506 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)((fromIntegral.fromEnum)iconSize)-- | Retrieves the icon size for the toolbar. See 'toolbarSetIconSize'.--toolbarGetIconSize::ToolbarClassself=>self->IOIconSizetoolbarGetIconSizeself=liftM(toEnum.fromIntegral)$(\(Toolbararg1)->withForeignPtrarg1$\argPtr1->gtk_toolbar_get_icon_sizeargPtr1){-# LINE 516 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)-- | Insert a 'ToolItem' into the toolbar at position @pos@. If @pos@ is 0 the-- item is prepended to the start of the toolbar. If @pos@ is negative, the-- item is appended to the end of the toolbar.---- * Available since Gtk version 2.4--toolbarInsert::(ToolbarClassself,ToolItemClassitem)=>self->item-- ^ @item@ - a 'ToolItem'->Int-- ^ @pos@ - the position of the new item->IO()toolbarInsertselfitempos=(\(Toolbararg1)(ToolItemarg2)arg3->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_toolbar_insertargPtr1argPtr2arg3){-# LINE 531 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)(toToolItemitem)(fromIntegralpos)-- | Returns the position of @item@ on the toolbar, starting from 0. It is an-- error if @item@ is not a child of the toolbar.---- * Available since Gtk version 2.4--toolbarGetItemIndex::(ToolbarClassself,ToolItemClassitem)=>self->item-- ^ @item@ - a 'ToolItem' that is a child of @toolbar@->IOInt-- ^ returns the position of item on the toolbar.toolbarGetItemIndexselfitem=liftMfromIntegral$(\(Toolbararg1)(ToolItemarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_toolbar_get_item_indexargPtr1argPtr2){-# LINE 546 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)(toToolItemitem)-- | Returns the number of items on the toolbar.---- * Available since Gtk version 2.4--toolbarGetNItems::ToolbarClassself=>self->IOInttoolbarGetNItemsself=liftMfromIntegral$(\(Toolbararg1)->withForeignPtrarg1$\argPtr1->gtk_toolbar_get_n_itemsargPtr1){-# LINE 557 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)-- | Returns the @n@\'th item on toolbar, or @Nothing@ if the toolbar does not-- contain an @n@'th item.---- * Available since Gtk+ version 2.4--toolbarGetNthItem::ToolbarClassself=>self->Int-- ^ @n@ - A position on the toolbar->IO(MaybeToolItem)-- ^ returns The @n@'th 'ToolItem' on the toolbar, or-- @Nothing@ if there isn't an @n@\'th item.toolbarGetNthItemselfn=maybeNull(makeNewObjectmkToolItem)$(\(Toolbararg1)arg2->withForeignPtrarg1$\argPtr1->gtk_toolbar_get_nth_itemargPtr1arg2){-# LINE 571 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)(fromIntegraln)-- | Returns the position corresponding to the indicated point on toolbar.-- This is useful when dragging items to the toolbar: this function returns the-- position a new item should be inserted.---- * Available since Gtk version 2.4--toolbarGetDropIndex::ToolbarClassself=>self->(Int,Int)-- ^ @(x, y)@ - coordinate of a point on the toolbar. Note that-- @(x, y)@ are in toolbar coordinates, not window coordinates.->IOInt-- ^ returns The position corresponding to the point @(x, y)@ on-- the toolbar.toolbarGetDropIndexself(x,y)=liftMfromIntegral$(\(Toolbararg1)arg2arg3->withForeignPtrarg1$\argPtr1->gtk_toolbar_get_drop_indexargPtr1arg2arg3){-# LINE 588 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)(fromIntegralx)(fromIntegraly)-- | Highlights the toolbar to give an idea of what it would look like if @item@-- was added to toolbar at the position indicated by @index@. If @item@ is-- @Nothing@, highlighting is turned off (and the index is ignored).---- The @toolItem@ passed to this function must not be part of any widget-- hierarchy. When an item is set as a drop highlight item it can not added to-- any widget hierarchy or used as highlight item for another toolbar.---- * Available since Gtk version 2.4--toolbarSetDropHighlightItem::(ToolbarClassself,ToolItemClasstoolItem)=>self->MaybetoolItem-- ^ @toolItem@ - a 'ToolItem', or @Nothing@ to turn of-- highlighting->Int-- ^ @index@ - a position on the toolbar->IO()toolbarSetDropHighlightItemselftoolItemindex=(\(Toolbararg1)(ToolItemarg2)arg3->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_toolbar_set_drop_highlight_itemargPtr1argPtr2arg3){-# LINE 609 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)(maybe(ToolItemnullForeignPtr)toToolItemtoolItem)(fromIntegralindex)-- | Sets whether to show an overflow menu when the toolbar doesn't have room-- for all items on it. If @True@, items that there are not room are available-- through an overflow menu.---- * Available since Gtk version 2.4--toolbarSetShowArrow::ToolbarClassself=>self->Bool->IO()toolbarSetShowArrowselfshowArrow=(\(Toolbararg1)arg2->withForeignPtrarg1$\argPtr1->gtk_toolbar_set_show_arrowargPtr1arg2){-# LINE 622 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)(fromBoolshowArrow)-- | Returns whether the toolbar has an overflow menu. See-- 'toolbarSetShowArrow'.---- * Available since Gtk+ version 2.4--toolbarGetShowArrow::ToolbarClassself=>self->IOBooltoolbarGetShowArrowself=liftMtoBool$(\(Toolbararg1)->withForeignPtrarg1$\argPtr1->gtk_toolbar_get_show_arrowargPtr1){-# LINE 634 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)-- | Returns the relief style of buttons on the toolbar. See 'buttonSetRelief'.---- * Available since Gtk+ version 2.4--toolbarGetReliefStyle::ToolbarClassself=>self->IOReliefStyletoolbarGetReliefStyleself=liftM(toEnum.fromIntegral)$(\(Toolbararg1)->withForeignPtrarg1$\argPtr1->gtk_toolbar_get_relief_styleargPtr1){-# LINE 644 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}(toToolbarself)---------------------- Attributes-- | The orientation of the toolbar.---- Default value: 'OrientationHorizontal'--toolbarOrientation::ToolbarClassself=>AttrselfOrientationtoolbarOrientation=newAttrtoolbarGetOrientationtoolbarSetOrientation-- | How to draw the toolbar.---- Default value: 'ToolbarIcons'--toolbarStyle::ToolbarClassself=>AttrselfToolbarStyletoolbarStyle=newAttrFromEnumProperty"toolbar-style"gtk_toolbar_style_get_type{-# LINE 666 "./Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs" #-}-- | If an arrow should be shown if the toolbar doesn't fit.---- Default value: @True@--toolbarShowArrow::ToolbarClassself=>AttrselfBooltoolbarShowArrow=newAttrtoolbarGetShowArrowtoolbarSetShowArrow-- | If the tooltips of the toolbar should be active or not.---- Default value: @True@--toolbarTooltips::ToolbarClassself=>AttrselfBooltoolbarTooltips=newAttrtoolbarGetTooltipstoolbarSetTooltips---------------------- Child Attributes-- | Whether the item should receive extra space when the toolbar grows.---- Default value: @True@--toolbarChildExpand::(ToolbarClassself,WidgetClasschild)=>child->AttrselfBooltoolbarChildExpand=newAttrFromContainerChildBoolProperty"expand"-- | Whether the item should be the same size as other homogeneous items.---- Default value: @True@--toolbarChildHomogeneous::(ToolbarClassself,WidgetClasschild)=>child->AttrselfBooltoolbarChildHomogeneous=newAttrFromContainerChildBoolProperty"homogeneous"---------------------- Signals-- | Emitted when the orientation of the toolbar changes.--onOrientationChanged,afterOrientationChanged::ToolbarClassself=>self->(Orientation->IO())->IO(ConnectIdself)onOrientationChanged=connect_ENUM__NONE"orientation-changed"FalseafterOrientationChanged=connect_ENUM__NONE"orientation-changed"True-- | Emitted when the style of the toolbar changes.--onStyleChanged,afterStyleChanged::ToolbarClassself=>self->(ToolbarStyle->IO())->IO(ConnectIdself)onStyleChanged=connect_ENUM__NONE"style-changed"FalseafterStyleChanged=connect_ENUM__NONE"style-changed"True-- | Emitted when the user right-clicks the toolbar or uses the keybinding to-- display a popup menu.---- Application developers should handle this signal if they want to display-- a context menu on the toolbar. The context-menu should appear at the-- coordinates given by @x@ and @y@. The mouse button number is given by the-- @button@ parameter. If the menu was popped up using the keybaord, @button@-- is -1.--onPopupContextMenu,afterPopupContextMenu::ToolbarClassself=>self->(Int->Int->Int->IOBool)-- ^ @(\x y button -> ...)@ - The handler-- should return True if the signal was-- handled, False if not.->IO(ConnectIdself)onPopupContextMenu=connect_INT_INT_INT__BOOL"popup-context-menu"FalseafterPopupContextMenu=connect_INT_INT_INT__BOOL"popup-context-menu"Trueforeignimportccallunsafe"gtk_toolbar_new"gtk_toolbar_new::(IO(PtrWidget))foreignimportccallunsafe"gtk_toolbar_insert_stock"gtk_toolbar_insert_stock::((PtrToolbar)->((PtrCChar)->((PtrCChar)->((PtrCChar)->((FunPtr(IO()))->((Ptr())->(CInt->(IO(PtrWidget)))))))))foreignimportccallunsafe"gtk_toolbar_insert_element"gtk_toolbar_insert_element::((PtrToolbar)->(CInt->((PtrWidget)->((PtrCChar)->((PtrCChar)->((PtrCChar)->((PtrWidget)->((FunPtr(IO()))->((Ptr())->(CInt->(IO(PtrWidget))))))))))))foreignimportccallunsafe"gtk_toolbar_insert_widget"gtk_toolbar_insert_widget::((PtrToolbar)->((PtrWidget)->((PtrCChar)->((PtrCChar)->(CInt->(IO()))))))foreignimportccallsafe"gtk_toolbar_set_orientation"gtk_toolbar_set_orientation::((PtrToolbar)->(CInt->(IO())))foreignimportccallunsafe"gtk_toolbar_get_orientation"gtk_toolbar_get_orientation::((PtrToolbar)->(IOCInt))foreignimportccallsafe"gtk_toolbar_set_style"gtk_toolbar_set_style::((PtrToolbar)->(CInt->(IO())))foreignimportccallsafe"gtk_toolbar_get_style"gtk_toolbar_get_style::((PtrToolbar)->(IOCInt))foreignimportccallsafe"gtk_toolbar_unset_style"gtk_toolbar_unset_style::((PtrToolbar)->(IO()))foreignimportccallsafe"gtk_toolbar_set_tooltips"gtk_toolbar_set_tooltips::((PtrToolbar)->(CInt->(IO())))foreignimportccallunsafe"gtk_toolbar_get_tooltips"gtk_toolbar_get_tooltips::((PtrToolbar)->(IOCInt))foreignimportccallsafe"gtk_toolbar_set_icon_size"gtk_toolbar_set_icon_size::((PtrToolbar)->(CInt->(IO())))foreignimportccallunsafe"gtk_toolbar_get_icon_size"gtk_toolbar_get_icon_size::((PtrToolbar)->(IOCInt))foreignimportccallsafe"gtk_toolbar_insert"gtk_toolbar_insert::((PtrToolbar)->((PtrToolItem)->(CInt->(IO()))))foreignimportccallunsafe"gtk_toolbar_get_item_index"gtk_toolbar_get_item_index::((PtrToolbar)->((PtrToolItem)->(IOCInt)))foreignimportccallunsafe"gtk_toolbar_get_n_items"gtk_toolbar_get_n_items::((PtrToolbar)->(IOCInt))foreignimportccallunsafe"gtk_toolbar_get_nth_item"gtk_toolbar_get_nth_item::((PtrToolbar)->(CInt->(IO(PtrToolItem))))foreignimportccallunsafe"gtk_toolbar_get_drop_index"gtk_toolbar_get_drop_index::((PtrToolbar)->(CInt->(CInt->(IOCInt))))foreignimportccallsafe"gtk_toolbar_set_drop_highlight_item"gtk_toolbar_set_drop_highlight_item::((PtrToolbar)->((PtrToolItem)->(CInt->(IO()))))foreignimportccallsafe"gtk_toolbar_set_show_arrow"gtk_toolbar_set_show_arrow::((PtrToolbar)->(CInt->(IO())))foreignimportccallunsafe"gtk_toolbar_get_show_arrow"gtk_toolbar_get_show_arrow::((PtrToolbar)->(IOCInt))foreignimportccallunsafe"gtk_toolbar_get_relief_style"gtk_toolbar_get_relief_style::((PtrToolbar)->(IOCInt))foreignimportccallunsafe"gtk_toolbar_style_get_type"gtk_toolbar_style_get_type::CUInt