Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- newtype CheckMenuItem = CheckMenuItem (ManagedPtr CheckMenuItem)
- class GObject o => IsCheckMenuItem o
- toCheckMenuItem :: (MonadIO m, IsCheckMenuItem o) => o -> m CheckMenuItem
- noCheckMenuItem :: Maybe CheckMenuItem
- checkMenuItemGetActive :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> m Bool
- checkMenuItemGetDrawAsRadio :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> m Bool
- checkMenuItemGetInconsistent :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> m Bool
- checkMenuItemNew :: (HasCallStack, MonadIO m) => m CheckMenuItem
- checkMenuItemNewWithLabel :: (HasCallStack, MonadIO m) => Text -> m CheckMenuItem
- checkMenuItemNewWithMnemonic :: (HasCallStack, MonadIO m) => Text -> m CheckMenuItem
- checkMenuItemSetActive :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> Bool -> m ()
- checkMenuItemSetDrawAsRadio :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> Bool -> m ()
- checkMenuItemSetInconsistent :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> Bool -> m ()
- checkMenuItemToggled :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> m ()
- constructCheckMenuItemActive :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o)
- getCheckMenuItemActive :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool
- setCheckMenuItemActive :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m ()
- constructCheckMenuItemDrawAsRadio :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o)
- getCheckMenuItemDrawAsRadio :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool
- setCheckMenuItemDrawAsRadio :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m ()
- constructCheckMenuItemInconsistent :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o)
- getCheckMenuItemInconsistent :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool
- setCheckMenuItemInconsistent :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m ()
- type C_CheckMenuItemToggledCallback = Ptr () -> Ptr () -> IO ()
- type CheckMenuItemToggledCallback = IO ()
- afterCheckMenuItemToggled :: (IsCheckMenuItem a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId
- genClosure_CheckMenuItemToggled :: CheckMenuItemToggledCallback -> IO Closure
- mk_CheckMenuItemToggledCallback :: C_CheckMenuItemToggledCallback -> IO (FunPtr C_CheckMenuItemToggledCallback)
- noCheckMenuItemToggledCallback :: Maybe CheckMenuItemToggledCallback
- onCheckMenuItemToggled :: (IsCheckMenuItem a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId
- wrap_CheckMenuItemToggledCallback :: CheckMenuItemToggledCallback -> Ptr () -> Ptr () -> IO ()
Exported types
newtype CheckMenuItem Source #
Constructors
CheckMenuItem (ManagedPtr CheckMenuItem) |
Instances
class GObject o => IsCheckMenuItem o Source #
Instances
toCheckMenuItem :: (MonadIO m, IsCheckMenuItem o) => o -> m CheckMenuItem Source #
Methods
getActive
checkMenuItemGetActive Source #
Arguments
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> m Bool | Returns: |
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 |
|
-> m Bool | Returns: Whether |
Returns whether checkMenuItem
looks like a RadioMenuItem
Since: 2.4
getInconsistent
checkMenuItemGetInconsistent Source #
Arguments
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> m Bool | Returns: |
Retrieves the value set by checkMenuItemSetInconsistent
.
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> m CheckMenuItem | Returns: a new |
Creates a new CheckMenuItem
.
newWithLabel
checkMenuItemNewWithLabel Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m CheckMenuItem | Returns: a new |
Creates a new CheckMenuItem
with a label.
newWithMnemonic
checkMenuItemNewWithMnemonic Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m CheckMenuItem | Returns: a new |
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 |
|
-> Bool |
|
-> m () |
Sets the active state of the menu item’s check box.
setDrawAsRadio
checkMenuItemSetDrawAsRadio Source #
Arguments
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether checkMenuItem
is drawn like a RadioMenuItem
Since: 2.4
setInconsistent
checkMenuItemSetInconsistent Source #
Arguments
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> Bool |
|
-> 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
Arguments
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> m () |
Emits the CheckMenuItem
::toggled
signal.
Properties
active
constructCheckMenuItemActive :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o) Source #
getCheckMenuItemActive :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool Source #
setCheckMenuItemActive :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m () Source #
drawAsRadio
constructCheckMenuItemDrawAsRadio :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o) Source #
getCheckMenuItemDrawAsRadio :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool Source #
setCheckMenuItemDrawAsRadio :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m () Source #
inconsistent
constructCheckMenuItemInconsistent :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o) Source #
getCheckMenuItemInconsistent :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool Source #
setCheckMenuItemInconsistent :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m () Source #
Signals
toggled
type CheckMenuItemToggledCallback = IO () Source #
afterCheckMenuItemToggled :: (IsCheckMenuItem a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId Source #
mk_CheckMenuItemToggledCallback :: C_CheckMenuItemToggledCallback -> IO (FunPtr C_CheckMenuItemToggledCallback) Source #
onCheckMenuItemToggled :: (IsCheckMenuItem a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId Source #
wrap_CheckMenuItemToggledCallback :: CheckMenuItemToggledCallback -> Ptr () -> Ptr () -> IO () Source #