gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.ShortcutLabel

Contents

- Exported types
- Methods
  - getAccelerator
  - getDisabledText
  - new
  - setAccelerator
  - setDisabledText
- Properties
  - accelerator
  - disabledText

Description

`GtkShortcutLabel` displays a single keyboard shortcut or gesture.

The main use case for `GtkShortcutLabel` is inside a `ShortcutsWindow`.

Synopsis

- newtype ShortcutLabel = ShortcutLabel (ManagedPtr ShortcutLabel)
- class (GObject o, IsDescendantOf ShortcutLabel o) => IsShortcutLabel o
- toShortcutLabel :: (MonadIO m, IsShortcutLabel o) => o -> m ShortcutLabel
- shortcutLabelGetAccelerator :: (HasCallStack, MonadIO m, IsShortcutLabel a) => a -> m (Maybe Text)
- shortcutLabelGetDisabledText :: (HasCallStack, MonadIO m, IsShortcutLabel a) => a -> m (Maybe Text)
- shortcutLabelNew :: (HasCallStack, MonadIO m) => Text -> m ShortcutLabel
- shortcutLabelSetAccelerator :: (HasCallStack, MonadIO m, IsShortcutLabel a) => a -> Text -> m ()
- shortcutLabelSetDisabledText :: (HasCallStack, MonadIO m, IsShortcutLabel a) => a -> Text -> m ()
- constructShortcutLabelAccelerator :: (IsShortcutLabel o, MonadIO m) => Text -> m (GValueConstruct o)
- getShortcutLabelAccelerator :: (MonadIO m, IsShortcutLabel o) => o -> m (Maybe Text)
- setShortcutLabelAccelerator :: (MonadIO m, IsShortcutLabel o) => o -> Text -> m ()
- constructShortcutLabelDisabledText :: (IsShortcutLabel o, MonadIO m) => Text -> m (GValueConstruct o)
- getShortcutLabelDisabledText :: (MonadIO m, IsShortcutLabel o) => o -> m (Maybe Text)
- setShortcutLabelDisabledText :: (MonadIO m, IsShortcutLabel o) => o -> Text -> m ()

# Exported types

newtype ShortcutLabel Source #

Memory-managed wrapper type.

Constructors

ShortcutLabel (ManagedPtr ShortcutLabel) |

#### Instances

Instances details

Eq ShortcutLabel Source # |
Instance details Defined in GI.Gtk.Objects.ShortcutLabel Methods (==) :: ShortcutLabel -> ShortcutLabel -> Bool Source # (/=) :: ShortcutLabel -> ShortcutLabel -> Bool Source #
GObject ShortcutLabel Source # |
Instance details Defined in GI.Gtk.Objects.ShortcutLabel
ManagedPtrNewtype ShortcutLabel Source # |
Instance details Defined in GI.Gtk.Objects.ShortcutLabel Methods toManagedPtr :: ShortcutLabel -> ManagedPtr ShortcutLabel Source #
TypedObject ShortcutLabel Source # |
Instance details Defined in GI.Gtk.Objects.ShortcutLabel Methods glibType :: IO GType Source #
HasParentTypes ShortcutLabel Source # |
Instance details Defined in GI.Gtk.Objects.ShortcutLabel
IsGValue (Maybe ShortcutLabel) Source # | Convert `ShortcutLabel` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.ShortcutLabel Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe ShortcutLabel -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe ShortcutLabel) Source #
type ParentTypes ShortcutLabel Source # |
Instance details Defined in GI.Gtk.Objects.ShortcutLabel type ParentTypes ShortcutLabel = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf ShortcutLabel o) => IsShortcutLabel o Source #

Type class for types which can be safely cast to `ShortcutLabel`, for instance with `toShortcutLabel`.

#### Instances

Instances details

(GObject o, IsDescendantOf ShortcutLabel o) => IsShortcutLabel o Source # |
Instance details Defined in GI.Gtk.Objects.ShortcutLabel

toShortcutLabel :: (MonadIO m, IsShortcutLabel o) => o -> m ShortcutLabel Source #

Cast to `ShortcutLabel`, 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

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccelerator, getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisabledText, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

#### Setters

setAccelerator, setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setDisabledText, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

## getAccelerator

shortcutLabelGetAccelerator Source #

Arguments

:: (HasCallStack, MonadIO m, IsShortcutLabel a) |
=> a | `self`: a `GtkShortcutLabel`
-> m (Maybe Text) | Returns: the current accelerator.

Deprecated: (Since version 4.18)This widget will be removed in GTK 5

Retrieves the current accelerator of `self`.

## getDisabledText

shortcutLabelGetDisabledText Source #

Arguments

:: (HasCallStack, MonadIO m, IsShortcutLabel a) |
=> a | `self`: a `GtkShortcutLabel`
-> m (Maybe Text) | Returns: the current text displayed when no accelerator is set.

Deprecated: (Since version 4.18)This widget will be removed in GTK 5

Retrieves the text that is displayed when no accelerator is set.

## new

shortcutLabelNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `accelerator`: the initial accelerator
-> m ShortcutLabel | Returns: a newly-allocated `GtkShortcutLabel`

Deprecated: (Since version 4.18)This widget will be removed in GTK 5

Creates a new `GtkShortcutLabel` with `accelerator` set.

## setAccelerator

shortcutLabelSetAccelerator Source #

Arguments

:: (HasCallStack, MonadIO m, IsShortcutLabel a) |
=> a | `self`: a `GtkShortcutLabel`
-> Text | `accelerator`: the new accelerator
-> m () |

Deprecated: (Since version 4.18)This widget will be removed in GTK 5

Sets the accelerator to be displayed by `self`.

## setDisabledText

shortcutLabelSetDisabledText Source #

Arguments

:: (HasCallStack, MonadIO m, IsShortcutLabel a) |
=> a | `self`: a `GtkShortcutLabel`
-> Text | `disabledText`: the text to be displayed when no accelerator is set
-> m () |

Deprecated: (Since version 4.18)This widget will be removed in GTK 5

Sets the text to be displayed by `self` when no accelerator is set.

# Properties

## accelerator

The accelerator that `self` displays.

See ShortcutsShortcut:accelerator for the accepted syntax.

constructShortcutLabelAccelerator :: (IsShortcutLabel o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getShortcutLabelAccelerator :: (MonadIO m, IsShortcutLabel o) => o -> m (Maybe Text) Source #

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

    get shortcutLabel #accelerator

setShortcutLabelAccelerator :: (MonadIO m, IsShortcutLabel o) => o -> Text -> m () Source #

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

    set shortcutLabel [ #accelerator := value ]

## disabledText

The text that is displayed when no accelerator is set.

constructShortcutLabelDisabledText :: (IsShortcutLabel o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getShortcutLabelDisabledText :: (MonadIO m, IsShortcutLabel o) => o -> m (Maybe Text) Source #

Get the value of the “`disabled-text`” property. When overloading is enabled, this is equivalent to

    get shortcutLabel #disabledText

setShortcutLabelDisabledText :: (MonadIO m, IsShortcutLabel o) => o -> Text -> m () Source #

Set the value of the “`disabled-text`” property. When overloading is enabled, this is equivalent to

    set shortcutLabel [ #disabledText := value ]