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 |
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 :: IsCheckMenuItem o => o -> IO CheckMenuItem
- noCheckMenuItem :: Maybe CheckMenuItem
- data CheckMenuItemGetActiveMethodInfo
- checkMenuItemGetActive :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> m Bool
- data CheckMenuItemGetDrawAsRadioMethodInfo
- checkMenuItemGetDrawAsRadio :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> m Bool
- data CheckMenuItemGetInconsistentMethodInfo
- 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
- data CheckMenuItemSetActiveMethodInfo
- checkMenuItemSetActive :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> Bool -> m ()
- data CheckMenuItemSetDrawAsRadioMethodInfo
- checkMenuItemSetDrawAsRadio :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> Bool -> m ()
- data CheckMenuItemSetInconsistentMethodInfo
- checkMenuItemSetInconsistent :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> Bool -> m ()
- data CheckMenuItemToggledMethodInfo
- checkMenuItemToggled :: (HasCallStack, MonadIO m, IsCheckMenuItem a) => a -> m ()
- data CheckMenuItemActivePropertyInfo
- checkMenuItemActive :: AttrLabelProxy "active"
- constructCheckMenuItemActive :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o)
- getCheckMenuItemActive :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool
- setCheckMenuItemActive :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m ()
- data CheckMenuItemDrawAsRadioPropertyInfo
- checkMenuItemDrawAsRadio :: AttrLabelProxy "drawAsRadio"
- constructCheckMenuItemDrawAsRadio :: IsCheckMenuItem o => Bool -> IO (GValueConstruct o)
- getCheckMenuItemDrawAsRadio :: (MonadIO m, IsCheckMenuItem o) => o -> m Bool
- setCheckMenuItemDrawAsRadio :: (MonadIO m, IsCheckMenuItem o) => o -> Bool -> m ()
- data CheckMenuItemInconsistentPropertyInfo
- checkMenuItemInconsistent :: AttrLabelProxy "inconsistent"
- 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 ()
- data CheckMenuItemToggledSignalInfo
- afterCheckMenuItemToggled :: (GObject a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId
- genClosure_CheckMenuItemToggled :: CheckMenuItemToggledCallback -> IO Closure
- mk_CheckMenuItemToggledCallback :: C_CheckMenuItemToggledCallback -> IO (FunPtr C_CheckMenuItemToggledCallback)
- noCheckMenuItemToggledCallback :: Maybe CheckMenuItemToggledCallback
- onCheckMenuItemToggled :: (GObject a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId
- wrap_CheckMenuItemToggledCallback :: CheckMenuItemToggledCallback -> Ptr () -> Ptr () -> IO ()
Exported types
newtype CheckMenuItem Source #
GObject CheckMenuItem Source # | |
IsImplementorIface CheckMenuItem Source # | |
IsObject CheckMenuItem Source # | |
IsWidget CheckMenuItem Source # | |
IsMenuItem CheckMenuItem Source # | |
IsContainer CheckMenuItem Source # | |
IsCheckMenuItem CheckMenuItem Source # | |
IsBin CheckMenuItem Source # | |
IsBuildable CheckMenuItem Source # | |
IsActivatable CheckMenuItem Source # | |
IsActionable CheckMenuItem Source # | |
((~) * info (ResolveCheckMenuItemMethod t CheckMenuItem), MethodInfo * info CheckMenuItem p) => IsLabel t (CheckMenuItem -> p) Source # | |
((~) * info (ResolveCheckMenuItemMethod t CheckMenuItem), MethodInfo * info CheckMenuItem p) => IsLabelProxy t (CheckMenuItem -> p) Source # | |
HasAttributeList * CheckMenuItem Source # | |
type AttributeList CheckMenuItem Source # | |
type SignalList CheckMenuItem Source # | |
class GObject o => IsCheckMenuItem o Source #
toCheckMenuItem :: IsCheckMenuItem o => o -> IO CheckMenuItem Source #
Methods
getActive
data CheckMenuItemGetActiveMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsCheckMenuItem a) => MethodInfo * CheckMenuItemGetActiveMethodInfo a signature Source # | |
checkMenuItemGetActive Source #
:: (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
data CheckMenuItemGetDrawAsRadioMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsCheckMenuItem a) => MethodInfo * CheckMenuItemGetDrawAsRadioMethodInfo a signature Source # | |
checkMenuItemGetDrawAsRadio Source #
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> m Bool | Returns: Whether |
Returns whether checkMenuItem
looks like a RadioMenuItem
Since: 2.4
getInconsistent
data CheckMenuItemGetInconsistentMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsCheckMenuItem a) => MethodInfo * CheckMenuItemGetInconsistentMethodInfo a signature Source # | |
checkMenuItemGetInconsistent Source #
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> m Bool | Returns: |
Retrieves the value set by checkMenuItemSetInconsistent
.
new
:: (HasCallStack, MonadIO m) | |
=> m CheckMenuItem | Returns: a new |
Creates a new CheckMenuItem
.
newWithLabel
checkMenuItemNewWithLabel Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m CheckMenuItem | Returns: a new |
Creates a new CheckMenuItem
with a label.
newWithMnemonic
checkMenuItemNewWithMnemonic Source #
:: (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
data CheckMenuItemSetActiveMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsCheckMenuItem a) => MethodInfo * CheckMenuItemSetActiveMethodInfo a signature Source # | |
checkMenuItemSetActive Source #
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the active state of the menu item’s check box.
setDrawAsRadio
data CheckMenuItemSetDrawAsRadioMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsCheckMenuItem a) => MethodInfo * CheckMenuItemSetDrawAsRadioMethodInfo a signature Source # | |
checkMenuItemSetDrawAsRadio Source #
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether checkMenuItem
is drawn like a RadioMenuItem
Since: 2.4
setInconsistent
data CheckMenuItemSetInconsistentMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsCheckMenuItem a) => MethodInfo * CheckMenuItemSetInconsistentMethodInfo a signature Source # | |
checkMenuItemSetInconsistent Source #
:: (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
data CheckMenuItemToggledMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsCheckMenuItem a) => MethodInfo * CheckMenuItemToggledMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsCheckMenuItem a) | |
=> a |
|
-> m () |
Emits the CheckMenuItem
::toggled
signal.
Properties
active
data CheckMenuItemActivePropertyInfo Source #
checkMenuItemActive :: AttrLabelProxy "active" Source #
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
data CheckMenuItemDrawAsRadioPropertyInfo Source #
checkMenuItemDrawAsRadio :: AttrLabelProxy "drawAsRadio" Source #
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
data CheckMenuItemInconsistentPropertyInfo Source #
checkMenuItemInconsistent :: AttrLabelProxy "inconsistent" Source #
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 :: (GObject a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId Source #
mk_CheckMenuItemToggledCallback :: C_CheckMenuItemToggledCallback -> IO (FunPtr C_CheckMenuItemToggledCallback) Source #
onCheckMenuItemToggled :: (GObject a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId Source #
wrap_CheckMenuItemToggledCallback :: CheckMenuItemToggledCallback -> Ptr () -> Ptr () -> IO () Source #