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

Contents

- Exported types
- Methods
  - getModel
  - getModelForItem
  - new
  - setModel
- Properties
  - itemType
  - model
  - nItems

Description

A list model that concatenates other list models.

`GtkFlattenListModel` takes a list model containing list models, and flattens it into a single model. Each list model becomes a section in the single model.

Synopsis

- newtype FlattenListModel = FlattenListModel (ManagedPtr FlattenListModel)
- class (GObject o, IsDescendantOf FlattenListModel o) => IsFlattenListModel o
- toFlattenListModel :: (MonadIO m, IsFlattenListModel o) => o -> m FlattenListModel
- flattenListModelGetModel :: (HasCallStack, MonadIO m, IsFlattenListModel a) => a -> m (Maybe ListModel)
- flattenListModelGetModelForItem :: (HasCallStack, MonadIO m, IsFlattenListModel a) => a -> Word32 -> m (Maybe ListModel)
- flattenListModelNew :: (HasCallStack, MonadIO m, IsListModel a) => Maybe a -> m FlattenListModel
- flattenListModelSetModel :: (HasCallStack, MonadIO m, IsFlattenListModel a, IsListModel b) => a -> Maybe b -> m ()
- getFlattenListModelItemType :: (MonadIO m, IsFlattenListModel o) => o -> m GType
- clearFlattenListModelModel :: (MonadIO m, IsFlattenListModel o) => o -> m ()
- constructFlattenListModelModel :: (IsFlattenListModel o, MonadIO m, IsListModel a) => a -> m (GValueConstruct o)
- getFlattenListModelModel :: (MonadIO m, IsFlattenListModel o) => o -> m (Maybe ListModel)
- setFlattenListModelModel :: (MonadIO m, IsFlattenListModel o, IsListModel a) => o -> a -> m ()
- getFlattenListModelNItems :: (MonadIO m, IsFlattenListModel o) => o -> m Word32

# Exported types

newtype FlattenListModel Source #

Memory-managed wrapper type.

Constructors

FlattenListModel (ManagedPtr FlattenListModel) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf FlattenListModel o) => IsFlattenListModel o Source #

Type class for types which can be safely cast to `FlattenListModel`, for instance with `toFlattenListModel`.

#### Instances

Instances details

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

toFlattenListModel :: (MonadIO m, IsFlattenListModel o) => o -> m FlattenListModel Source #

Cast to `FlattenListModel`, 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, itemsChanged, notify, notifyByPspec, ref, refSink, runDispose, sectionsChanged, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getItem, getItemType, getModel, getModelForItem, getNItems, getProperty, getQdata, getSection.

#### Setters

setData, setDataFull, setModel, setProperty.

## getModel

flattenListModelGetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsFlattenListModel a) |
=> a | `self`: a `GtkFlattenListModel`
-> m (Maybe ListModel) | Returns: The model flattened by `self`

Gets the model set via `flattenListModelSetModel`.

## getModelForItem

flattenListModelGetModelForItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsFlattenListModel a) |
=> a | `self`: a `GtkFlattenListModel`
-> Word32 | `position`: a position
-> m (Maybe ListModel) | Returns: the model containing the item at `position`

Returns the model containing the item at the given position.

## new

flattenListModelNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsListModel a) |
=> Maybe a | `model`: the model to be flattened
-> m FlattenListModel | Returns: a new `GtkFlattenListModel`

Creates a new `GtkFlattenListModel` that flattens `list`.

## setModel

flattenListModelSetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsFlattenListModel a, IsListModel b) |
=> a | `self`: a `GtkFlattenListModel`
-> Maybe b | `model`: the new model
-> m () |

Sets a new model to be flattened.

# Properties

## itemType

The type of items. See `listModelGetItemType`.

Since: 4.8

getFlattenListModelItemType :: (MonadIO m, IsFlattenListModel o) => o -> m GType Source #

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

    get flattenListModel #itemType

## model

The model being flattened.

clearFlattenListModelModel :: (MonadIO m, IsFlattenListModel o) => o -> m () Source #

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

    clear #model

constructFlattenListModelModel :: (IsFlattenListModel o, MonadIO m, IsListModel a) => a -> m (GValueConstruct o) Source #

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

getFlattenListModelModel :: (MonadIO m, IsFlattenListModel o) => o -> m (Maybe ListModel) Source #

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

    get flattenListModel #model

setFlattenListModelModel :: (MonadIO m, IsFlattenListModel o, IsListModel a) => o -> a -> m () Source #

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

    set flattenListModel [ #model := value ]

## nItems

The number of items. See `listModelGetNItems`.

Since: 4.8

getFlattenListModelNItems :: (MonadIO m, IsFlattenListModel o) => o -> m Word32 Source #

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

    get flattenListModel #nItems