| ||||||||||
| ||||||||||
| ||||||||||
Description | ||||||||||
A ToolItem subclass that displays buttons
| ||||||||||
Synopsis | ||||||||||
Detail | ||||||||||
ToolButtons are ToolItems containing buttons. Use toolButtonNew to create a new ToolButton. Use toolButtonNewWithStock to create a ToolButton containing a stock item. The label of a ToolButton is determined by the properties "label_widget", "label", and "stock_id". If "label_widget" is not Nothing, then that widget is used as the label. Otherwise, if "label" is not Nothing, that string is used as the label. Otherwise, if "stock_id" is not Nothing, the label is determined by the stock item. Otherwise, the button does not have a label. The icon of a ToolButton is determined by the properties "icon_widget" and "stock_id". If "icon_widget" is not Nothing, then that widget is used as the icon. Otherwise, if "stock_id" is not Nothing, the icon is determined by the stock item. Otherwise, the button does not have a label. | ||||||||||
Class Hierarchy | ||||||||||
| GObject | +----Object | +----Widget | +----Container | +----Bin | +----ToolItem | +----ToolButton | +----MenuToolButton | +----ToggleToolButton | ||||||||||
Types | ||||||||||
data ToolButton | ||||||||||
class ToolItemClass o => ToolButtonClass o | ||||||||||
castToToolButton :: GObjectClass obj => obj -> ToolButton | ||||||||||
toToolButton :: ToolButtonClass o => o -> ToolButton | ||||||||||
Constructors | ||||||||||
toolButtonNew | ||||||||||
| ||||||||||
toolButtonNewFromStock | ||||||||||
| ||||||||||
Methods | ||||||||||
toolButtonSetLabel | ||||||||||
| ||||||||||
toolButtonGetLabel :: ToolButtonClass self => self -> IO (Maybe String) | ||||||||||
Returns the label used by the tool button, or Nothing if the tool button doesn't have a label. or uses a the label from a stock item. | ||||||||||
toolButtonSetUseUnderline :: ToolButtonClass self => self -> Bool -> IO () | ||||||||||
If set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu. For example, if the label property is "_Open" and useUnderline is True, the label on the tool button will be "Open" and the item on the overflow menu will have an underlined 'O'. Labels shown on tool buttons never have mnemonics on them; this property only affects the menu item on the overflow menu. | ||||||||||
toolButtonGetUseUnderline :: ToolButtonClass self => self -> IO Bool | ||||||||||
Returns whether underscores in the label property are used as mnemonics on menu items on the overflow menu. See toolButtonSetUseUnderline. | ||||||||||
toolButtonSetStockId | ||||||||||
| ||||||||||
toolButtonGetStockId :: ToolButtonClass self => self -> IO (Maybe String) | ||||||||||
Returns the name of the stock item. See toolButtonSetStockId. | ||||||||||
toolButtonSetIconWidget | ||||||||||
| ||||||||||
toolButtonGetIconWidget | ||||||||||
| ||||||||||
toolButtonSetLabelWidget | ||||||||||
| ||||||||||
toolButtonGetLabelWidget | ||||||||||
| ||||||||||
toolButtonSetIconName | ||||||||||
| ||||||||||
toolButtonGetIconName | ||||||||||
| ||||||||||
Attributes | ||||||||||
toolButtonLabel :: ToolButtonClass self => Attr self (Maybe String) | ||||||||||
Text to show in the item. Default value: Nothing | ||||||||||
toolButtonUseUnderline :: ToolButtonClass self => Attr self Bool | ||||||||||
If set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu. Default value: False | ||||||||||
toolButtonLabelWidget :: (ToolButtonClass self, WidgetClass labelWidget) => ReadWriteAttr self (Maybe Widget) (Maybe labelWidget) | ||||||||||
Widget to use as the item label. | ||||||||||
toolButtonStockId :: ToolButtonClass self => ReadWriteAttr self (Maybe String) (Maybe String) | ||||||||||
The stock icon displayed on the item. Default value: Nothing | ||||||||||
toolButtonIconName :: ToolButtonClass self => Attr self String | ||||||||||
The name of the themed icon displayed on the item. This property only has an effect if not overridden by "label", "icon_widget" or "stock_id" properties. Default value: "" | ||||||||||
toolButtonIconWidget :: (ToolButtonClass self, WidgetClass iconWidget) => ReadWriteAttr self (Maybe Widget) (Maybe iconWidget) | ||||||||||
Icon widget to display in the item. | ||||||||||
Signals | ||||||||||
onToolButtonClicked :: ToolButtonClass self => self -> IO () -> IO (ConnectId self) | ||||||||||
afterToolButtonClicked :: ToolButtonClass self => self -> IO () -> IO (ConnectId self) | ||||||||||
This signal is emitted when the tool button is clicked with the mouse or activated with the keyboard. | ||||||||||
Produced by Haddock version 2.6.0 |