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

Contents

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

Description

A list model that presents the selection from a `GtkSelectionModel`.

Synopsis

- newtype SelectionFilterModel = SelectionFilterModel (ManagedPtr SelectionFilterModel)
- class (GObject o, IsDescendantOf SelectionFilterModel o) => IsSelectionFilterModel o
- toSelectionFilterModel :: (MonadIO m, IsSelectionFilterModel o) => o -> m SelectionFilterModel
- selectionFilterModelGetModel :: (HasCallStack, MonadIO m, IsSelectionFilterModel a) => a -> m (Maybe SelectionModel)
- selectionFilterModelNew :: (HasCallStack, MonadIO m, IsSelectionModel a) => Maybe a -> m SelectionFilterModel
- selectionFilterModelSetModel :: (HasCallStack, MonadIO m, IsSelectionFilterModel a, IsSelectionModel b) => a -> Maybe b -> m ()
- getSelectionFilterModelItemType :: (MonadIO m, IsSelectionFilterModel o) => o -> m GType
- clearSelectionFilterModelModel :: (MonadIO m, IsSelectionFilterModel o) => o -> m ()
- constructSelectionFilterModelModel :: (IsSelectionFilterModel o, MonadIO m, IsSelectionModel a) => a -> m (GValueConstruct o)
- getSelectionFilterModelModel :: (MonadIO m, IsSelectionFilterModel o) => o -> m (Maybe SelectionModel)
- setSelectionFilterModelModel :: (MonadIO m, IsSelectionFilterModel o, IsSelectionModel a) => o -> a -> m ()
- getSelectionFilterModelNItems :: (MonadIO m, IsSelectionFilterModel o) => o -> m Word32

# Exported types

newtype SelectionFilterModel Source #

Memory-managed wrapper type.

Constructors

SelectionFilterModel (ManagedPtr SelectionFilterModel) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf SelectionFilterModel o) => IsSelectionFilterModel o Source #

Type class for types which can be safely cast to `SelectionFilterModel`, for instance with `toSelectionFilterModel`.

#### Instances

Instances details

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

toSelectionFilterModel :: (MonadIO m, IsSelectionFilterModel o) => o -> m SelectionFilterModel Source #

Cast to `SelectionFilterModel`, 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, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

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

#### Setters

setData, setDataFull, setModel, setProperty.

## getModel

selectionFilterModelGetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsSelectionFilterModel a) |
=> a | `self`: a `GtkSelectionFilterModel`
-> m (Maybe SelectionModel) | Returns: The model that gets filtered

Gets the model currently filtered or `Nothing` if none.

## new

selectionFilterModelNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsSelectionModel a) |
=> Maybe a | `model`: the selection model to filter
-> m SelectionFilterModel | Returns: a new `GtkSelectionFilterModel`

Creates a new `GtkSelectionFilterModel` that will include the selected items from the underlying selection model.

## setModel

selectionFilterModelSetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsSelectionFilterModel a, IsSelectionModel b) |
=> a | `self`: a `GtkSelectionFilterModel`
-> Maybe b | `model`: The model to be filtered
-> m () |

Sets the model to be filtered.

Note that GTK makes no effort to ensure that `model` conforms to the item type of `self`. It assumes that the caller knows what they are doing and have set up an appropriate filter to ensure that item types match.

# Properties

## itemType

The type of items. See `listModelGetItemType`.

Since: 4.8

getSelectionFilterModelItemType :: (MonadIO m, IsSelectionFilterModel o) => o -> m GType Source #

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

    get selectionFilterModel #itemType

## model

The model being filtered.

clearSelectionFilterModelModel :: (MonadIO m, IsSelectionFilterModel o) => o -> m () Source #

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

    clear #model

constructSelectionFilterModelModel :: (IsSelectionFilterModel o, MonadIO m, IsSelectionModel 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`.

getSelectionFilterModelModel :: (MonadIO m, IsSelectionFilterModel o) => o -> m (Maybe SelectionModel) Source #

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

    get selectionFilterModel #model

setSelectionFilterModelModel :: (MonadIO m, IsSelectionFilterModel o, IsSelectionModel a) => o -> a -> m () Source #

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

    set selectionFilterModel [ #model := value ]

## nItems

The number of items. See `listModelGetNItems`.

Since: 4.8

getSelectionFilterModelNItems :: (MonadIO m, IsSelectionFilterModel o) => o -> m Word32 Source #

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

    get selectionFilterModel #nItems