Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
Safe Haskell | None |
A menu item with an icon
- data ImageMenuItem
- class MenuItemClass o => ImageMenuItemClass o
- castToImageMenuItem :: GObjectClass obj => obj -> ImageMenuItem
- gTypeImageMenuItem :: GType
- toImageMenuItem :: ImageMenuItemClass o => o -> ImageMenuItem
- imageMenuItemNew :: IO ImageMenuItem
- imageMenuItemNewFromStock :: StockId -> IO ImageMenuItem
- imageMenuItemNewWithLabel :: String -> IO ImageMenuItem
- imageMenuItemNewWithMnemonic :: String -> IO ImageMenuItem
- imageMenuItemSetImage :: (ImageMenuItemClass self, WidgetClass image) => self -> image -> IO ()
- imageMenuItemGetImage :: ImageMenuItemClass self => self -> IO (Maybe Widget)
- imageMenuItemImage :: (ImageMenuItemClass self, WidgetClass image) => ReadWriteAttr self (Maybe Widget) image
Detail
A ImageMenuItem
is a menu item which has an icon next to the text
label.
Note that the user can disable display of menu icons, so make sure to still fill in the text label.
Class Hierarchy
|GObject
| +----Object
| +----Widget
| +----Container
| +----Bin
| +----Item
| +----MenuItem
| +----ImageMenuItem
Types
data ImageMenuItem Source
castToImageMenuItem :: GObjectClass obj => obj -> ImageMenuItemSource
toImageMenuItem :: ImageMenuItemClass o => o -> ImageMenuItemSource
Constructors
imageMenuItemNew :: IO ImageMenuItemSource
Creates a new ImageMenuItem
with an empty label.
imageMenuItemNewFromStockSource
:: StockId |
|
-> IO ImageMenuItem |
Creates a new ImageMenuItem
containing the image and text from a stock
item.
imageMenuItemNewWithLabelSource
:: String |
|
-> IO ImageMenuItem |
Creates a new ImageMenuItem
containing a label.
imageMenuItemNewWithMnemonicSource
:: String |
|
-> IO ImageMenuItem |
Creates a new ImageMenuItem
containing a label. The label will be
created using labelNewWithMnemonic
, so
underscores in label
indicate the mnemonic for the menu item.
Methods
:: (ImageMenuItemClass self, WidgetClass image) | |
=> self | |
-> image |
|
-> IO () |
Sets the image of the image menu item to the given widget. Note that it depends on the "show-menu-images" setting whether the image will be displayed or not.
:: ImageMenuItemClass self | |
=> self | |
-> IO (Maybe Widget) | returns the widget set as image of or |
Gets the widget that is currently set as the image.
See imageMenuItemSetImage
.
Attributes
imageMenuItemImage :: (ImageMenuItemClass self, WidgetClass image) => ReadWriteAttr self (Maybe Widget) imageSource
Child widget to appear next to the menu text.