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

Contents

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

Description

A selection model that allows selecting multiple elements.

Synopsis

- newtype MultiSelection = MultiSelection (ManagedPtr MultiSelection)
- class (GObject o, IsDescendantOf MultiSelection o) => IsMultiSelection o
- toMultiSelection :: (MonadIO m, IsMultiSelection o) => o -> m MultiSelection
- multiSelectionGetModel :: (HasCallStack, MonadIO m, IsMultiSelection a) => a -> m (Maybe ListModel)
- multiSelectionNew :: (HasCallStack, MonadIO m, IsListModel a) => Maybe a -> m MultiSelection
- multiSelectionSetModel :: (HasCallStack, MonadIO m, IsMultiSelection a, IsListModel b) => a -> Maybe b -> m ()
- getMultiSelectionItemType :: (MonadIO m, IsMultiSelection o) => o -> m GType
- clearMultiSelectionModel :: (MonadIO m, IsMultiSelection o) => o -> m ()
- constructMultiSelectionModel :: (IsMultiSelection o, MonadIO m, IsListModel a) => a -> m (GValueConstruct o)
- getMultiSelectionModel :: (MonadIO m, IsMultiSelection o) => o -> m (Maybe ListModel)
- setMultiSelectionModel :: (MonadIO m, IsMultiSelection o, IsListModel a) => o -> a -> m ()
- getMultiSelectionNItems :: (MonadIO m, IsMultiSelection o) => o -> m Word32

# Exported types

newtype MultiSelection Source #

Memory-managed wrapper type.

Constructors

MultiSelection (ManagedPtr MultiSelection) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf MultiSelection o) => IsMultiSelection o Source #

Type class for types which can be safely cast to `MultiSelection`, for instance with `toMultiSelection`.

#### Instances

Instances details

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

toMultiSelection :: (MonadIO m, IsMultiSelection o) => o -> m MultiSelection Source #

Cast to `MultiSelection`, 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, isSelected, itemsChanged, notify, notifyByPspec, ref, refSink, runDispose, sectionsChanged, selectAll, selectItem, selectRange, selectionChanged, stealData, stealQdata, thawNotify, unref, unselectAll, unselectItem, unselectRange, watchClosure.

#### Getters

getData, getItem, getItemType, getModel, getNItems, getProperty, getQdata, getSection, getSelection, getSelectionInRange.

#### Setters

setData, setDataFull, setModel, setProperty, setSelection.

## getModel

multiSelectionGetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsMultiSelection a) |
=> a | `self`: a `GtkMultiSelection`
-> m (Maybe ListModel) | Returns: the underlying model

Returns the underlying model of `self`.

## new

multiSelectionNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsListModel a) |
=> Maybe a | `model`: the `GListModel` to manage
-> m MultiSelection | Returns: a new `GtkMultiSelection`

Creates a new selection to handle `model`.

## setModel

multiSelectionSetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsMultiSelection a, IsListModel b) |
=> a | `self`: a `GtkMultiSelection`
-> Maybe b | `model`: A `GListModel` to wrap
-> m () |

Sets the model that `self` should wrap.

If `model` is `Nothing`, `self` will be empty.

# Properties

## itemType

The type of items. See `listModelGetItemType`.

Since: 4.8

getMultiSelectionItemType :: (MonadIO m, IsMultiSelection o) => o -> m GType Source #

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

    get multiSelection #itemType

## model

The list managed by this selection.

clearMultiSelectionModel :: (MonadIO m, IsMultiSelection o) => o -> m () Source #

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

    clear #model

constructMultiSelectionModel :: (IsMultiSelection 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`.

getMultiSelectionModel :: (MonadIO m, IsMultiSelection o) => o -> m (Maybe ListModel) Source #

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

    get multiSelection #model

setMultiSelectionModel :: (MonadIO m, IsMultiSelection o, IsListModel a) => o -> a -> m () Source #

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

    set multiSelection [ #model := value ]

## nItems

The number of items. See `listModelGetNItems`.

Since: 4.8

getMultiSelectionNItems :: (MonadIO m, IsMultiSelection o) => o -> m Word32 Source #

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

    get multiSelection #nItems