gi-gtk-3.0.26: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.CheckMenuItem

Contents

Description

A CheckMenuItem is a menu item that maintains the state of a boolean value in addition to a MenuItem 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.

CSS nodes

plain code

menuitem
├── check.left
╰── <child>

GtkCheckMenuItem has a main CSS node with name menuitem, and a subnode with name check, which gets the .left or .right style class.

Synopsis

Exported types

class GObject o => IsCheckMenuItem o Source #

Type class for types which can be safely cast to CheckMenuItem, for instance with toCheckMenuItem.

toCheckMenuItem :: (MonadIO m, IsCheckMenuItem o) => o -> m CheckMenuItem Source #

Cast to CheckMenuItem, for types for which this is known to be safe. For general casts, use castTo.

Methods

getActive

checkMenuItemGetActive Source #

Arguments

:: (HasCallStack, MonadIO m, IsCheckMenuItem a) 
=> a

checkMenuItem: a CheckMenuItem

-> m Bool

Returns: True if the menu item is checked.

Returns whether the check menu item is active. See gtk_check_menu_item_set_active ().

getDrawAsRadio

checkMenuItemGetDrawAsRadio Source #

Arguments

:: (HasCallStack, MonadIO m, IsCheckMenuItem a) 
=> a

checkMenuItem: a CheckMenuItem

-> m Bool

Returns: Whether checkMenuItem looks like a RadioMenuItem

Returns whether checkMenuItem looks like a RadioMenuItem

Since: 2.4

getInconsistent

checkMenuItemGetInconsistent Source #

Arguments

:: (HasCallStack, MonadIO m, IsCheckMenuItem a) 
=> a

checkMenuItem: a CheckMenuItem

-> m Bool

Returns: True if inconsistent

Retrieves the value set by checkMenuItemSetInconsistent.

new

checkMenuItemNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m CheckMenuItem

Returns: a new CheckMenuItem.

Creates a new CheckMenuItem.

newWithLabel

checkMenuItemNewWithLabel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

label: the string to use for the label.

-> m CheckMenuItem

Returns: a new CheckMenuItem.

Creates a new CheckMenuItem with a label.

newWithMnemonic

checkMenuItemNewWithMnemonic Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

label: The text of the button, with an underscore in front of the character

-> m CheckMenuItem

Returns: a new 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.

setActive

checkMenuItemSetActive Source #

Arguments

:: (HasCallStack, MonadIO m, IsCheckMenuItem a) 
=> a

checkMenuItem: a CheckMenuItem.

-> Bool

isActive: boolean value indicating whether the check box is active.

-> m () 

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

setDrawAsRadio

checkMenuItemSetDrawAsRadio Source #

Arguments

:: (HasCallStack, MonadIO m, IsCheckMenuItem a) 
=> a

checkMenuItem: a CheckMenuItem

-> Bool

drawAsRadio: whether checkMenuItem is drawn like a RadioMenuItem

-> m () 

Sets whether checkMenuItem is drawn like a RadioMenuItem

Since: 2.4

setInconsistent

checkMenuItemSetInconsistent Source #

Arguments

:: (HasCallStack, MonadIO m, IsCheckMenuItem a) 
=> a

checkMenuItem: a CheckMenuItem

-> Bool

setting: True to display an “inconsistent” third state check

-> m () 

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.

toggled

checkMenuItemToggled Source #

Arguments

:: (HasCallStack, MonadIO m, IsCheckMenuItem a) 
=> a

checkMenuItem: a CheckMenuItem.

-> m () 

Emits the CheckMenuItem::toggled signal.

Properties

active

No description available in the introspection data.

constructCheckMenuItemActive :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “active” property. This is rarely needed directly, but it is used by new.

getCheckMenuItemActive :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool Source #

Get the value of the “active” property. When overloading is enabled, this is equivalent to

get checkMenuItem #active

setCheckMenuItemActive :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m () Source #

Set the value of the “active” property. When overloading is enabled, this is equivalent to

set checkMenuItem [ #active := value ]

drawAsRadio

No description available in the introspection data.

constructCheckMenuItemDrawAsRadio :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “draw-as-radio” property. This is rarely needed directly, but it is used by new.

getCheckMenuItemDrawAsRadio :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool Source #

Get the value of the “draw-as-radio” property. When overloading is enabled, this is equivalent to

get checkMenuItem #drawAsRadio

setCheckMenuItemDrawAsRadio :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m () Source #

Set the value of the “draw-as-radio” property. When overloading is enabled, this is equivalent to

set checkMenuItem [ #drawAsRadio := value ]

inconsistent

No description available in the introspection data.

constructCheckMenuItemInconsistent :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “inconsistent” property. This is rarely needed directly, but it is used by new.

getCheckMenuItemInconsistent :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool Source #

Get the value of the “inconsistent” property. When overloading is enabled, this is equivalent to

get checkMenuItem #inconsistent

setCheckMenuItemInconsistent :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m () Source #

Set the value of the “inconsistent” property. When overloading is enabled, this is equivalent to

set checkMenuItem [ #inconsistent := value ]

Signals

toggled

type C_CheckMenuItemToggledCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type CheckMenuItemToggledCallback = IO () Source #

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

A signal handler can use checkMenuItemGetActive to discover the new state.

afterCheckMenuItemToggled :: (IsCheckMenuItem a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId Source #

Connect a signal handler for the “toggled” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after checkMenuItem #toggled callback

onCheckMenuItemToggled :: (IsCheckMenuItem a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId Source #

Connect a signal handler for the “toggled” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on checkMenuItem #toggled callback