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

Contents

- Exported types
- Methods
  - appendColumn
  - getColumns
  - getEnableRubberband
  - getHeaderFactory
  - getModel
  - getReorderable
  - getRowFactory
  - getShowColumnSeparators
  - getShowRowSeparators
  - getSingleClickActivate
  - getSorter
  - getTabBehavior
  - insertColumn
  - new
  - removeColumn
  - scrollTo
  - setEnableRubberband
  - setHeaderFactory
  - setModel
  - setReorderable
  - setRowFactory
  - setShowColumnSeparators
  - setShowRowSeparators
  - setSingleClickActivate
  - setTabBehavior
  - sortByColumn
- Properties
  - columns
  - enableRubberband
  - headerFactory
  - model
  - reorderable
  - rowFactory
  - showColumnSeparators
  - showRowSeparators
  - singleClickActivate
  - sorter
  - tabBehavior
- Signals
  - activate

Description

Presents a large dynamic list of items using multiple columns with headers.

`GtkColumnView` uses the factories of its columns to generate a cell widget for each column, for each visible item and displays them together as the row for this item.

The ColumnView:showRowSeparators and ColumnView:showColumnSeparators properties offer a simple way to display separators between the rows or columns.

`GtkColumnView` allows the user to select items according to the selection characteristics of the model. For models that allow multiple selected items, it is possible to turn on *rubberband selection*, using ColumnView:enableRubberband.

The column view supports sorting that can be customized by the user by clicking on column headers. To set this up, the `GtkSorter` returned by `columnViewGetSorter` must be attached to a sort model for the data that the view is showing, and the columns must have sorters attached to them by calling `columnViewColumnSetSorter`. The initial sort order can be set with `columnViewSortByColumn`.

The column view also supports interactive resizing and reordering of columns, via Drag-and-Drop of the column headers. This can be enabled or disabled with the ColumnView:reorderable and ColumnViewColumn:resizable properties.

To learn more about the list widget framework, see the overview.

# CSS nodes

    columnview[.column-separators][.rich-list][.navigation-sidebar][.data-table]
    ├── header
    │   ├── <column header>
    ┊   ┊
    │   ╰── <column header>
    │
    ├── listview
    │
    ┊
    ╰── [rubberband]

`GtkColumnView` uses a single CSS node named columnview. It may carry the .column-separators style class, when ColumnView:showColumnSeparators property is set. Header widgets appear below a node with name header. The rows are contained in a `GtkListView` widget, so there is a listview node with the same structure as for a standalone `GtkListView` widget. If ColumnView:showRowSeparators is set, it will be passed on to the list view, causing its CSS node to carry the .separators style class. For rubberband selection, a node with name rubberband is used.

The main columnview node may also carry style classes to select the style of list presentation: .rich-list, .navigation-sidebar or .data-table.

# Accessibility

`GtkColumnView` uses the `AccessibleRoleTreeGrid` role, header title widgets are using the `AccessibleRoleColumnHeader` role. The row widgets are using the `AccessibleRoleRow` role, and individual cells are using the `AccessibleRoleGridCell` role

Synopsis

- newtype ColumnView = ColumnView (ManagedPtr ColumnView)
- class (GObject o, IsDescendantOf ColumnView o) => IsColumnView o
- toColumnView :: (MonadIO m, IsColumnView o) => o -> m ColumnView
- columnViewAppendColumn :: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) => a -> b -> m ()
- columnViewGetColumns :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m ListModel
- columnViewGetEnableRubberband :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m Bool
- columnViewGetHeaderFactory :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m (Maybe ListItemFactory)
- columnViewGetModel :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m (Maybe SelectionModel)
- columnViewGetReorderable :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m Bool
- columnViewGetRowFactory :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m (Maybe ListItemFactory)
- columnViewGetShowColumnSeparators :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m Bool
- columnViewGetShowRowSeparators :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m Bool
- columnViewGetSingleClickActivate :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m Bool
- columnViewGetSorter :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m (Maybe Sorter)
- columnViewGetTabBehavior :: (HasCallStack, MonadIO m, IsColumnView a) => a -> m ListTabBehavior
- columnViewInsertColumn :: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) => a -> Word32 -> b -> m ()
- columnViewNew :: (HasCallStack, MonadIO m, IsSelectionModel a) => Maybe a -> m ColumnView
- columnViewRemoveColumn :: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) => a -> b -> m ()
- columnViewScrollTo :: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) => a -> Word32 -> Maybe b -> [ListScrollFlags] -> Maybe ScrollInfo -> m ()
- columnViewSetEnableRubberband :: (HasCallStack, MonadIO m, IsColumnView a) => a -> Bool -> m ()
- columnViewSetHeaderFactory :: (HasCallStack, MonadIO m, IsColumnView a, IsListItemFactory b) => a -> Maybe b -> m ()
- columnViewSetModel :: (HasCallStack, MonadIO m, IsColumnView a, IsSelectionModel b) => a -> Maybe b -> m ()
- columnViewSetReorderable :: (HasCallStack, MonadIO m, IsColumnView a) => a -> Bool -> m ()
- columnViewSetRowFactory :: (HasCallStack, MonadIO m, IsColumnView a, IsListItemFactory b) => a -> Maybe b -> m ()
- columnViewSetShowColumnSeparators :: (HasCallStack, MonadIO m, IsColumnView a) => a -> Bool -> m ()
- columnViewSetShowRowSeparators :: (HasCallStack, MonadIO m, IsColumnView a) => a -> Bool -> m ()
- columnViewSetSingleClickActivate :: (HasCallStack, MonadIO m, IsColumnView a) => a -> Bool -> m ()
- columnViewSetTabBehavior :: (HasCallStack, MonadIO m, IsColumnView a) => a -> ListTabBehavior -> m ()
- columnViewSortByColumn :: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) => a -> Maybe b -> SortType -> m ()
- getColumnViewColumns :: (MonadIO m, IsColumnView o) => o -> m ListModel
- constructColumnViewEnableRubberband :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColumnViewEnableRubberband :: (MonadIO m, IsColumnView o) => o -> m Bool
- setColumnViewEnableRubberband :: (MonadIO m, IsColumnView o) => o -> Bool -> m ()
- clearColumnViewHeaderFactory :: (MonadIO m, IsColumnView o) => o -> m ()
- constructColumnViewHeaderFactory :: (IsColumnView o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o)
- getColumnViewHeaderFactory :: (MonadIO m, IsColumnView o) => o -> m (Maybe ListItemFactory)
- setColumnViewHeaderFactory :: (MonadIO m, IsColumnView o, IsListItemFactory a) => o -> a -> m ()
- clearColumnViewModel :: (MonadIO m, IsColumnView o) => o -> m ()
- constructColumnViewModel :: (IsColumnView o, MonadIO m, IsSelectionModel a) => a -> m (GValueConstruct o)
- getColumnViewModel :: (MonadIO m, IsColumnView o) => o -> m (Maybe SelectionModel)
- setColumnViewModel :: (MonadIO m, IsColumnView o, IsSelectionModel a) => o -> a -> m ()
- constructColumnViewReorderable :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColumnViewReorderable :: (MonadIO m, IsColumnView o) => o -> m Bool
- setColumnViewReorderable :: (MonadIO m, IsColumnView o) => o -> Bool -> m ()
- clearColumnViewRowFactory :: (MonadIO m, IsColumnView o) => o -> m ()
- constructColumnViewRowFactory :: (IsColumnView o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o)
- getColumnViewRowFactory :: (MonadIO m, IsColumnView o) => o -> m (Maybe ListItemFactory)
- setColumnViewRowFactory :: (MonadIO m, IsColumnView o, IsListItemFactory a) => o -> a -> m ()
- constructColumnViewShowColumnSeparators :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColumnViewShowColumnSeparators :: (MonadIO m, IsColumnView o) => o -> m Bool
- setColumnViewShowColumnSeparators :: (MonadIO m, IsColumnView o) => o -> Bool -> m ()
- constructColumnViewShowRowSeparators :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColumnViewShowRowSeparators :: (MonadIO m, IsColumnView o) => o -> m Bool
- setColumnViewShowRowSeparators :: (MonadIO m, IsColumnView o) => o -> Bool -> m ()
- constructColumnViewSingleClickActivate :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColumnViewSingleClickActivate :: (MonadIO m, IsColumnView o) => o -> m Bool
- setColumnViewSingleClickActivate :: (MonadIO m, IsColumnView o) => o -> Bool -> m ()
- getColumnViewSorter :: (MonadIO m, IsColumnView o) => o -> m (Maybe Sorter)
- constructColumnViewTabBehavior :: (IsColumnView o, MonadIO m) => ListTabBehavior -> m (GValueConstruct o)
- getColumnViewTabBehavior :: (MonadIO m, IsColumnView o) => o -> m ListTabBehavior
- setColumnViewTabBehavior :: (MonadIO m, IsColumnView o) => o -> ListTabBehavior -> m ()
- type ColumnViewActivateCallback = Word32 -> IO ()
- afterColumnViewActivate :: (IsColumnView a, MonadIO m) => a -> ((?self :: a) => ColumnViewActivateCallback) -> m SignalHandlerId
- onColumnViewActivate :: (IsColumnView a, MonadIO m) => a -> ((?self :: a) => ColumnViewActivateCallback) -> m SignalHandlerId

# Exported types

newtype ColumnView Source #

Memory-managed wrapper type.

Constructors

ColumnView (ManagedPtr ColumnView) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf ColumnView o) => IsColumnView o Source #

Type class for types which can be safely cast to `ColumnView`, for instance with `toColumnView`.

#### Instances

Instances details

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

toColumnView :: (MonadIO m, IsColumnView o) => o -> m ColumnView Source #

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

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, appendColumn, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, insertColumn, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeColumn, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, scrollTo, shouldLayout, show, sizeAllocate, snapshotChild, sortByColumn, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBorder, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getColumns, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getEnableRubberband, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHadjustment, getHalign, getHasTooltip, getHeaderFactory, getHeight, getHexpand, getHexpandSet, getHscrollPolicy, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getModel, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getReorderable, getRequestMode, getRoot, getRowFactory, getScaleFactor, getSensitive, getSettings, getShowColumnSeparators, getShowRowSeparators, getSingleClickActivate, getSize, getSizeRequest, getSorter, getStateFlags, getStyleContext, getTabBehavior, getTemplateChild, getTooltipMarkup, getTooltipText, getVadjustment, getValign, getVexpand, getVexpandSet, getVisible, getVscrollPolicy, getWidth.

#### Setters

setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setEnableRubberband, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHadjustment, setHalign, setHasTooltip, setHeaderFactory, setHexpand, setHexpandSet, setHscrollPolicy, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setModel, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setReorderable, setRowFactory, setSensitive, setShowColumnSeparators, setShowRowSeparators, setSingleClickActivate, setSizeRequest, setStateFlags, setTabBehavior, setTooltipMarkup, setTooltipText, setVadjustment, setValign, setVexpand, setVexpandSet, setVisible, setVscrollPolicy.

## appendColumn

columnViewAppendColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) |
=> a | `self`: a columnview
-> b | `column`: a column that hasn't been added to a `GtkColumnView` yet
-> m () |

Appends the `column` to the end of the columns in `self`.

## getColumns

columnViewGetColumns Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m ListModel | Returns: The list managing the columns

Gets the list of columns in this column view.

This list is constant over the lifetime of `self` and can be used to monitor changes to the columns of `self` by connecting to the ListModel::itemsChanged signal.

## getEnableRubberband

columnViewGetEnableRubberband Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m Bool | Returns: true if rubberband selection is enabled

Returns whether rows can be selected by dragging with the mouse.

## getHeaderFactory

columnViewGetHeaderFactory Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m (Maybe ListItemFactory) | Returns: The factory in use

Gets the factory that's currently used to populate section headers.

Since: 4.12

## getModel

columnViewGetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m (Maybe SelectionModel) | Returns: The model in use

Gets the model that's currently used to read the items displayed.

## getReorderable

columnViewGetReorderable Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m Bool | Returns: true if columns are reorderable

Returns whether columns are reorderable.

## getRowFactory

columnViewGetRowFactory Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m (Maybe ListItemFactory) | Returns: The factory

Gets the factory set via `columnViewSetRowFactory`.

Since: 4.12

## getShowColumnSeparators

columnViewGetShowColumnSeparators Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m Bool | Returns: true if the list shows column separators

Returns whether the list should show separators between columns.

## getShowRowSeparators

columnViewGetShowRowSeparators Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m Bool | Returns: true if the list shows separators

Returns whether the list should show separators between rows.

## getSingleClickActivate

columnViewGetSingleClickActivate Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m Bool | Returns: true if rows are activated on single click

Returns whether rows will be activated on single click and selected on hover.

## getSorter

columnViewGetSorter Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m (Maybe Sorter) | Returns: the `GtkSorter` of `self`

Returns a special sorter that reflects the users sorting choices in the column view.

To allow users to customizable sorting by clicking on column headers, this sorter needs to be set on the sort model underneath the model that is displayed by the view.

See `columnViewColumnSetSorter` for setting up per-column sorting.

Here is an example:

### c code

    gtk_column_view_column_set_sorter (column, sorter);
    gtk_column_view_append_column (view, column);
    sorter = g_object_ref (gtk_column_view_get_sorter (view)));
    model = gtk_sort_list_model_new (store, sorter);
    selection = gtk_no_selection_new (model);
    gtk_column_view_set_model (view, selection);

## getTabBehavior

columnViewGetTabBehavior Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> m ListTabBehavior | Returns: The behavior of the <kbd>Tab</kbd> key

Gets the behavior set for the <kbd>Tab</kbd> key.

Since: 4.12

## insertColumn

columnViewInsertColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) |
=> a | `self`: a columnview
-> Word32 | `position`: the position to insert `column` at
-> b | `column`: the column to insert
-> m () |

Inserts a column at the given position in the columns of `self`.

If `column` is already a column of `self`, it will be repositioned.

## new

columnViewNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsSelectionModel a) |
=> Maybe a | `model`: the list model to use
-> m ColumnView | Returns: a new `GtkColumnView`

Creates a new `GtkColumnView`.

You most likely want to call `columnViewAppendColumn` to add columns next.

## removeColumn

columnViewRemoveColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) |
=> a | `self`: a columnview
-> b | `column`: a column that's part of `self`
-> m () |

Removes the `column` from the list of columns of `self`.

## scrollTo

columnViewScrollTo Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) |
=> a | `self`: The columnview
-> Word32 | `pos`: position of the item. Must be less than the number of items in the view.
-> Maybe b | `column`: The column to scroll to or `NULL` to not scroll columns
-> [ListScrollFlags] | `flags`: actions to perform
-> Maybe ScrollInfo | `scroll`: details of how to perform the scroll operation or `Nothing` to scroll into view
-> m () |

Scroll to the row at the given position - or cell if a column is given - and performs the actions specified in `flags`.

This function works no matter if the columnview is shown or focused. If it isn't, then the changes will take effect once that happens.

Since: 4.12

## setEnableRubberband

columnViewSetEnableRubberband Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> Bool | `enableRubberband`: whether to enable rubberband selection
-> m () |

Sets whether selections can be changed by dragging with the mouse.

## setHeaderFactory

columnViewSetHeaderFactory Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a, IsListItemFactory b) |
=> a | `self`: a columnview
-> Maybe b | `factory`: the factory to use
-> m () |

Sets the factory to use for populating the `ListHeader` objects used in section headers.

If this factory is set to `NULL`, the list will not show section headers.

Since: 4.12

## setModel

columnViewSetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a, IsSelectionModel b) |
=> a | `self`: a columnview
-> Maybe b | `model`: the model to use
-> m () |

Sets the model to use.

This must be a `SelectionModel`.

## setReorderable

columnViewSetReorderable Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> Bool | `reorderable`: whether columns should be reorderable
-> m () |

Sets whether columns should be reorderable by dragging.

## setRowFactory

columnViewSetRowFactory Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a, IsListItemFactory b) |
=> a | `self`: a columnview
-> Maybe b | `factory`: The row factory
-> m () |

Sets the factory used for configuring rows.

The factory must be for configuring `ColumnViewRow` objects.

If this factory is not set - which is the default - then the defaults will be used.

This factory is not used to set the widgets displayed in the individual cells. For that see [method`gtkColumnViewColumn`.set_factory] and [class`gtkColumnViewCell`].

Since: 4.12

## setShowColumnSeparators

columnViewSetShowColumnSeparators Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> Bool | `showColumnSeparators`: whether to show column separators
-> m () |

Sets whether the list should show separators between columns.

## setShowRowSeparators

columnViewSetShowRowSeparators Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> Bool | `showRowSeparators`: whether to show row separators
-> m () |

Sets whether the list should show separators between rows.

## setSingleClickActivate

columnViewSetSingleClickActivate Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> Bool | `singleClickActivate`: whether to activate items on single click
-> m () |

Sets whether rows should be activated on single click and selected on hover.

## setTabBehavior

columnViewSetTabBehavior Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a) |
=> a | `self`: a columnview
-> ListTabBehavior | `tabBehavior`: The desired tab behavior
-> m () |

Sets the <kbd>Tab</kbd> key behavior.

This influences how the <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keys move the focus in the columnview.

Since: 4.12

## sortByColumn

columnViewSortByColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnView a, IsColumnViewColumn b) |
=> a | `self`: a columnview
-> Maybe b | `column`: the column to sort by
-> SortType | `direction`: the direction to sort in
-> m () |

Sets the sorting of the view.

This function should be used to set up the initial sorting. At runtime, users can change the sorting of a column view by clicking on the list headers.

This call only has an effect if the sorter returned by `columnViewGetSorter` is set on a sort model, and `columnViewColumnSetSorter` has been called on `column` to associate a sorter with the column.

If `column` is unset, the view will be unsorted.

# Properties

## columns

The list of columns.

getColumnViewColumns :: (MonadIO m, IsColumnView o) => o -> m ListModel Source #

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

    get columnView #columns

## enableRubberband

Allow rubberband selection.

constructColumnViewEnableRubberband :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getColumnViewEnableRubberband :: (MonadIO m, IsColumnView o) => o -> m Bool Source #

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

    get columnView #enableRubberband

setColumnViewEnableRubberband :: (MonadIO m, IsColumnView o) => o -> Bool -> m () Source #

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

    set columnView [ #enableRubberband := value ]

## headerFactory

Factory for creating header widgets.

The factory must be for configuring `ListHeader` objects.

Since: 4.12

clearColumnViewHeaderFactory :: (MonadIO m, IsColumnView o) => o -> m () Source #

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

    clear #headerFactory

constructColumnViewHeaderFactory :: (IsColumnView o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o) Source #

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

getColumnViewHeaderFactory :: (MonadIO m, IsColumnView o) => o -> m (Maybe ListItemFactory) Source #

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

    get columnView #headerFactory

setColumnViewHeaderFactory :: (MonadIO m, IsColumnView o, IsListItemFactory a) => o -> a -> m () Source #

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

    set columnView [ #headerFactory := value ]

## model

Model for the items displayed.

clearColumnViewModel :: (MonadIO m, IsColumnView o) => o -> m () Source #

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

    clear #model

constructColumnViewModel :: (IsColumnView 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`.

getColumnViewModel :: (MonadIO m, IsColumnView o) => o -> m (Maybe SelectionModel) Source #

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

    get columnView #model

setColumnViewModel :: (MonadIO m, IsColumnView o, IsSelectionModel a) => o -> a -> m () Source #

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

    set columnView [ #model := value ]

## reorderable

Whether columns are reorderable.

constructColumnViewReorderable :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getColumnViewReorderable :: (MonadIO m, IsColumnView o) => o -> m Bool Source #

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

    get columnView #reorderable

setColumnViewReorderable :: (MonadIO m, IsColumnView o) => o -> Bool -> m () Source #

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

    set columnView [ #reorderable := value ]

## rowFactory

The factory used for configuring rows.

The factory must be for configuring `ColumnViewRow` objects.

Since: 4.12

clearColumnViewRowFactory :: (MonadIO m, IsColumnView o) => o -> m () Source #

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

    clear #rowFactory

constructColumnViewRowFactory :: (IsColumnView o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o) Source #

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

getColumnViewRowFactory :: (MonadIO m, IsColumnView o) => o -> m (Maybe ListItemFactory) Source #

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

    get columnView #rowFactory

setColumnViewRowFactory :: (MonadIO m, IsColumnView o, IsListItemFactory a) => o -> a -> m () Source #

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

    set columnView [ #rowFactory := value ]

## showColumnSeparators

Show separators between columns.

constructColumnViewShowColumnSeparators :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getColumnViewShowColumnSeparators :: (MonadIO m, IsColumnView o) => o -> m Bool Source #

Get the value of the “`show-column-separators`” property. When overloading is enabled, this is equivalent to

    get columnView #showColumnSeparators

setColumnViewShowColumnSeparators :: (MonadIO m, IsColumnView o) => o -> Bool -> m () Source #

Set the value of the “`show-column-separators`” property. When overloading is enabled, this is equivalent to

    set columnView [ #showColumnSeparators := value ]

## showRowSeparators

Show separators between rows.

constructColumnViewShowRowSeparators :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getColumnViewShowRowSeparators :: (MonadIO m, IsColumnView o) => o -> m Bool Source #

Get the value of the “`show-row-separators`” property. When overloading is enabled, this is equivalent to

    get columnView #showRowSeparators

setColumnViewShowRowSeparators :: (MonadIO m, IsColumnView o) => o -> Bool -> m () Source #

Set the value of the “`show-row-separators`” property. When overloading is enabled, this is equivalent to

    set columnView [ #showRowSeparators := value ]

## singleClickActivate

Activate rows on single click and select them on hover.

constructColumnViewSingleClickActivate :: (IsColumnView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getColumnViewSingleClickActivate :: (MonadIO m, IsColumnView o) => o -> m Bool Source #

Get the value of the “`single-click-activate`” property. When overloading is enabled, this is equivalent to

    get columnView #singleClickActivate

setColumnViewSingleClickActivate :: (MonadIO m, IsColumnView o) => o -> Bool -> m () Source #

Set the value of the “`single-click-activate`” property. When overloading is enabled, this is equivalent to

    set columnView [ #singleClickActivate := value ]

## sorter

Sorter with the sorting choices of the user.

getColumnViewSorter :: (MonadIO m, IsColumnView o) => o -> m (Maybe Sorter) Source #

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

    get columnView #sorter

## tabBehavior

Behavior of the <kbd>Tab</kbd> key

Since: 4.12

constructColumnViewTabBehavior :: (IsColumnView o, MonadIO m) => ListTabBehavior -> m (GValueConstruct o) Source #

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

getColumnViewTabBehavior :: (MonadIO m, IsColumnView o) => o -> m ListTabBehavior Source #

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

    get columnView #tabBehavior

setColumnViewTabBehavior :: (MonadIO m, IsColumnView o) => o -> ListTabBehavior -> m () Source #

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

    set columnView [ #tabBehavior := value ]

# Signals

## activate

type ColumnViewActivateCallback Source #

Arguments

= Word32 | `position`: position of item to activate
-> IO () |

Emitted when a row has been activated by the user, usually via activating the GtkListBase|list.activate-item action.

This allows for a convenient way to handle activation in a columnview. See `listItemSetActivatable` for details on how to use this signal.

afterColumnViewActivate :: (IsColumnView a, MonadIO m) => a -> ((?self :: a) => ColumnViewActivateCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after columnView #activate callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onColumnViewActivate :: (IsColumnView a, MonadIO m) => a -> ((?self :: a) => ColumnViewActivateCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on columnView #activate callback