gi-gtk-4.0.8: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.ColumnViewColumn

Description

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

Exported types

newtype ColumnViewColumn Source #

Memory-managed wrapper type.

Constructors

ColumnViewColumn (ManagedPtr ColumnViewColumn) 

Instances

Instances details
Eq ColumnViewColumn Source # 
Instance details

Defined in GI.Gtk.Objects.ColumnViewColumn

GObject ColumnViewColumn Source # 
Instance details

Defined in GI.Gtk.Objects.ColumnViewColumn

ManagedPtrNewtype ColumnViewColumn Source # 
Instance details

Defined in GI.Gtk.Objects.ColumnViewColumn

TypedObject ColumnViewColumn Source # 
Instance details

Defined in GI.Gtk.Objects.ColumnViewColumn

Methods

glibType :: IO GType

HasParentTypes ColumnViewColumn Source # 
Instance details

Defined in GI.Gtk.Objects.ColumnViewColumn

IsGValue (Maybe ColumnViewColumn) Source #

Convert ColumnViewColumn to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.ColumnViewColumn

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe ColumnViewColumn -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe ColumnViewColumn)

type ParentTypes ColumnViewColumn Source # 
Instance details

Defined in GI.Gtk.Objects.ColumnViewColumn

type ParentTypes ColumnViewColumn = '[Object]

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

Instances details
(GObject o, IsDescendantOf ColumnViewColumn o) => IsColumnViewColumn o Source # 
Instance details

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

getColumnView

columnViewColumnGetColumnView Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> m (Maybe ColumnView)

Returns: The column view displaying self.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> m Bool

Returns: True if this column expands

Returns whether this column should expand.

getFactory

columnViewColumnGetFactory Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> m Int32

Returns: the fixed with of the column

Gets the fixed width of the column.

getHeaderMenu

columnViewColumnGetHeaderMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> m (Maybe MenuModel)

Returns: the GMenuModel

Gets the menu model that is used to create the context menu for the column header.

getId

columnViewColumnGetId Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> m (Maybe Text)

Returns: The column's ID

Returns the ID set with columnViewColumnSetId.

Since: 4.10

getResizable

columnViewColumnGetResizable Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> m Bool

Returns: True if this column is resizable

Returns whether this column is resizable.

getSorter

columnViewColumnGetSorter Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> m (Maybe Sorter)

Returns: the GtkSorter of self

Returns the sorter that is associated with the column.

getTitle

columnViewColumnGetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> m (Maybe Text)

Returns: The column's title

Returns the title set with columnViewColumnSetTitle.

getVisible

columnViewColumnGetVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> m Bool

Returns: True if this column is visible

Returns whether this column is visible.

new

columnViewColumnNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsListItemFactory a) 
=> Maybe Text

title: Title to use for this column

-> Maybe a

factory: The factory to populate items with

-> m ColumnViewColumn

Returns: a new GtkColumnViewColumn using the given factory

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 #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> Bool

expand: True if this column should expand to fill available sace

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a, IsListItemFactory b) 
=> a

self: a GtkColumnViewColumn

-> Maybe b

factory: the factory to use

-> m () 

Sets the GtkListItemFactory to use for populating list items for this column.

setFixedWidth

columnViewColumnSetFixedWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> Int32

fixedWidth: the new fixed width, or -1

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a, IsMenuModel b) 
=> a

self: a GtkColumnViewColumn

-> Maybe b

menu: a GMenuModel

-> m () 

Sets the menu model that is used to create the context menu for the column header.

setId

columnViewColumnSetId Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> Maybe Text

id: ID to use for this column

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> Bool

resizable: whether this column should be resizable

-> m () 

Sets whether this column should be resizable by dragging.

setSorter

columnViewColumnSetSorter Source #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a, IsSorter b) 
=> a

self: a GtkColumnViewColumn

-> Maybe b

sorter: the GtkSorter to associate with column

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> Maybe Text

title: Title to use for this column

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsColumnViewColumn a) 
=> a

self: a GtkColumnViewColumn

-> Bool

visible: whether this column should be visible

-> 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 ]