{-# LINE 2 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) Widget MenuToolButton---- 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 'ToolItem' containing a button with an additional dropdown menu---- * Module available since Gtk+ version 2.6--moduleGraphics.UI.Gtk.MenuComboToolbar.MenuToolButton(-- * Detail---- | A 'MenuToolButton' is a 'ToolItem' that contains a button and a small-- additional button with an arrow. When clicked, the arrow button pops up a-- dropdown menu.---- Use 'menuToolButtonNew' to create a new 'MenuToolButton'. Use-- 'menuToolButtonNewFromStock' to create a new 'MenuToolButton' containing a-- stock item.-- * Class Hierarchy-- |-- @-- | 'GObject'-- | +----'Object'-- | +----'Widget'-- | +----'Container'-- | +----'Bin'-- | +----'ToolItem'-- | +----'ToolButton'-- | +----MenuToolButton-- @-- * TypesMenuToolButton,MenuToolButtonClass,castToMenuToolButton,gTypeMenuToolButton,toMenuToolButton,-- * ConstructorsmenuToolButtonNew,menuToolButtonNewFromStock,-- * MethodsmenuToolButtonSetMenu,menuToolButtonGetMenu,menuToolButtonSetArrowTooltip,menuToolButtonSetArrowTooltipText,menuToolButtonSetArrowTooltipMarkup,-- * AttributesmenuToolButtonMenu,-- * SignalsonShowMenu,afterShowMenu,)whereimportControl.Monad(liftM)importSystem.Glib.FFIimportSystem.Glib.UTFStringimportSystem.Glib.AttributesimportGraphics.UI.Gtk.Abstract.Object(makeNewObject)importGraphics.UI.Gtk.Types{-# LINE 90 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}importGraphics.UI.Gtk.Signals{-# LINE 91 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}importGraphics.UI.Gtk.General.StockItemsimportGraphics.Rendering.Pango.Markup{-# LINE 95 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}---------------------- Constructors-- | Creates a new 'MenuToolButton' using @iconWidget@ as icon and @label@ as-- label.--menuToolButtonNew::WidgetClassiconWidget=>MaybeiconWidget-- ^ @iconWidget@ - a widget that will be used as icon-- widget, or @Nothing@->MaybeString-- ^ @label@ - a string that will be used as label, or-- @Nothing@->IOMenuToolButtonmenuToolButtonNewiconWidgetlabel=makeNewObjectmkMenuToolButton$liftM(castPtr::PtrToolItem->PtrMenuToolButton)$maybeWithwithUTFStringlabel$\labelPtr->(\(Widgetarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_menu_tool_button_newargPtr1arg2){-# LINE 114 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}(maybe(WidgetnullForeignPtr)toWidgeticonWidget)labelPtr-- | Creates a new 'MenuToolButton'. The new 'MenuToolButton' will contain an-- icon and label from the stock item indicated by @stockId@.--menuToolButtonNewFromStock::StockId-- ^ @stockId@ - the name of a stock item->IOMenuToolButtonmenuToolButtonNewFromStockstockId=makeNewObjectmkMenuToolButton$liftM(castPtr::PtrToolItem->PtrMenuToolButton)$withUTFStringstockId$\stockIdPtr->gtk_menu_tool_button_new_from_stock{-# LINE 128 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}stockIdPtr---------------------- Methods-- | Sets the 'Menu' that is popped up when the user clicks on the arrow. If-- @menu@ is @Nothing@, the arrow button becomes insensitive.--menuToolButtonSetMenu::(MenuToolButtonClassself,MenuClassmenu)=>self->Maybemenu-- ^ @menu@ - the 'Menu' associated with 'MenuToolButton'->IO()menuToolButtonSetMenuselfmenu=(\(MenuToolButtonarg1)(Widgetarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_menu_tool_button_set_menuargPtr1argPtr2){-# LINE 141 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}(toMenuToolButtonself)(maybe(WidgetnullForeignPtr)toWidgetmenu)-- | Gets the 'Menu' associated with 'MenuToolButton'.--menuToolButtonGetMenu::MenuToolButtonClassself=>self->IO(MaybeMenu)menuToolButtonGetMenuself=maybeNull(makeNewObjectmkMenu)$liftM(castPtr::PtrWidget->PtrMenu)$(\(MenuToolButtonarg1)->withForeignPtrarg1$\argPtr1->gtk_menu_tool_button_get_menuargPtr1){-# LINE 151 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}(toMenuToolButtonself)-- | Sets the 'Tooltips' object to be used for arrow button which pops up the-- menu. See 'Graphics.UI.Gtk.MenuComboToolbar.ToolItem.toolItemSetTooltip'-- for setting a tooltip on the whole 'MenuToolButton'.--menuToolButtonSetArrowTooltip::MenuToolButtonClassself=>self->Tooltips-- ^ @tooltips@ - the 'Tooltips' object to be used->String-- ^ @tipText@ - text to be used as tooltip text for tool item->String-- ^ @tipPrivate@ - text to be used as private tooltip text->IO()menuToolButtonSetArrowTooltipselftooltipstipTexttipPrivate=withUTFStringtipPrivate$\tipPrivatePtr->withUTFStringtipText$\tipTextPtr->(\(MenuToolButtonarg1)(Tooltipsarg2)arg3arg4->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_menu_tool_button_set_arrow_tooltipargPtr1argPtr2arg3arg4){-# LINE 166 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}(toMenuToolButtonself)tooltipstipTextPtrtipPrivatePtr-- | Sets the tooltip text to be used as tooltip for the arrow button which-- pops up the menu. See 'toolItemSetTooltip' for setting a tooltip on the-- whole 'MenuToolButton'.---- * Available since Gtk+ version 2.12--menuToolButtonSetArrowTooltipText::MenuToolButtonClassself=>self->String-- ^ @text@ - text to be used as tooltip text for button's arrow-- button->IO()menuToolButtonSetArrowTooltipTextselftext=withUTFStringtext$\textPtr->(\(MenuToolButtonarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_menu_tool_button_set_arrow_tooltip_textargPtr1arg2){-# LINE 185 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}(toMenuToolButtonself)textPtr-- | Sets the tooltip markup text to be used as tooltip for the arrow button-- which pops up the menu. See 'toolItemSetTooltip' for setting a tooltip on-- the whole 'MenuToolButton'.---- * Available since Gtk+ version 2.12--menuToolButtonSetArrowTooltipMarkup::MenuToolButtonClassself=>self->Markup-- ^ @markup@ - markup text to be used as tooltip text for button's-- arrow button->IO()menuToolButtonSetArrowTooltipMarkupselfmarkup=withUTFStringmarkup$\markupPtr->(\(MenuToolButtonarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_menu_tool_button_set_arrow_tooltip_markupargPtr1arg2){-# LINE 201 "./Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs" #-}(toMenuToolButtonself)markupPtr---------------------- Attributes-- | The dropdown menu.--menuToolButtonMenu::(MenuToolButtonClassself,MenuClassmenu)=>ReadWriteAttrself(MaybeMenu)(Maybemenu)menuToolButtonMenu=newAttrmenuToolButtonGetMenumenuToolButtonSetMenu---------------------- Signals-- |--onShowMenu,afterShowMenu::MenuToolButtonClassself=>self->IO()->IO(ConnectIdself)onShowMenu=connect_NONE__NONE"show-menu"FalseafterShowMenu=connect_NONE__NONE"show-menu"Trueforeignimportccallsafe"gtk_menu_tool_button_new"gtk_menu_tool_button_new::((PtrWidget)->((PtrCChar)->(IO(PtrToolItem))))foreignimportccallsafe"gtk_menu_tool_button_new_from_stock"gtk_menu_tool_button_new_from_stock::((PtrCChar)->(IO(PtrToolItem)))foreignimportccallsafe"gtk_menu_tool_button_set_menu"gtk_menu_tool_button_set_menu::((PtrMenuToolButton)->((PtrWidget)->(IO())))foreignimportccallsafe"gtk_menu_tool_button_get_menu"gtk_menu_tool_button_get_menu::((PtrMenuToolButton)->(IO(PtrWidget)))foreignimportccallsafe"gtk_menu_tool_button_set_arrow_tooltip"gtk_menu_tool_button_set_arrow_tooltip::((PtrMenuToolButton)->((PtrTooltips)->((PtrCChar)->((PtrCChar)->(IO())))))foreignimportccallsafe"gtk_menu_tool_button_set_arrow_tooltip_text"gtk_menu_tool_button_set_arrow_tooltip_text::((PtrMenuToolButton)->((PtrCChar)->(IO())))foreignimportccallsafe"gtk_menu_tool_button_set_arrow_tooltip_markup"gtk_menu_tool_button_set_arrow_tooltip_markup::((PtrMenuToolButton)->((PtrCChar)->(IO())))