gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

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

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 :: 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 #

#### Instances

Instances details

Eq CheckMenuItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: CheckMenuItem -> CheckMenuItem -> Bool Source # (/=) :: CheckMenuItem -> CheckMenuItem -> Bool Source #
Ord CheckMenuItem Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: CheckMenuItem -> CheckMenuItem -> Ordering Source #

(<) :: CheckMenuItem -> CheckMenuItem -> Bool Source #

(<=) :: CheckMenuItem -> CheckMenuItem -> Bool Source #

(>) :: CheckMenuItem -> CheckMenuItem -> Bool Source #

(>=) :: CheckMenuItem -> CheckMenuItem -> Bool Source #

max :: CheckMenuItem -> CheckMenuItem -> CheckMenuItem Source #

min :: CheckMenuItem -> CheckMenuItem -> CheckMenuItem Source #

GObjectClass CheckMenuItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: CheckMenuItem -> GObject Source # unsafeCastGObject :: GObject -> CheckMenuItem Source #
BinClass CheckMenuItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types
CheckMenuItemClass CheckMenuItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass CheckMenuItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types
MenuItemClass CheckMenuItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass CheckMenuItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class MenuItemClass o => CheckMenuItemClass o Source #

#### Instances

Instances details

CheckMenuItemClass CheckMenuItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types
CheckMenuItemClass RadioMenuItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToCheckMenuItem :: GObjectClass obj => obj -> CheckMenuItem Source #

gTypeCheckMenuItem :: GType Source #

toCheckMenuItem :: CheckMenuItemClass o => o -> CheckMenuItem Source #

# Constructors

checkMenuItemNew :: IO CheckMenuItem Source #

Creates a new `CheckMenuItem`.

checkMenuItemNewWithLabel Source #

Arguments

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

Creates a new `CheckMenuItem` with a label.

checkMenuItemNewWithMnemonic Source #

Arguments

:: GlibString string |
=> 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 () 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 (in between). 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.