gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.MenuComboToolbar.MenuToolButton

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes
- Signals

Description

A `ToolItem` containing a button with an additional dropdown menu

- Module available since Gtk+ version 2.6

Synopsis

- data MenuToolButton
- class ToolButtonClass o => MenuToolButtonClass o
- castToMenuToolButton :: GObjectClass obj => obj -> MenuToolButton
- gTypeMenuToolButton :: GType
- toMenuToolButton :: MenuToolButtonClass o => o -> MenuToolButton
- menuToolButtonNew :: (WidgetClass iconWidget, GlibString string) => 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)
- menuToolButtonSetArrowTooltipText :: (MenuToolButtonClass self, GlibString string) => self -> string -> IO ()
- menuToolButtonSetArrowTooltipMarkup :: (MenuToolButtonClass self, GlibString markup) => 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 #

#### Instances

Instances details

Eq MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: MenuToolButton -> MenuToolButton -> Bool Source # (/=) :: MenuToolButton -> MenuToolButton -> Bool Source #
Ord MenuToolButton Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: MenuToolButton -> MenuToolButton -> Ordering Source #

(<) :: MenuToolButton -> MenuToolButton -> Bool Source #

(<=) :: MenuToolButton -> MenuToolButton -> Bool Source #

(>) :: MenuToolButton -> MenuToolButton -> Bool Source #

(>=) :: MenuToolButton -> MenuToolButton -> Bool Source #

max :: MenuToolButton -> MenuToolButton -> MenuToolButton Source #

min :: MenuToolButton -> MenuToolButton -> MenuToolButton Source #

GObjectClass MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: MenuToolButton -> GObject Source # unsafeCastGObject :: GObject -> MenuToolButton Source #
BinClass MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
MenuToolButtonClass MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ToolButtonClass MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ToolItemClass MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class ToolButtonClass o => MenuToolButtonClass o Source #

#### Instances

Instances details

MenuToolButtonClass MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToMenuToolButton :: GObjectClass obj => obj -> MenuToolButton Source #

gTypeMenuToolButton :: GType Source #

toMenuToolButton :: MenuToolButtonClass o => o -> MenuToolButton Source #

# Constructors

menuToolButtonNew Source #

Arguments

:: (WidgetClass iconWidget, GlibString string) |
=> Maybe iconWidget | `iconWidget` - a widget that will be used as icon widget, or `Nothing`
-> Maybe string | `label` - a string that will be used as label, or `Nothing`
-> IO MenuToolButton |

Creates a new `MenuToolButton` using `iconWidget` as icon and `label` as label.

menuToolButtonNewFromStock Source #

Arguments

:: StockId | `stockId` - the name of a stock item
-> IO MenuToolButton |

Creates a new `MenuToolButton`. The new `MenuToolButton` will contain an icon and label from the stock item indicated by `stockId`.

# Methods

menuToolButtonSetMenu Source #

Arguments

:: (MenuToolButtonClass self, MenuClass menu) |
=> self |
-> Maybe menu | `menu` - the `Menu` associated with `MenuToolButton`
-> 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`.

menuToolButtonSetArrowTooltipText Source #

Arguments

:: (MenuToolButtonClass self, GlibString string) |
=> self |
-> string | `text` - text to be used as tooltip text for button's arrow button
-> 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

menuToolButtonSetArrowTooltipMarkup Source #

Arguments

:: (MenuToolButtonClass self, GlibString markup) |
=> self |
-> markup | `markup` - markup text to be used as tooltip text for button's arrow button
-> 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 #