Maintainer | gtk2hs-users@lists.sourceforge.net |
---|---|
Stability | provisional |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
A menu item with a check box
- data CheckMenuItem
- class MenuItemClass o => CheckMenuItemClass o
- castToCheckMenuItem :: GObjectClass obj => obj -> CheckMenuItem
- gTypeCheckMenuItem :: GType
- toCheckMenuItem :: CheckMenuItemClass o => o -> CheckMenuItem
- checkMenuItemNew :: IO CheckMenuItem
- checkMenuItemNewWithLabel :: GlibString string => string -> IO CheckMenuItem
- checkMenuItemNewWithMnemonic :: GlibString string => 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 Source
class MenuItemClass o => CheckMenuItemClass o Source
castToCheckMenuItem :: GObjectClass obj => obj -> CheckMenuItem Source
toCheckMenuItem :: CheckMenuItemClass o => o -> CheckMenuItem Source
Constructors
checkMenuItemNew :: IO CheckMenuItem Source
Creates a new CheckMenuItem
.
checkMenuItemNewWithLabel Source
:: GlibString string | |
=> string |
|
-> IO CheckMenuItem |
Creates a new CheckMenuItem
with a label.
checkMenuItemNewWithMnemonic Source
:: GlibString string | |
=> string |
|
-> 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 () Source
Sets the active state of the menu item's check box.
checkMenuItemGetActive :: CheckMenuItemClass self => self -> IO Bool Source
Returns whether the check menu item is active. See
checkMenuItemSetActive
.
checkMenuItemEmitToggled :: CheckMenuItemClass self => self -> IO () Source
Emits the toggled signal.
checkMenuItemSetInconsistent :: CheckMenuItemClass self => self -> Bool -> IO () Source
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 Source
Query if the menu check is drawn as inconsistent (inbetween). See
checkMenuItemSetInconsistent
.
checkMenuItemGetDrawAsRadio :: CheckMenuItemClass self => self -> IO Bool Source
Returns whether the menu item is drawn like a RadioMenuItem
.
- Available since Gtk+ version 2.4
checkMenuItemSetDrawAsRadio :: CheckMenuItemClass self => self -> Bool -> IO () Source
Sets whether the menu item is drawn like a RadioMenuItem
.
- Available since Gtk+ version 2.4
Attributes
checkMenuItemActive :: CheckMenuItemClass self => Attr self Bool Source
Whether the menu item is checked.
Default value: False
checkMenuItemInconsistent :: CheckMenuItemClass self => Attr self Bool Source
Whether to display an "inconsistent" state.
Default value: False
checkMenuItemDrawAsRadio :: CheckMenuItemClass self => Attr self Bool Source
Whether the menu item looks like a radio menu item.
Default value: False
Signals
checkMenuItemToggled :: CheckMenuItemClass self => Signal self (IO ()) Source
This signal is emitted when the state of the check box is changed.