gi-gtk-3.0.37: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.CheckMenuItem

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

newtype CheckMenuItem Source #

Memory-managed wrapper type.

Constructors

CheckMenuItem (ManagedPtr CheckMenuItem) 

Instances

Instances details
Eq CheckMenuItem Source # 
Instance details

Defined in GI.Gtk.Objects.CheckMenuItem

GObject CheckMenuItem Source # 
Instance details

Defined in GI.Gtk.Objects.CheckMenuItem

ManagedPtrNewtype CheckMenuItem Source # 
Instance details

Defined in GI.Gtk.Objects.CheckMenuItem

Methods

toManagedPtr :: CheckMenuItem -> ManagedPtr CheckMenuItem

TypedObject CheckMenuItem Source # 
Instance details

Defined in GI.Gtk.Objects.CheckMenuItem

Methods

glibType :: IO GType

HasParentTypes CheckMenuItem Source # 
Instance details

Defined in GI.Gtk.Objects.CheckMenuItem

IsGValue (Maybe CheckMenuItem) Source #

Convert CheckMenuItem to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.CheckMenuItem

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe CheckMenuItem -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe CheckMenuItem)

type ParentTypes CheckMenuItem Source # 
Instance details

Defined in GI.Gtk.Objects.CheckMenuItem

type ParentTypes CheckMenuItem = '[MenuItem, Bin, Container, Widget, Object, ImplementorIface, Actionable, Activatable, Buildable]

class (GObject o, IsDescendantOf CheckMenuItem o) => IsCheckMenuItem o Source #

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

Instances

Instances details
(GObject o, IsDescendantOf CheckMenuItem o) => IsCheckMenuItem o Source # 
Instance details

Defined in GI.Gtk.Objects.CheckMenuItem

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

Click to display all available methods, including inherited ones

Expand

Methods

activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, deselect, destroy, destroyed, deviceIsShadowed, doSetRelatedAction, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, select, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, syncActionProperties, thawChildNotify, thawNotify, toggleSizeAllocate, toggleSizeRequest, toggled, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAccelPath, getAccessible, getActionGroup, getActionName, getActionTargetValue, getActive, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getDrawAsRadio, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInconsistent, getInternalChild, getLabel, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRelatedAction, getRequestMode, getRequisition, getReserveIndicator, getResizeMode, getRightJustified, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSubmenu, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getUseActionAppearance, getUseUnderline, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.

Setters

setAccelPath, setActionName, setActionTargetValue, setActive, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDetailedActionName, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setDrawAsRadio, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setInconsistent, setLabel, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setRelatedAction, setReserveIndicator, setResizeMode, setRightJustified, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSubmenu, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setUseActionAppearance, setUseUnderline, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.

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 toggled signal.

Properties

active

No description available in the introspection data.

constructCheckMenuItemActive :: (IsCheckMenuItem o, MonadIO m) => Bool -> m (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, MonadIO m) => Bool -> m (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, MonadIO m) => Bool -> m (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