gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.MenuToolButton

Contents

Description

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.

GtkMenuToolButton as GtkBuildable

The GtkMenuToolButton implementation of the GtkBuildable interface supports adding a menu by specifying “menu” as the “type” attribute of a <child> element.

An example for a UI definition fragment with menus: > >class="GtkMenuToolButton" > type="menu" > class="GtkMenu"/ > /child >/object

Synopsis

Exported types

Methods

getMenu

menuToolButtonGetMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuToolButton a) 
=> a

button: a MenuToolButton

-> m Widget

Returns: the Menu associated with MenuToolButton

Gets the Menu associated with MenuToolButton.

Since: 2.6

new

menuToolButtonNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWidget a) 
=> Maybe a

iconWidget: a widget that will be used as icon widget, or Nothing

-> Maybe Text

label: a string that will be used as label, or Nothing

-> m MenuToolButton

Returns: the new MenuToolButton

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

Since: 2.6

newFromStock

menuToolButtonNewFromStock Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

stockId: the name of a stock item

-> m MenuToolButton

Returns: the new MenuToolButton

Deprecated: (Since version 3.10)Use menuToolButtonNew instead.

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

Since: 2.6

setArrowTooltipMarkup

menuToolButtonSetArrowTooltipMarkup Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuToolButton a) 
=> a

button: a MenuToolButton

-> Text

markup: markup text to be used as tooltip text for button’s arrow button

-> m () 

Sets the tooltip markup text to be used as tooltip for the arrow button which pops up the menu. See toolItemSetTooltipText for setting a tooltip on the whole MenuToolButton.

Since: 2.12

setArrowTooltipText

menuToolButtonSetArrowTooltipText Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuToolButton a) 
=> a

button: a MenuToolButton

-> Text

text: text to be used as tooltip text for button’s arrow button

-> m () 

Sets the tooltip text to be used as tooltip for the arrow button which pops up the menu. See toolItemSetTooltipText for setting a tooltip on the whole MenuToolButton.

Since: 2.12

setMenu

menuToolButtonSetMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuToolButton a, IsWidget b) 
=> a

button: a MenuToolButton

-> b

menu: the Menu associated with MenuToolButton

-> m () 

Sets the Menu that is popped up when the user clicks on the arrow. If menu is NULL, the arrow button becomes insensitive.

Since: 2.6

Properties

menu

data MenuToolButtonMenuPropertyInfo Source #

Instances

AttrInfo MenuToolButtonMenuPropertyInfo Source # 
type AttrOrigin MenuToolButtonMenuPropertyInfo Source # 
type AttrLabel MenuToolButtonMenuPropertyInfo Source # 
type AttrGetType MenuToolButtonMenuPropertyInfo Source # 
type AttrBaseTypeConstraint MenuToolButtonMenuPropertyInfo Source # 
type AttrSetTypeConstraint MenuToolButtonMenuPropertyInfo Source # 
type AttrAllowedOps MenuToolButtonMenuPropertyInfo Source # 

Signals

showMenu