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.CellRendererToggle

Contents

- Exported types
- Methods
  - getActivatable
  - getActive
  - getRadio
  - new
  - setActivatable
  - setActive
  - setRadio
- Properties
  - activatable
  - active
  - inconsistent
  - radio
- Signals
  - toggled

Description

Renders a toggle button in a cell

`GtkCellRendererToggle` renders a toggle button in a cell. The button is drawn as a radio or a checkbutton, depending on the `GtkCellRendererToggle:radio` property. When activated, it emits the `GtkCellRendererToggle::toggled` signal.

Synopsis

- newtype CellRendererToggle = CellRendererToggle (ManagedPtr CellRendererToggle)
- class (GObject o, IsDescendantOf CellRendererToggle o) => IsCellRendererToggle o
- toCellRendererToggle :: (MonadIO m, IsCellRendererToggle o) => o -> m CellRendererToggle
- cellRendererToggleGetActivatable :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> m Bool
- cellRendererToggleGetActive :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> m Bool
- cellRendererToggleGetRadio :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> m Bool
- cellRendererToggleNew :: (HasCallStack, MonadIO m) => m CellRendererToggle
- cellRendererToggleSetActivatable :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> Bool -> m ()
- cellRendererToggleSetActive :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> Bool -> m ()
- cellRendererToggleSetRadio :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> Bool -> m ()
- constructCellRendererToggleActivatable :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererToggleActivatable :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool
- setCellRendererToggleActivatable :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m ()
- constructCellRendererToggleActive :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererToggleActive :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool
- setCellRendererToggleActive :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m ()
- constructCellRendererToggleInconsistent :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererToggleInconsistent :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool
- setCellRendererToggleInconsistent :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m ()
- constructCellRendererToggleRadio :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererToggleRadio :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool
- setCellRendererToggleRadio :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m ()
- type CellRendererToggleToggledCallback = Text -> IO ()
- afterCellRendererToggleToggled :: (IsCellRendererToggle a, MonadIO m) => a -> ((?self :: a) => CellRendererToggleToggledCallback) -> m SignalHandlerId
- onCellRendererToggleToggled :: (IsCellRendererToggle a, MonadIO m) => a -> ((?self :: a) => CellRendererToggleToggledCallback) -> m SignalHandlerId

# Exported types

newtype CellRendererToggle Source #

Memory-managed wrapper type.

Constructors

CellRendererToggle (ManagedPtr CellRendererToggle) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf CellRendererToggle o) => IsCellRendererToggle o Source #

Type class for types which can be safely cast to `CellRendererToggle`, for instance with `toCellRendererToggle`.

#### Instances

Instances details

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

toCellRendererToggle :: (MonadIO m, IsCellRendererToggle o) => o -> m CellRendererToggle Source #

Cast to `CellRendererToggle`, 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, runDispose, snapshot, startEditing, stealData, stealQdata, stopEditing, thawNotify, unref, watchClosure.

#### Getters

getActivatable, getActive, getAlignedArea, getAlignment, getData, getFixedSize, getIsExpanded, getIsExpander, getPadding, getPreferredHeight, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRadio, getRequestMode, getSensitive, getState, getVisible.

#### Setters

setActivatable, setActive, setAlignment, setData, setDataFull, setFixedSize, setIsExpanded, setIsExpander, setPadding, setProperty, setRadio, setSensitive, setVisible.

## getActivatable

cellRendererToggleGetActivatable Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRendererToggle a) |
=> a | `toggle`: a `GtkCellRendererToggle`
-> m Bool | Returns: `True` if the cell renderer is activatable.

Deprecated: (Since version 4.10)

Returns whether the cell renderer is activatable. See `cellRendererToggleSetActivatable`.

## getActive

cellRendererToggleGetActive Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRendererToggle a) |
=> a | `toggle`: a `GtkCellRendererToggle`
-> m Bool | Returns: `True` if the cell renderer is active.

Deprecated: (Since version 4.10)

Returns whether the cell renderer is active. See `cellRendererToggleSetActive`.

## getRadio

cellRendererToggleGetRadio Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRendererToggle a) |
=> a | `toggle`: a `GtkCellRendererToggle`
-> m Bool | Returns: `True` if we’re rendering radio toggles rather than checkboxes

Deprecated: (Since version 4.10)

Returns whether we’re rendering radio toggles rather than checkboxes.

## new

cellRendererToggleNew Source #

Arguments

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

Deprecated: (Since version 4.10)

Creates a new `GtkCellRendererToggle`. Adjust rendering parameters using object properties. Object properties can be set globally (with `g_object_set()`). Also, with `GtkTreeViewColumn`, you can bind a property to a value in a `GtkTreeModel`. For example, you can bind the “active” property on the cell renderer to a boolean value in the model, thus causing the check button to reflect the state of the model.

## setActivatable

cellRendererToggleSetActivatable Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRendererToggle a) |
=> a | `toggle`: a `GtkCellRendererToggle`.
-> Bool | `setting`: the value to set.
-> m () |

Deprecated: (Since version 4.10)

Makes the cell renderer activatable.

## setActive

cellRendererToggleSetActive Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRendererToggle a) |
=> a | `toggle`: a `GtkCellRendererToggle`.
-> Bool | `setting`: the value to set.
-> m () |

Deprecated: (Since version 4.10)

Activates or deactivates a cell renderer.

## setRadio

cellRendererToggleSetRadio Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRendererToggle a) |
=> a | `toggle`: a `GtkCellRendererToggle`
-> Bool | `radio`: `True` to make the toggle look like a radio button
-> m () |

Deprecated: (Since version 4.10)

If `radio` is `True`, the cell renderer renders a radio toggle (i.e. a toggle in a group of mutually-exclusive toggles). If `False`, it renders a check toggle (a standalone boolean option). This can be set globally for the cell renderer, or changed just before rendering each cell in the model (for `GtkTreeView`, you set up a per-row setting using `GtkTreeViewColumn` to associate model columns with cell renderer properties).

# Properties

## activatable

No description available in the introspection data.

constructCellRendererToggleActivatable :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCellRendererToggleActivatable :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool Source #

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

    get cellRendererToggle #activatable

setCellRendererToggleActivatable :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m () Source #

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

    set cellRendererToggle [ #activatable := value ]

## active

No description available in the introspection data.

constructCellRendererToggleActive :: (IsCellRendererToggle 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`.

getCellRendererToggleActive :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool Source #

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

    get cellRendererToggle #active

setCellRendererToggleActive :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m () Source #

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

    set cellRendererToggle [ #active := value ]

## inconsistent

No description available in the introspection data.

constructCellRendererToggleInconsistent :: (IsCellRendererToggle 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`.

getCellRendererToggleInconsistent :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool Source #

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

    get cellRendererToggle #inconsistent

setCellRendererToggleInconsistent :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m () Source #

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

    set cellRendererToggle [ #inconsistent := value ]

## radio

No description available in the introspection data.

constructCellRendererToggleRadio :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCellRendererToggleRadio :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool Source #

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

    get cellRendererToggle #radio

setCellRendererToggleRadio :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m () Source #

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

    set cellRendererToggle [ #radio := value ]

# Signals

## toggled

type CellRendererToggleToggledCallback Source #

Arguments

= Text | `path`: string representation of `GtkTreePath` describing the event location
-> IO () |

The toggled signal is emitted when the cell is toggled.

It is the responsibility of the application to update the model with the correct value to store at `path`. Often this is simply the opposite of the value currently stored at `path`.

afterCellRendererToggleToggled :: (IsCellRendererToggle a, MonadIO m) => a -> ((?self :: a) => CellRendererToggleToggledCallback) -> 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 cellRendererToggle #toggled 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.

onCellRendererToggleToggled :: (IsCellRendererToggle a, MonadIO m) => a -> ((?self :: a) => CellRendererToggleToggledCallback) -> 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 cellRendererToggle #toggled callback