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

Contents

- Exported types
- Methods
  - getChild
  - getEnd
  - getItem
  - getNItems
  - getStart
  - setChild
- Properties
  - child
  - end
  - item
  - nItems
  - start

Description

Used by list widgets to represent the headers they display.

`GtkListHeader` objects are managed just like `ListItem` objects via their factory, but provide a different set of properties suitable for managing the header instead of individual items.

Since: 4.12

Synopsis

- newtype ListHeader = ListHeader (ManagedPtr ListHeader)
- class (GObject o, IsDescendantOf ListHeader o) => IsListHeader o
- toListHeader :: (MonadIO m, IsListHeader o) => o -> m ListHeader
- listHeaderGetChild :: (HasCallStack, MonadIO m, IsListHeader a) => a -> m (Maybe Widget)
- listHeaderGetEnd :: (HasCallStack, MonadIO m, IsListHeader a) => a -> m Word32
- listHeaderGetItem :: (HasCallStack, MonadIO m, IsListHeader a) => a -> m (Maybe Object)
- listHeaderGetNItems :: (HasCallStack, MonadIO m, IsListHeader a) => a -> m Word32
- listHeaderGetStart :: (HasCallStack, MonadIO m, IsListHeader a) => a -> m Word32
- listHeaderSetChild :: (HasCallStack, MonadIO m, IsListHeader a, IsWidget b) => a -> Maybe b -> m ()
- clearListHeaderChild :: (MonadIO m, IsListHeader o) => o -> m ()
- constructListHeaderChild :: (IsListHeader o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getListHeaderChild :: (MonadIO m, IsListHeader o) => o -> m (Maybe Widget)
- setListHeaderChild :: (MonadIO m, IsListHeader o, IsWidget a) => o -> a -> m ()
- getListHeaderEnd :: (MonadIO m, IsListHeader o) => o -> m Word32
- getListHeaderItem :: (MonadIO m, IsListHeader o) => o -> m (Maybe Object)
- getListHeaderNItems :: (MonadIO m, IsListHeader o) => o -> m Word32
- getListHeaderStart :: (MonadIO m, IsListHeader o) => o -> m Word32

# Exported types

newtype ListHeader Source #

Memory-managed wrapper type.

Constructors

ListHeader (ManagedPtr ListHeader) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf ListHeader o) => IsListHeader o Source #

Type class for types which can be safely cast to `ListHeader`, for instance with `toListHeader`.

#### Instances

Instances details

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

toListHeader :: (MonadIO m, IsListHeader o) => o -> m ListHeader Source #

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

getChild, getData, getEnd, getItem, getNItems, getProperty, getQdata, getStart.

#### Setters

setChild, setData, setDataFull, setProperty.

## getChild

listHeaderGetChild Source #

Arguments

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

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

Since: 4.12

## getEnd

listHeaderGetEnd Source #

Arguments

:: (HasCallStack, MonadIO m, IsListHeader a) |
=> a | `self`: a `GtkListHeader`
-> m Word32 | Returns: The end position of the section

Gets the end position in the model of the section that `self` is currently the header for.

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

Since: 4.12

## getItem

listHeaderGetItem Source #

Arguments

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

Gets the model item at the start of the section. This is the item that occupies the list model at position ListHeader:start.

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

Since: 4.12

## getNItems

listHeaderGetNItems Source #

Arguments

:: (HasCallStack, MonadIO m, IsListHeader a) |
=> a | `self`: a `GtkListHeader`
-> m Word32 | Returns: The number of items in the section

Gets the the number of items in the section.

If `self` is unbound, 0 is returned.

Since: 4.12

## getStart

listHeaderGetStart Source #

Arguments

:: (HasCallStack, MonadIO m, IsListHeader a) |
=> a | `self`: a `GtkListHeader`
-> m Word32 | Returns: The start position of the section

Gets the start position in the model of the section that `self` is currently the header for.

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

Since: 4.12

## setChild

listHeaderSetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsListHeader a, IsWidget b) |
=> a | `self`: a `GtkListHeader`
-> 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 header so that the widget can be reused when binding it multiple times.

Since: 4.12

# Properties

## child

Widget used for display.

Since: 4.12

clearListHeaderChild :: (MonadIO m, IsListHeader o) => o -> m () Source #

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

    clear #child

constructListHeaderChild :: (IsListHeader 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`.

getListHeaderChild :: (MonadIO m, IsListHeader o) => o -> m (Maybe Widget) Source #

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

    get listHeader #child

setListHeaderChild :: (MonadIO m, IsListHeader o, IsWidget a) => o -> a -> m () Source #

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

    set listHeader [ #child := value ]

## end

The first position no longer part of this section.

Since: 4.12

getListHeaderEnd :: (MonadIO m, IsListHeader o) => o -> m Word32 Source #

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

    get listHeader #end

## item

The item at the start of the section.

Since: 4.12

getListHeaderItem :: (MonadIO m, IsListHeader o) => o -> m (Maybe Object) Source #

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

    get listHeader #item

## nItems

Number of items in this section.

Since: 4.12

getListHeaderNItems :: (MonadIO m, IsListHeader o) => o -> m Word32 Source #

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

    get listHeader #nItems

## start

First position of items in this section.

Since: 4.12

getListHeaderStart :: (MonadIO m, IsListHeader o) => o -> m Word32 Source #

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

    get listHeader #start