Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
Safe Haskell | None |
A ToolItem
containing a button with an additional dropdown menu
- Module available since Gtk+ version 2.6
- data MenuToolButton
- class ToolButtonClass o => MenuToolButtonClass o
- castToMenuToolButton :: GObjectClass obj => obj -> MenuToolButton
- gTypeMenuToolButton :: GType
- toMenuToolButton :: MenuToolButtonClass o => o -> MenuToolButton
- menuToolButtonNew :: WidgetClass iconWidget => Maybe iconWidget -> Maybe String -> IO MenuToolButton
- menuToolButtonNewFromStock :: StockId -> IO MenuToolButton
- menuToolButtonSetMenu :: (MenuToolButtonClass self, MenuClass menu) => self -> Maybe menu -> IO ()
- menuToolButtonGetMenu :: MenuToolButtonClass self => self -> IO (Maybe Menu)
- menuToolButtonSetArrowTooltip :: MenuToolButtonClass self => self -> Tooltips -> String -> String -> IO ()
- menuToolButtonSetArrowTooltipText :: MenuToolButtonClass self => self -> String -> IO ()
- menuToolButtonSetArrowTooltipMarkup :: MenuToolButtonClass self => self -> Markup -> IO ()
- menuToolButtonMenu :: (MenuToolButtonClass self, MenuClass menu) => ReadWriteAttr self (Maybe Menu) (Maybe menu)
- onShowMenu :: MenuToolButtonClass self => self -> IO () -> IO (ConnectId self)
- afterShowMenu :: MenuToolButtonClass self => self -> IO () -> IO (ConnectId self)
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
Types
data MenuToolButton Source
castToMenuToolButton :: GObjectClass obj => obj -> MenuToolButtonSource
toMenuToolButton :: MenuToolButtonClass o => o -> MenuToolButtonSource
Constructors
:: WidgetClass iconWidget | |
=> Maybe iconWidget |
|
-> Maybe String |
|
-> IO MenuToolButton |
Creates a new MenuToolButton
using iconWidget
as icon and label
as
label.
menuToolButtonNewFromStockSource
:: StockId |
|
-> IO MenuToolButton |
Creates a new MenuToolButton
. The new MenuToolButton
will contain an
icon and label from the stock item indicated by stockId
.
Methods
:: (MenuToolButtonClass self, MenuClass menu) | |
=> self | |
-> Maybe menu |
|
-> IO () |
Sets the Menu
that is popped up when the user clicks on the arrow. If
menu
is Nothing
, the arrow button becomes insensitive.
menuToolButtonGetMenu :: MenuToolButtonClass self => self -> IO (Maybe Menu)Source
Gets the Menu
associated with MenuToolButton
.
menuToolButtonSetArrowTooltipSource
:: MenuToolButtonClass self | |
=> self | |
-> Tooltips |
|
-> String |
|
-> String |
|
-> IO () |
Sets the Tooltips
object to be used for arrow button which pops up the
menu. See toolItemSetTooltip
for setting a tooltip on the whole MenuToolButton
.
menuToolButtonSetArrowTooltipTextSource
:: MenuToolButtonClass self | |
=> self | |
-> String |
|
-> IO () |
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
menuToolButtonSetArrowTooltipMarkupSource
:: MenuToolButtonClass self | |
=> self | |
-> Markup |
|
-> IO () |
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
Attributes
menuToolButtonMenu :: (MenuToolButtonClass self, MenuClass menu) => ReadWriteAttr self (Maybe Menu) (Maybe menu)Source
The dropdown menu.
Signals
onShowMenu :: MenuToolButtonClass self => self -> IO () -> IO (ConnectId self)Source
afterShowMenu :: MenuToolButtonClass self => self -> IO () -> IO (ConnectId self)Source