| 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.ShortcutLabel
Contents
Description
ShortcutLabel is a widget that represents a single keyboard shortcut or gesture
in the user interface.
Synopsis
- newtype ShortcutLabel = ShortcutLabel (ManagedPtr ShortcutLabel)
- class GObject o => IsShortcutLabel o
- toShortcutLabel :: (MonadIO m, IsShortcutLabel o) => o -> m ShortcutLabel
- noShortcutLabel :: Maybe 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 => Text -> IO (GValueConstruct o)
- getShortcutLabelAccelerator :: (MonadIO m, IsShortcutLabel o) => o -> m (Maybe Text)
- setShortcutLabelAccelerator :: (MonadIO m, IsShortcutLabel o) => o -> Text -> m ()
- constructShortcutLabelDisabledText :: IsShortcutLabel o => Text -> IO (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
| GObject ShortcutLabel Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel Methods gobjectType :: ShortcutLabel -> IO GType # | |
| IsImplementorIface ShortcutLabel Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel | |
| IsObject ShortcutLabel Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel | |
| IsBuildable ShortcutLabel Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel | |
| IsOrientable ShortcutLabel Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel | |
| IsBox ShortcutLabel Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel | |
| IsContainer ShortcutLabel Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel | |
| IsWidget ShortcutLabel Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel | |
| IsShortcutLabel ShortcutLabel Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel | |
class GObject o => IsShortcutLabel o Source #
Type class for types which can be safely cast to ShortcutLabel, for instance with toShortcutLabel.
Instances
| (GObject a, (UnknownAncestorError ShortcutLabel a :: Constraint)) => IsShortcutLabel a Source # | |
Defined in GI.Gtk.Objects.ShortcutLabel | |
| IsShortcutLabel ShortcutLabel Source # | |
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.
noShortcutLabel :: Maybe ShortcutLabel Source #
A convenience alias for Nothing :: Maybe ShortcutLabel.
Methods
getAccelerator
shortcutLabelGetAccelerator Source #
Arguments
| :: (HasCallStack, MonadIO m, IsShortcutLabel a) | |
| => a |
|
| -> m (Maybe Text) | Returns: the current accelerator. |
Retrieves the current accelerator of self.
Since: 3.22
getDisabledText
shortcutLabelGetDisabledText Source #
Arguments
| :: (HasCallStack, MonadIO m, IsShortcutLabel a) | |
| => a |
|
| -> m (Maybe Text) | Returns: the current text displayed when no accelerator is set. |
Retrieves the text that is displayed when no accelerator is set.
Since: 3.22
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Text |
|
| -> m ShortcutLabel | Returns: a newly-allocated |
Creates a new ShortcutLabel with accelerator set.
Since: 3.22
setAccelerator
shortcutLabelSetAccelerator Source #
Arguments
| :: (HasCallStack, MonadIO m, IsShortcutLabel a) | |
| => a |
|
| -> Text |
|
| -> m () |
Sets the accelerator to be displayed by self.
Since: 3.22
setDisabledText
shortcutLabelSetDisabledText Source #
Arguments
| :: (HasCallStack, MonadIO m, IsShortcutLabel a) | |
| => a |
|
| -> Text |
|
| -> m () |
Sets the text to be displayed by self when no accelerator is set.
Since: 3.22
Properties
accelerator
The accelerator that self displays. See ShortcutsShortcut:accelerator
for the accepted syntax.
Since: 3.22
constructShortcutLabelAccelerator :: IsShortcutLabel o => Text -> IO (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
setshortcutLabel [ #accelerator:=value ]
disabledText
The text that is displayed when no accelerator is set.
Since: 3.22
constructShortcutLabelDisabledText :: IsShortcutLabel o => Text -> IO (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
setshortcutLabel [ #disabledText:=value ]