gi-gtk-3.0.43: Gtk 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.CellRendererAccel

Contents

- Exported types
- Methods
  - new
- Properties
  - accelKey
  - accelMode
  - accelMods
  - keycode
- Signals
  - accelCleared
  - accelEdited

Description

`CellRendererAccel` displays a keyboard accelerator (i.e. a key combination like `Control + a`). If the cell renderer is editable, the accelerator can be changed by simply typing the new combination.

The `CellRendererAccel` cell renderer was added in GTK+ 2.10.

Synopsis

- newtype CellRendererAccel = CellRendererAccel (ManagedPtr CellRendererAccel)
- class (GObject o, IsDescendantOf CellRendererAccel o) => IsCellRendererAccel o
- toCellRendererAccel :: (MonadIO m, IsCellRendererAccel o) => o -> m CellRendererAccel
- cellRendererAccelNew :: (HasCallStack, MonadIO m) => m CellRendererAccel
- constructCellRendererAccelAccelKey :: (IsCellRendererAccel o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getCellRendererAccelAccelKey :: (MonadIO m, IsCellRendererAccel o) => o -> m Word32
- setCellRendererAccelAccelKey :: (MonadIO m, IsCellRendererAccel o) => o -> Word32 -> m ()
- constructCellRendererAccelAccelMode :: (IsCellRendererAccel o, MonadIO m) => CellRendererAccelMode -> m (GValueConstruct o)
- getCellRendererAccelAccelMode :: (MonadIO m, IsCellRendererAccel o) => o -> m CellRendererAccelMode
- setCellRendererAccelAccelMode :: (MonadIO m, IsCellRendererAccel o) => o -> CellRendererAccelMode -> m ()
- constructCellRendererAccelAccelMods :: (IsCellRendererAccel o, MonadIO m) => [ModifierType] -> m (GValueConstruct o)
- getCellRendererAccelAccelMods :: (MonadIO m, IsCellRendererAccel o) => o -> m [ModifierType]
- setCellRendererAccelAccelMods :: (MonadIO m, IsCellRendererAccel o) => o -> [ModifierType] -> m ()
- constructCellRendererAccelKeycode :: (IsCellRendererAccel o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getCellRendererAccelKeycode :: (MonadIO m, IsCellRendererAccel o) => o -> m Word32
- setCellRendererAccelKeycode :: (MonadIO m, IsCellRendererAccel o) => o -> Word32 -> m ()
- type CellRendererAccelAccelClearedCallback = Text -> IO ()
- afterCellRendererAccelAccelCleared :: (IsCellRendererAccel a, MonadIO m) => a -> ((?self :: a) => CellRendererAccelAccelClearedCallback) -> m SignalHandlerId
- onCellRendererAccelAccelCleared :: (IsCellRendererAccel a, MonadIO m) => a -> ((?self :: a) => CellRendererAccelAccelClearedCallback) -> m SignalHandlerId
- type CellRendererAccelAccelEditedCallback = Text -> Word32 -> [ModifierType] -> Word32 -> IO ()
- afterCellRendererAccelAccelEdited :: (IsCellRendererAccel a, MonadIO m) => a -> ((?self :: a) => CellRendererAccelAccelEditedCallback) -> m SignalHandlerId
- onCellRendererAccelAccelEdited :: (IsCellRendererAccel a, MonadIO m) => a -> ((?self :: a) => CellRendererAccelAccelEditedCallback) -> m SignalHandlerId

# Exported types

newtype CellRendererAccel Source #

Memory-managed wrapper type.

Constructors

CellRendererAccel (ManagedPtr CellRendererAccel) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf CellRendererAccel o) => IsCellRendererAccel o Source #

Type class for types which can be safely cast to `CellRendererAccel`, for instance with `toCellRendererAccel`.

#### Instances

Instances details

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

toCellRendererAccel :: (MonadIO m, IsCellRendererAccel o) => o -> m CellRendererAccel Source #

Cast to `CellRendererAccel`, 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, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isActivatable, isFloating, notify, notifyByPspec, ref, refSink, render, runDispose, startEditing, stealData, stealQdata, stopEditing, thawNotify, unref, watchClosure.

#### Getters

getAlignedArea, getAlignment, getData, getFixedSize, getPadding, getPreferredHeight, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRequestMode, getSensitive, getSize, getState, getVisible.

#### Setters

setAlignment, setData, setDataFull, setFixedHeightFromFont, setFixedSize, setPadding, setProperty, setSensitive, setVisible.

## new

cellRendererAccelNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m CellRendererAccel | Returns: the new cell renderer

Creates a new `CellRendererAccel`.

Since: 2.10

# Properties

## accelKey

The keyval of the accelerator.

Since: 2.10

constructCellRendererAccelAccelKey :: (IsCellRendererAccel o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getCellRendererAccelAccelKey :: (MonadIO m, IsCellRendererAccel o) => o -> m Word32 Source #

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

    get cellRendererAccel #accelKey

setCellRendererAccelAccelKey :: (MonadIO m, IsCellRendererAccel o) => o -> Word32 -> m () Source #

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

    set cellRendererAccel [ #accelKey := value ]

## accelMode

Determines if the edited accelerators are GTK+ accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by GTK+ are allowed, and the accelerators are rendered in the same way as they are in menus.

If the mode is set to `CellRendererAccelModeModifierTap` then bare modifiers can be set as accelerators by tapping (ie: pressing and immediately releasing) them.

Since: 2.10

constructCellRendererAccelAccelMode :: (IsCellRendererAccel o, MonadIO m) => CellRendererAccelMode -> m (GValueConstruct o) Source #

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

getCellRendererAccelAccelMode :: (MonadIO m, IsCellRendererAccel o) => o -> m CellRendererAccelMode Source #

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

    get cellRendererAccel #accelMode

setCellRendererAccelAccelMode :: (MonadIO m, IsCellRendererAccel o) => o -> CellRendererAccelMode -> m () Source #

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

    set cellRendererAccel [ #accelMode := value ]

## accelMods

The modifier mask of the accelerator.

Since: 2.10

constructCellRendererAccelAccelMods :: (IsCellRendererAccel o, MonadIO m) => [ModifierType] -> m (GValueConstruct o) Source #

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

getCellRendererAccelAccelMods :: (MonadIO m, IsCellRendererAccel o) => o -> m [ModifierType] Source #

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

    get cellRendererAccel #accelMods

setCellRendererAccelAccelMods :: (MonadIO m, IsCellRendererAccel o) => o -> [ModifierType] -> m () Source #

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

    set cellRendererAccel [ #accelMods := value ]

## keycode

The hardware keycode of the accelerator. Note that the hardware keycode is only relevant if the key does not have a keyval. Normally, the keyboard configuration should assign keyvals to all keys.

Since: 2.10

constructCellRendererAccelKeycode :: (IsCellRendererAccel o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getCellRendererAccelKeycode :: (MonadIO m, IsCellRendererAccel o) => o -> m Word32 Source #

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

    get cellRendererAccel #keycode

setCellRendererAccelKeycode :: (MonadIO m, IsCellRendererAccel o) => o -> Word32 -> m () Source #

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

    set cellRendererAccel [ #keycode := value ]

# Signals

## accelCleared

type CellRendererAccelAccelClearedCallback Source #

Arguments

= Text | `pathString`: the path identifying the row of the edited cell
-> IO () |

Gets emitted when the user has removed the accelerator.

Since: 2.10

afterCellRendererAccelAccelCleared :: (IsCellRendererAccel a, MonadIO m) => a -> ((?self :: a) => CellRendererAccelAccelClearedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the accelCleared signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after cellRendererAccel #accelCleared callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onCellRendererAccelAccelCleared :: (IsCellRendererAccel a, MonadIO m) => a -> ((?self :: a) => CellRendererAccelAccelClearedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the accelCleared signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on cellRendererAccel #accelCleared callback

## accelEdited

type CellRendererAccelAccelEditedCallback Source #

Arguments

= Text | `pathString`: the path identifying the row of the edited cell
-> Word32 | `accelKey`: the new accelerator keyval
-> [ModifierType] | `accelMods`: the new acclerator modifier mask
-> Word32 | `hardwareKeycode`: the keycode of the new accelerator
-> IO () |

Gets emitted when the user has selected a new accelerator.

Since: 2.10

afterCellRendererAccelAccelEdited :: (IsCellRendererAccel a, MonadIO m) => a -> ((?self :: a) => CellRendererAccelAccelEditedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the accelEdited signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after cellRendererAccel #accelEdited callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onCellRendererAccelAccelEdited :: (IsCellRendererAccel a, MonadIO m) => a -> ((?self :: a) => CellRendererAccelAccelEditedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the accelEdited signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on cellRendererAccel #accelEdited callback