gtk-0.12.4: Binding to the Gtk+ graphical user interface library.

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

Graphics.UI.Gtk.MenuComboToolbar.CheckMenuItem

Contents

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

Description

A menu item with a check box

Synopsis

- data CheckMenuItem
- class MenuItemClass o => CheckMenuItemClass o
- castToCheckMenuItem :: GObjectClass obj => obj -> CheckMenuItem
- gTypeCheckMenuItem :: GType
- toCheckMenuItem :: CheckMenuItemClass o => o -> CheckMenuItem
- checkMenuItemNew :: IO CheckMenuItem
- checkMenuItemNewWithLabel :: String -> IO CheckMenuItem
- checkMenuItemNewWithMnemonic :: String -> IO CheckMenuItem
- checkMenuItemSetActive :: CheckMenuItemClass self => self -> Bool -> IO ()
- checkMenuItemGetActive :: CheckMenuItemClass self => self -> IO Bool
- checkMenuItemEmitToggled :: CheckMenuItemClass self => self -> IO ()
- checkMenuItemSetInconsistent :: CheckMenuItemClass self => self -> Bool -> IO ()
- checkMenuItemGetInconsistent :: CheckMenuItemClass self => self -> IO Bool
- checkMenuItemGetDrawAsRadio :: CheckMenuItemClass self => self -> IO Bool
- checkMenuItemSetDrawAsRadio :: CheckMenuItemClass self => self -> Bool -> IO ()
- checkMenuItemActive :: CheckMenuItemClass self => Attr self Bool
- checkMenuItemInconsistent :: CheckMenuItemClass self => Attr self Bool
- checkMenuItemDrawAsRadio :: CheckMenuItemClass self => Attr self Bool
- checkMenuItemToggled :: CheckMenuItemClass self => Signal self (IO ())

# Detail

A `CheckMenuItem` is a menu item that maintains the state of a boolean value in addition to a `MenuItem`s usual role in activating application code.

A check box indicating the state of the boolean value is displayed at the left side of the `MenuItem`. Activating the `MenuItem` toggles the value.

# Class Hierarchy

     | GObject
     | +----Object
     | +----Widget
     | +----Container
     | +----Bin
     | +----Item
     | +----MenuItem
     | +----CheckMenuItem
     | +----RadioMenuItem

# Types

data CheckMenuItem

Instances

Eq CheckMenuItem |
Ord CheckMenuItem |
GObjectClass CheckMenuItem |
CheckMenuItemClass CheckMenuItem |
MenuItemClass CheckMenuItem |
BinClass CheckMenuItem |
ContainerClass CheckMenuItem |
WidgetClass CheckMenuItem |
ObjectClass CheckMenuItem |

class MenuItemClass o => CheckMenuItemClass o

Instances

CheckMenuItemClass RadioMenuItem |
CheckMenuItemClass CheckMenuItem |

castToCheckMenuItem :: GObjectClass obj => obj -> CheckMenuItem

gTypeCheckMenuItem :: GType

toCheckMenuItem :: CheckMenuItemClass o => o -> CheckMenuItem

# Constructors

checkMenuItemNew :: IO CheckMenuItem

Creates a new `CheckMenuItem`.

checkMenuItemNewWithLabel

Arguments

:: String | `label` - the string to use for the label.
-> IO CheckMenuItem |

Creates a new `CheckMenuItem` with a label.

checkMenuItemNewWithMnemonic

Arguments

:: String | `label` - The text of the button, with an underscore in front of the mnemonic character
-> IO CheckMenuItem |

Creates a new `CheckMenuItem` containing a label. The label will be created using `labelNewWithMnemonic`, so underscores in `label` indicate the mnemonic for the menu item.

# Methods

checkMenuItemSetActive :: CheckMenuItemClass self => self -> Bool -> IO ()

Sets the active state of the menu item's check box.

checkMenuItemGetActive :: CheckMenuItemClass self => self -> IO Bool

Returns whether the check menu item is active. See `checkMenuItemSetActive`.

checkMenuItemEmitToggled :: CheckMenuItemClass self => self -> IO ()

Emits the toggled signal.

checkMenuItemSetInconsistent :: CheckMenuItemClass self => self -> Bool -> IO ()

If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a boolean setting, and the current values in that range are inconsistent, you may want to display the check in an "in between" state. This function turns on "in between" display. Normally you would turn off the inconsistent state again if the user explicitly selects a setting. This has to be done manually, `checkMenuItemSetInconsistent` only affects visual appearance, it doesn't affect the semantics of the widget.

checkMenuItemGetInconsistent :: CheckMenuItemClass self => self -> IO Bool

Query if the menu check is drawn as inconsistent (inbetween). See `checkMenuItemSetInconsistent`.

checkMenuItemGetDrawAsRadio :: CheckMenuItemClass self => self -> IO Bool

Returns whether the menu item is drawn like a `RadioMenuItem`.

- Available since Gtk+ version 2.4

checkMenuItemSetDrawAsRadio :: CheckMenuItemClass self => self -> Bool -> IO ()

Sets whether the menu item is drawn like a `RadioMenuItem`.

- Available since Gtk+ version 2.4

# Attributes

checkMenuItemActive :: CheckMenuItemClass self => Attr self Bool

Whether the menu item is checked.

Default value: `False`

checkMenuItemInconsistent :: CheckMenuItemClass self => Attr self Bool

Whether to display an "inconsistent" state.

Default value: `False`

checkMenuItemDrawAsRadio :: CheckMenuItemClass self => Attr self Bool

Whether the menu item looks like a radio menu item.

Default value: `False`

# Signals

checkMenuItemToggled :: CheckMenuItemClass self => Signal self (IO ())

This signal is emitted when the state of the check box is changed.