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

Contents

- Exported types
- Methods
  - getChild
  - getFocusable
  - getItem
  - getPosition
  - getSelected
  - setChild
  - setFocusable
- Properties
  - child
  - focusable
  - item
  - position
  - selected

Description

Represents items in a cell in `ColumnView`.

The `GtkColumnViewCell`s are managed by the `ColumnView` widget (with its factory) and cannot be created by applications, but they need to be populated by application code. This is done by calling `columnViewCellSetChild`.

`GtkColumnViewCell`s exist in 2 stages:

1. The unbound stage where the listitem is not currently connected to an item in the list. In that case, the ColumnViewCell:item property is set to `Nothing`.
2. The bound stage where the listitem references an item from the list. The ColumnViewCell:item property is not `Nothing`.

Since: 4.12

Synopsis

- newtype ColumnViewCell = ColumnViewCell (ManagedPtr ColumnViewCell)
- class (GObject o, IsDescendantOf ColumnViewCell o) => IsColumnViewCell o
- toColumnViewCell :: (MonadIO m, IsColumnViewCell o) => o -> m ColumnViewCell
- columnViewCellGetChild :: (HasCallStack, MonadIO m, IsColumnViewCell a) => a -> m (Maybe Widget)
- columnViewCellGetFocusable :: (HasCallStack, MonadIO m, IsColumnViewCell a) => a -> m Bool
- columnViewCellGetItem :: (HasCallStack, MonadIO m, IsColumnViewCell a) => a -> m (Maybe Object)
- columnViewCellGetPosition :: (HasCallStack, MonadIO m, IsColumnViewCell a) => a -> m Word32
- columnViewCellGetSelected :: (HasCallStack, MonadIO m, IsColumnViewCell a) => a -> m Bool
- columnViewCellSetChild :: (HasCallStack, MonadIO m, IsColumnViewCell a, IsWidget b) => a -> Maybe b -> m ()
- columnViewCellSetFocusable :: (HasCallStack, MonadIO m, IsColumnViewCell a) => a -> Bool -> m ()
- clearColumnViewCellChild :: (MonadIO m, IsColumnViewCell o) => o -> m ()
- constructColumnViewCellChild :: (IsColumnViewCell o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getColumnViewCellChild :: (MonadIO m, IsColumnViewCell o) => o -> m (Maybe Widget)
- setColumnViewCellChild :: (MonadIO m, IsColumnViewCell o, IsWidget a) => o -> a -> m ()
- constructColumnViewCellFocusable :: (IsColumnViewCell o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColumnViewCellFocusable :: (MonadIO m, IsColumnViewCell o) => o -> m Bool
- setColumnViewCellFocusable :: (MonadIO m, IsColumnViewCell o) => o -> Bool -> m ()
- getColumnViewCellItem :: (MonadIO m, IsColumnViewCell o) => o -> m (Maybe Object)
- getColumnViewCellPosition :: (MonadIO m, IsColumnViewCell o) => o -> m Word32
- getColumnViewCellSelected :: (MonadIO m, IsColumnViewCell o) => o -> m Bool

# Exported types

newtype ColumnViewCell Source #

Memory-managed wrapper type.

Constructors

ColumnViewCell (ManagedPtr ColumnViewCell) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf ColumnViewCell o) => IsColumnViewCell o Source #

Type class for types which can be safely cast to `ColumnViewCell`, for instance with `toColumnViewCell`.

#### Instances

Instances details

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

toColumnViewCell :: (MonadIO m, IsColumnViewCell o) => o -> m ColumnViewCell Source #

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

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getAccessibleDescription, getAccessibleLabel, getActivatable, getChild, getData, getFocusable, getItem, getPosition, getProperty, getQdata, getSelectable, getSelected.

#### Setters

setAccessibleDescription, setAccessibleLabel, setActivatable, setChild, setData, setDataFull, setFocusable, setProperty, setSelectable.

## getChild

columnViewCellGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewCell a) |
=> a | `self`: a `GtkColumnViewCell`
-> m (Maybe Widget) | Returns: The child

Gets the child previously set via `columnViewCellSetChild` or `Nothing` if none was set.

Since: 4.12

## getFocusable

columnViewCellGetFocusable Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewCell a) |
=> a | `self`: a `GtkColumnViewCell`
-> m Bool | Returns: `True` if the item is focusable

Checks if a list item has been set to be focusable via `columnViewCellSetFocusable`.

Since: 4.12

## getItem

columnViewCellGetItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewCell a) |
=> a | `self`: a `GtkColumnViewCell`
-> m (Maybe Object) | Returns: The item displayed

Gets the model item that associated with `self`.

If `self` is unbound, this function returns `Nothing`.

Since: 4.12

## getPosition

columnViewCellGetPosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewCell a) |
=> a | `self`: a `GtkColumnViewCell`
-> m Word32 | Returns: The position of this item

Gets the position in the model that `self` currently displays.

If `self` is unbound, `INVALID_LIST_POSITION` is returned.

Since: 4.12

## getSelected

columnViewCellGetSelected Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewCell a) |
=> a | `self`: a `GtkColumnViewCell`
-> m Bool | Returns: `True` if the item is selected.

Checks if the item is displayed as selected.

The selected state is maintained by the list widget and its model and cannot be set otherwise.

Since: 4.12

## setChild

columnViewCellSetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewCell a, IsWidget b) |
=> a | `self`: a `GtkColumnViewCell`
-> Maybe b | `child`: The list item's child or `Nothing` to unset
-> m () |

Sets the child to be used for this listitem.

This function is typically called by applications when setting up a listitem so that the widget can be reused when binding it multiple times.

Since: 4.12

## setFocusable

columnViewCellSetFocusable Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewCell a) |
=> a | `self`: a `GtkColumnViewCell`
-> Bool | `focusable`: if the item should be focusable
-> m () |

Sets `self` to be focusable.

If an item is focusable, it can be focused using the keyboard. This works similar to `widgetSetFocusable`.

Note that if items are not focusable, the keyboard cannot be used to activate them and selecting only works if one of the listitem's children is focusable.

By default, list items are focusable.

Since: 4.12

# Properties

## child

Widget used for display.

Since: 4.12

clearColumnViewCellChild :: (MonadIO m, IsColumnViewCell o) => o -> m () Source #

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

    clear #child

constructColumnViewCellChild :: (IsColumnViewCell o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

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

getColumnViewCellChild :: (MonadIO m, IsColumnViewCell o) => o -> m (Maybe Widget) Source #

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

    get columnViewCell #child

setColumnViewCellChild :: (MonadIO m, IsColumnViewCell o, IsWidget a) => o -> a -> m () Source #

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

    set columnViewCell [ #child := value ]

## focusable

If the item can be focused with the keyboard.

Since: 4.12

constructColumnViewCellFocusable :: (IsColumnViewCell o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getColumnViewCellFocusable :: (MonadIO m, IsColumnViewCell o) => o -> m Bool Source #

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

    get columnViewCell #focusable

setColumnViewCellFocusable :: (MonadIO m, IsColumnViewCell o) => o -> Bool -> m () Source #

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

    set columnViewCell [ #focusable := value ]

## item

Displayed item.

Since: 4.12

getColumnViewCellItem :: (MonadIO m, IsColumnViewCell o) => o -> m (Maybe Object) Source #

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

    get columnViewCell #item

## position

Position of the item.

Since: 4.12

getColumnViewCellPosition :: (MonadIO m, IsColumnViewCell o) => o -> m Word32 Source #

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

    get columnViewCell #position

## selected

If the item is currently selected.

Since: 4.12

getColumnViewCellSelected :: (MonadIO m, IsColumnViewCell o) => o -> m Bool Source #

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

    get columnViewCell #selected