Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GtkColumnViewColumn
represents the columns being added to GtkColumnView
.
The main ingredient for a GtkColumnViewColumn
is the GtkListItemFactory
that tells the columnview how to create cells for this column from items in
the model.
Columns have a title, and can optionally have a header menu set
with columnViewColumnSetHeaderMenu
.
A sorter can be associated with a column using
columnViewColumnSetSorter
, to let users influence sorting
by clicking on the column header.
Synopsis
- newtype ColumnViewColumn = ColumnViewColumn (ManagedPtr ColumnViewColumn)
- class (GObject o, IsDescendantOf ColumnViewColumn o) => IsColumnViewColumn o
- toColumnViewColumn :: (MonadIO m, IsColumnViewColumn o) => o -> m ColumnViewColumn
- columnViewColumnGetColumnView :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m (Maybe ColumnView)
- columnViewColumnGetExpand :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m Bool
- columnViewColumnGetFactory :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m (Maybe ListItemFactory)
- columnViewColumnGetFixedWidth :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m Int32
- columnViewColumnGetHeaderMenu :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m (Maybe MenuModel)
- columnViewColumnGetId :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m (Maybe Text)
- columnViewColumnGetResizable :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m Bool
- columnViewColumnGetSorter :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m (Maybe Sorter)
- columnViewColumnGetTitle :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m (Maybe Text)
- columnViewColumnGetVisible :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> m Bool
- columnViewColumnNew :: (HasCallStack, MonadIO m, IsListItemFactory a) => Maybe Text -> Maybe a -> m ColumnViewColumn
- columnViewColumnSetExpand :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> Bool -> m ()
- columnViewColumnSetFactory :: (HasCallStack, MonadIO m, IsColumnViewColumn a, IsListItemFactory b) => a -> Maybe b -> m ()
- columnViewColumnSetFixedWidth :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> Int32 -> m ()
- columnViewColumnSetHeaderMenu :: (HasCallStack, MonadIO m, IsColumnViewColumn a, IsMenuModel b) => a -> Maybe b -> m ()
- columnViewColumnSetId :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> Maybe Text -> m ()
- columnViewColumnSetResizable :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> Bool -> m ()
- columnViewColumnSetSorter :: (HasCallStack, MonadIO m, IsColumnViewColumn a, IsSorter b) => a -> Maybe b -> m ()
- columnViewColumnSetTitle :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> Maybe Text -> m ()
- columnViewColumnSetVisible :: (HasCallStack, MonadIO m, IsColumnViewColumn a) => a -> Bool -> m ()
- getColumnViewColumnColumnView :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe ColumnView)
- constructColumnViewColumnExpand :: (IsColumnViewColumn o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColumnViewColumnExpand :: (MonadIO m, IsColumnViewColumn o) => o -> m Bool
- setColumnViewColumnExpand :: (MonadIO m, IsColumnViewColumn o) => o -> Bool -> m ()
- clearColumnViewColumnFactory :: (MonadIO m, IsColumnViewColumn o) => o -> m ()
- constructColumnViewColumnFactory :: (IsColumnViewColumn o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o)
- getColumnViewColumnFactory :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe ListItemFactory)
- setColumnViewColumnFactory :: (MonadIO m, IsColumnViewColumn o, IsListItemFactory a) => o -> a -> m ()
- constructColumnViewColumnFixedWidth :: (IsColumnViewColumn o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getColumnViewColumnFixedWidth :: (MonadIO m, IsColumnViewColumn o) => o -> m Int32
- setColumnViewColumnFixedWidth :: (MonadIO m, IsColumnViewColumn o) => o -> Int32 -> m ()
- clearColumnViewColumnHeaderMenu :: (MonadIO m, IsColumnViewColumn o) => o -> m ()
- constructColumnViewColumnHeaderMenu :: (IsColumnViewColumn o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o)
- getColumnViewColumnHeaderMenu :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe MenuModel)
- setColumnViewColumnHeaderMenu :: (MonadIO m, IsColumnViewColumn o, IsMenuModel a) => o -> a -> m ()
- clearColumnViewColumnId :: (MonadIO m, IsColumnViewColumn o) => o -> m ()
- constructColumnViewColumnId :: (IsColumnViewColumn o, MonadIO m) => Text -> m (GValueConstruct o)
- getColumnViewColumnId :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe Text)
- setColumnViewColumnId :: (MonadIO m, IsColumnViewColumn o) => o -> Text -> m ()
- constructColumnViewColumnResizable :: (IsColumnViewColumn o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColumnViewColumnResizable :: (MonadIO m, IsColumnViewColumn o) => o -> m Bool
- setColumnViewColumnResizable :: (MonadIO m, IsColumnViewColumn o) => o -> Bool -> m ()
- clearColumnViewColumnSorter :: (MonadIO m, IsColumnViewColumn o) => o -> m ()
- constructColumnViewColumnSorter :: (IsColumnViewColumn o, MonadIO m, IsSorter a) => a -> m (GValueConstruct o)
- getColumnViewColumnSorter :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe Sorter)
- setColumnViewColumnSorter :: (MonadIO m, IsColumnViewColumn o, IsSorter a) => o -> a -> m ()
- clearColumnViewColumnTitle :: (MonadIO m, IsColumnViewColumn o) => o -> m ()
- constructColumnViewColumnTitle :: (IsColumnViewColumn o, MonadIO m) => Text -> m (GValueConstruct o)
- getColumnViewColumnTitle :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe Text)
- setColumnViewColumnTitle :: (MonadIO m, IsColumnViewColumn o) => o -> Text -> m ()
- constructColumnViewColumnVisible :: (IsColumnViewColumn o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColumnViewColumnVisible :: (MonadIO m, IsColumnViewColumn o) => o -> m Bool
- setColumnViewColumnVisible :: (MonadIO m, IsColumnViewColumn o) => o -> Bool -> m ()
Exported types
newtype ColumnViewColumn Source #
Memory-managed wrapper type.
ColumnViewColumn (ManagedPtr ColumnViewColumn) |
Instances
class (GObject o, IsDescendantOf ColumnViewColumn o) => IsColumnViewColumn o Source #
Type class for types which can be safely cast to ColumnViewColumn
, for instance with toColumnViewColumn
.
Instances
(GObject o, IsDescendantOf ColumnViewColumn o) => IsColumnViewColumn o Source # | |
Defined in GI.Gtk.Objects.ColumnViewColumn |
toColumnViewColumn :: (MonadIO m, IsColumnViewColumn o) => o -> m ColumnViewColumn Source #
Cast to ColumnViewColumn
, 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
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getColumnView, getData, getExpand, getFactory, getFixedWidth, getHeaderMenu, getId, getProperty, getQdata, getResizable, getSorter, getTitle, getVisible.
Setters
setData, setDataFull, setExpand, setFactory, setFixedWidth, setHeaderMenu, setId, setProperty, setResizable, setSorter, setTitle, setVisible.
getColumnView
columnViewColumnGetColumnView Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m (Maybe ColumnView) | Returns: The column view displaying |
Gets the column view that's currently displaying this column.
If self
has not been added to a column view yet, Nothing
is returned.
getExpand
columnViewColumnGetExpand Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether this column should expand.
getFactory
columnViewColumnGetFactory Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m (Maybe ListItemFactory) | Returns: The factory in use |
Gets the factory that's currently used to populate list items for this column.
getFixedWidth
columnViewColumnGetFixedWidth Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m Int32 | Returns: the fixed with of the column |
Gets the fixed width of the column.
getHeaderMenu
columnViewColumnGetHeaderMenu Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m (Maybe MenuModel) | Returns: the |
Gets the menu model that is used to create the context menu for the column header.
getId
columnViewColumnGetId Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m (Maybe Text) | Returns: The column's ID |
Returns the ID set with columnViewColumnSetId
.
Since: 4.10
getResizable
columnViewColumnGetResizable Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether this column is resizable.
getSorter
columnViewColumnGetSorter Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m (Maybe Sorter) | Returns: the |
Returns the sorter that is associated with the column.
getTitle
columnViewColumnGetTitle Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m (Maybe Text) | Returns: The column's title |
Returns the title set with columnViewColumnSetTitle
.
getVisible
columnViewColumnGetVisible Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether this column is visible.
new
:: (HasCallStack, MonadIO m, IsListItemFactory a) | |
=> Maybe Text |
|
-> Maybe a |
|
-> m ColumnViewColumn | Returns: a new |
Creates a new GtkColumnViewColumn
that uses the given factory
for
mapping items to widgets.
You most likely want to call columnViewAppendColumn
next.
The function takes ownership of the argument, so you can write code like:
c code
column = gtk_column_view_column_new (_("Name"), gtk_builder_list_item_factory_new_from_resource ("/name.ui"));
setExpand
columnViewColumnSetExpand Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the column to take available extra space.
The extra space is shared equally amongst all columns that
have the expand set to True
.
setFactory
columnViewColumnSetFactory Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a, IsListItemFactory b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the GtkListItemFactory
to use for populating list items for this
column.
setFixedWidth
columnViewColumnSetFixedWidth Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> Int32 |
|
-> m () |
If fixedWidth
is not -1, sets the fixed width of column
;
otherwise unsets it.
Setting a fixed width overrides the automatically calculated width. Interactive resizing also sets the “fixed-width” property.
setHeaderMenu
columnViewColumnSetHeaderMenu Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a, IsMenuModel b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the menu model that is used to create the context menu for the column header.
setId
columnViewColumnSetId Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the id of this column.
GTK makes no use of this, but applications can use it when storing column view configuration.
It is up to callers to ensure uniqueness of IDs.
Since: 4.10
setResizable
columnViewColumnSetResizable Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether this column should be resizable by dragging.
setSorter
columnViewColumnSetSorter Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a, IsSorter b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Associates a sorter with the column.
If sorter
is Nothing
, the column will not let users change
the sorting by clicking on its header.
This sorter can be made active by clicking on the column
header, or by calling columnViewSortByColumn
.
See columnViewGetSorter
for the necessary steps
for setting up customizable sorting for ColumnView
.
setTitle
columnViewColumnSetTitle Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the title of this column.
The title is displayed in the header of a GtkColumnView
for this column and is therefore user-facing text that should
be translated.
setVisible
columnViewColumnSetVisible Source #
:: (HasCallStack, MonadIO m, IsColumnViewColumn a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether this column should be visible in views.
Properties
columnView
The GtkColumnView
this column is a part of.
getColumnViewColumnColumnView :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe ColumnView) Source #
Get the value of the “column-view
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #columnView
expand
Column gets share of extra width allocated to the view.
constructColumnViewColumnExpand :: (IsColumnViewColumn o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “expand
” property. This is rarely needed directly, but it is used by new
.
getColumnViewColumnExpand :: (MonadIO m, IsColumnViewColumn o) => o -> m Bool Source #
Get the value of the “expand
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #expand
setColumnViewColumnExpand :: (MonadIO m, IsColumnViewColumn o) => o -> Bool -> m () Source #
Set the value of the “expand
” property.
When overloading is enabled, this is equivalent to
set
columnViewColumn [ #expand:=
value ]
factory
Factory for populating list items.
clearColumnViewColumnFactory :: (MonadIO m, IsColumnViewColumn o) => o -> m () Source #
Set the value of the “factory
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#factory
constructColumnViewColumnFactory :: (IsColumnViewColumn o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “factory
” property. This is rarely needed directly, but it is used by new
.
getColumnViewColumnFactory :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe ListItemFactory) Source #
Get the value of the “factory
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #factory
setColumnViewColumnFactory :: (MonadIO m, IsColumnViewColumn o, IsListItemFactory a) => o -> a -> m () Source #
Set the value of the “factory
” property.
When overloading is enabled, this is equivalent to
set
columnViewColumn [ #factory:=
value ]
fixedWidth
If not -1, this is the width that the column is allocated, regardless of the size of its content.
constructColumnViewColumnFixedWidth :: (IsColumnViewColumn o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “fixed-width
” property. This is rarely needed directly, but it is used by new
.
getColumnViewColumnFixedWidth :: (MonadIO m, IsColumnViewColumn o) => o -> m Int32 Source #
Get the value of the “fixed-width
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #fixedWidth
setColumnViewColumnFixedWidth :: (MonadIO m, IsColumnViewColumn o) => o -> Int32 -> m () Source #
Set the value of the “fixed-width
” property.
When overloading is enabled, this is equivalent to
set
columnViewColumn [ #fixedWidth:=
value ]
headerMenu
Menu model used to create the context menu for the column header.
clearColumnViewColumnHeaderMenu :: (MonadIO m, IsColumnViewColumn o) => o -> m () Source #
Set the value of the “header-menu
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#headerMenu
constructColumnViewColumnHeaderMenu :: (IsColumnViewColumn o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “header-menu
” property. This is rarely needed directly, but it is used by new
.
getColumnViewColumnHeaderMenu :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe MenuModel) Source #
Get the value of the “header-menu
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #headerMenu
setColumnViewColumnHeaderMenu :: (MonadIO m, IsColumnViewColumn o, IsMenuModel a) => o -> a -> m () Source #
Set the value of the “header-menu
” property.
When overloading is enabled, this is equivalent to
set
columnViewColumn [ #headerMenu:=
value ]
id
An ID for the column.
GTK is not currently using the ID for anything, but it can be used by applications when saving column view configurations.
It is up to applications to ensure uniqueness of IDs.
Since: 4.10
clearColumnViewColumnId :: (MonadIO m, IsColumnViewColumn o) => o -> m () Source #
Set the value of the “id
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#id
constructColumnViewColumnId :: (IsColumnViewColumn o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “id
” property. This is rarely needed directly, but it is used by new
.
getColumnViewColumnId :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe Text) Source #
Get the value of the “id
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #id
setColumnViewColumnId :: (MonadIO m, IsColumnViewColumn o) => o -> Text -> m () Source #
Set the value of the “id
” property.
When overloading is enabled, this is equivalent to
set
columnViewColumn [ #id:=
value ]
resizable
Whether this column is resizable.
constructColumnViewColumnResizable :: (IsColumnViewColumn o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “resizable
” property. This is rarely needed directly, but it is used by new
.
getColumnViewColumnResizable :: (MonadIO m, IsColumnViewColumn o) => o -> m Bool Source #
Get the value of the “resizable
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #resizable
setColumnViewColumnResizable :: (MonadIO m, IsColumnViewColumn o) => o -> Bool -> m () Source #
Set the value of the “resizable
” property.
When overloading is enabled, this is equivalent to
set
columnViewColumn [ #resizable:=
value ]
sorter
Sorter for sorting items according to this column.
clearColumnViewColumnSorter :: (MonadIO m, IsColumnViewColumn o) => o -> m () Source #
Set the value of the “sorter
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#sorter
constructColumnViewColumnSorter :: (IsColumnViewColumn o, MonadIO m, IsSorter a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “sorter
” property. This is rarely needed directly, but it is used by new
.
getColumnViewColumnSorter :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe Sorter) Source #
Get the value of the “sorter
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #sorter
setColumnViewColumnSorter :: (MonadIO m, IsColumnViewColumn o, IsSorter a) => o -> a -> m () Source #
Set the value of the “sorter
” property.
When overloading is enabled, this is equivalent to
set
columnViewColumn [ #sorter:=
value ]
title
Title displayed in the header.
clearColumnViewColumnTitle :: (MonadIO m, IsColumnViewColumn o) => o -> m () Source #
Set the value of the “title
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#title
constructColumnViewColumnTitle :: (IsColumnViewColumn o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “title
” property. This is rarely needed directly, but it is used by new
.
getColumnViewColumnTitle :: (MonadIO m, IsColumnViewColumn o) => o -> m (Maybe Text) Source #
Get the value of the “title
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #title
setColumnViewColumnTitle :: (MonadIO m, IsColumnViewColumn o) => o -> Text -> m () Source #
Set the value of the “title
” property.
When overloading is enabled, this is equivalent to
set
columnViewColumn [ #title:=
value ]
visible
Whether this column is visible.
constructColumnViewColumnVisible :: (IsColumnViewColumn o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “visible
” property. This is rarely needed directly, but it is used by new
.
getColumnViewColumnVisible :: (MonadIO m, IsColumnViewColumn o) => o -> m Bool Source #
Get the value of the “visible
” property.
When overloading is enabled, this is equivalent to
get
columnViewColumn #visible
setColumnViewColumnVisible :: (MonadIO m, IsColumnViewColumn o) => o -> Bool -> m () Source #
Set the value of the “visible
” property.
When overloading is enabled, this is equivalent to
set
columnViewColumn [ #visible:=
value ]