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

Contents

- Exported types
- Methods
  - new
- Properties
  - active
  - pulse
  - size

Description

Renders a spinning animation in a cell

`GtkCellRendererSpinner` renders a spinning animation in a cell, very similar to `GtkSpinner`. It can often be used as an alternative to a `GtkCellRendererProgress` for displaying indefinite activity, instead of actual progress.

To start the animation in a cell, set the `GtkCellRendererSpinner:active` property to `True` and increment the `GtkCellRendererSpinner:pulse` property at regular intervals. The usual way to set the cell renderer properties for each cell is to bind them to columns in your tree model using e.g. `treeViewColumnAddAttribute`.

Synopsis

- newtype CellRendererSpinner = CellRendererSpinner (ManagedPtr CellRendererSpinner)
- class (GObject o, IsDescendantOf CellRendererSpinner o) => IsCellRendererSpinner o
- toCellRendererSpinner :: (MonadIO m, IsCellRendererSpinner o) => o -> m CellRendererSpinner
- cellRendererSpinnerNew :: (HasCallStack, MonadIO m) => m CellRendererSpinner
- constructCellRendererSpinnerActive :: (IsCellRendererSpinner o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererSpinnerActive :: (MonadIO m, IsCellRendererSpinner o) => o -> m Bool
- setCellRendererSpinnerActive :: (MonadIO m, IsCellRendererSpinner o) => o -> Bool -> m ()
- constructCellRendererSpinnerPulse :: (IsCellRendererSpinner o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getCellRendererSpinnerPulse :: (MonadIO m, IsCellRendererSpinner o) => o -> m Word32
- setCellRendererSpinnerPulse :: (MonadIO m, IsCellRendererSpinner o) => o -> Word32 -> m ()
- constructCellRendererSpinnerSize :: (IsCellRendererSpinner o, MonadIO m) => IconSize -> m (GValueConstruct o)
- getCellRendererSpinnerSize :: (MonadIO m, IsCellRendererSpinner o) => o -> m IconSize
- setCellRendererSpinnerSize :: (MonadIO m, IsCellRendererSpinner o) => o -> IconSize -> m ()

# Exported types

newtype CellRendererSpinner Source #

Memory-managed wrapper type.

Constructors

CellRendererSpinner (ManagedPtr CellRendererSpinner) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf CellRendererSpinner o) => IsCellRendererSpinner o Source #

Type class for types which can be safely cast to `CellRendererSpinner`, for instance with `toCellRendererSpinner`.

#### Instances

Instances details

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

toCellRendererSpinner :: (MonadIO m, IsCellRendererSpinner o) => o -> m CellRendererSpinner Source #

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

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

#### Setters

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

## new

cellRendererSpinnerNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m CellRendererSpinner | Returns: a new `GtkCellRenderer`

Deprecated: (Since version 4.10)

Returns a new cell renderer which will show a spinner to indicate activity.

# Properties

## active

Whether the spinner is active (ie. shown) in the cell

constructCellRendererSpinnerActive :: (IsCellRendererSpinner 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`.

getCellRendererSpinnerActive :: (MonadIO m, IsCellRendererSpinner o) => o -> m Bool Source #

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

    get cellRendererSpinner #active

setCellRendererSpinnerActive :: (MonadIO m, IsCellRendererSpinner o) => o -> Bool -> m () Source #

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

    set cellRendererSpinner [ #active := value ]

## pulse

Pulse of the spinner. Increment this value to draw the next frame of the spinner animation. Usually, you would update this value in a timeout.

By default, the `GtkSpinner` widget draws one full cycle of the animation, consisting of 12 frames, in 750 milliseconds.

constructCellRendererSpinnerPulse :: (IsCellRendererSpinner o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getCellRendererSpinnerPulse :: (MonadIO m, IsCellRendererSpinner o) => o -> m Word32 Source #

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

    get cellRendererSpinner #pulse

setCellRendererSpinnerPulse :: (MonadIO m, IsCellRendererSpinner o) => o -> Word32 -> m () Source #

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

    set cellRendererSpinner [ #pulse := value ]

## size

The `GtkIconSize` value that specifies the size of the rendered spinner.

constructCellRendererSpinnerSize :: (IsCellRendererSpinner o, MonadIO m) => IconSize -> m (GValueConstruct o) Source #

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

getCellRendererSpinnerSize :: (MonadIO m, IsCellRendererSpinner o) => o -> m IconSize Source #

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

    get cellRendererSpinner #size

setCellRendererSpinnerSize :: (MonadIO m, IsCellRendererSpinner o) => o -> IconSize -> m () Source #

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

    set cellRendererSpinner [ #size := value ]