1.33 <GtkColumnViewColumn>

Class: <GtkColumnViewColumn>

It derives from <GObject>.

Represents the columns in a <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 column-view-column:set-header-menu.

A sorter can be associated with a column using column-view-column:set-sorter, to let users influence sorting by clicking on the column header.

Properties

Property: column-view-column:column-view self

The <GtkColumnView> this column is a part of.

Its value is a <GtkColumnView>, or #f.

It is read only.

Property: column-view-column:expand self

Column gets share of extra width allocated to the view.

Its value is a boolean.

Set it with (set! (column-view-column:expand self) value).

Property: column-view-column:factory self

Factory for populating list items.

The factory must be for configuring <GtkColumnViewCell> objects.

Its value is a <GtkListItemFactory>, or #f.

Set it with (set! (column-view-column:factory self) value).

Property: column-view-column:fixed-width self

If not -1, this is the width that the column is allocated, regardless of the size of its content.

Its value is a 32-bit integer.

Set it with (set! (column-view-column:fixed-width self) value).

Property: column-view-column:header-menu self

Menu model used to create the context menu for the column header.

Its value is a <GMenuModel>, or #f.

Set it with (set! (column-view-column:header-menu self) value).

Property: column-view-column:id self

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.

Its value is a string, or #f.

Set it with (set! (column-view-column:id self) value).

Property: column-view-column:resizable self

Whether this column is resizable.

Its value is a boolean.

Set it with (set! (column-view-column:resizable self) value).

Property: column-view-column:sorter self

Sorter for sorting items according to this column.

Its value is a <GtkSorter>, or #f.

Set it with (set! (column-view-column:sorter self) value).

Property: column-view-column:title self

Title displayed in the header.

Its value is a string, or #f.

Set it with (set! (column-view-column:title self) value).

Property: column-view-column:visible self

Whether this column is visible.

Its value is a boolean.

Set it with (set! (column-view-column:visible self) value).

Procedures

Method: column-view-column:get-column-view self ⇒ %return
Method: get-column-view self ⇒ %return

Gets the column view that’s currently displaying this column.

If self has not been added to a column view yet, NULL is returned.

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a <GtkColumnView>, or #f.

The column view displaying self.

Method: column-view-column:get-expand? self ⇒ %return
Method: get-expand? self ⇒ %return

Returns whether this column should expand.

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a boolean.

true if this column expands

Method: column-view-column:get-factory self ⇒ %return
Method: get-factory self ⇒ %return

Gets the factory that’s currently used to populate list items for this column.

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a <GtkListItemFactory>, or #f.

The factory in use

Method: column-view-column:get-fixed-width self ⇒ %return
Method: get-fixed-width self ⇒ %return

Gets the fixed width of the column.

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a 32-bit integer.

the fixed with of the column

Method: column-view-column:get-header-menu self ⇒ %return
Method: get-header-menu self ⇒ %return

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

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a <GMenuModel>, or #f.

the <GMenuModel>

Method: column-view-column:get-id self ⇒ %return
Method: get-id self ⇒ %return

Returns the ID set with column-view-column:set-id.

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a string, or #f.

The column’s ID

Method: column-view-column:get-resizable? self ⇒ %return
Method: get-resizable? self ⇒ %return

Returns whether this column is resizable.

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a boolean.

true if this column is resizable

Method: column-view-column:get-sorter self ⇒ %return
Method: get-sorter self ⇒ %return

Returns the sorter that is associated with the column.

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a <GtkSorter>, or #f.

the <GtkSorter> of self

Method: column-view-column:get-title self ⇒ %return
Method: get-title self ⇒ %return

Returns the title set with column-view-column:set-title.

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a string, or #f.

The column’s title

Method: column-view-column:get-visible? self ⇒ %return
Method: get-visible? self ⇒ %return

Returns whether this column is visible.

self

Passed: a <GtkColumnViewColumn>.

a column

%return

Returned: a boolean.

true if this column is visible

Procedure: column-view-column:new [title] [factory] ⇒ %return

Creates a new <GtkColumnViewColumn> that uses the given factory for mapping items to widgets.

You most likely want to call column-view:append-column next.

The function takes ownership of the argument, so you can write code like:

column = gtk_column_view_column_new (_("Name"),
  gtk_builder_list_item_factory_new_from_resource ("/name.ui"));
title

Passed, or left out: a string, or #f.

Title to use for this column

factory

Passed, or left out: a <GtkListItemFactory>, or #f.

The factory to populate items with

%return

Returned: a <GtkColumnViewColumn>.

a new <GtkColumnViewColumn> using the given factory

Method: column-view-column:set-expand self expand
Method: set-expand self expand

Sets the column to take available extra space.

The extra space is shared equally amongst all columns that have are set to expand.

self

Passed: a <GtkColumnViewColumn>.

a column

expand

Passed: a boolean.

whether this column should expand to fill available space

Method: column-view-column:set-factory self [factory]
Method: set-factory self [factory]

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

self

Passed: a <GtkColumnViewColumn>.

a column

factory

Passed, or left out: a <GtkListItemFactory>, or #f.

the factory to use

Method: column-view-column:set-fixed-width self fixed-width
Method: set-fixed-width self fixed-width

Sets the fixed width of the column.

If fixed-width is -1, the fixed width of the column is unset.

Setting a fixed width overrides the automatically calculated width. Interactive resizing also sets the “fixed-width” property.

self

Passed: a <GtkColumnViewColumn>.

a column

fixed-width

Passed: a 32-bit integer.

the new fixed width, or -1

Method: column-view-column:set-header-menu self [menu]
Method: set-header-menu self [menu]

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

self

Passed: a <GtkColumnViewColumn>.

a column

menu

Passed, or left out: a <GMenuModel>, or #f.

a <GMenuModel>

Method: column-view-column:set-id self [id]
Method: set-id self [id]

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.

self

Passed: a <GtkColumnViewColumn>.

a column

id

Passed, or left out: a string, or #f.

ID to use for this column

Method: column-view-column:set-resizable self resizable
Method: set-resizable self resizable

Sets whether this column should be resizable by dragging.

self

Passed: a <GtkColumnViewColumn>.

a column

resizable

Passed: a boolean.

whether this column should be resizable

Method: column-view-column:set-sorter self [sorter]
Method: set-sorter self [sorter]

Associates a sorter with the column.

If sorter is unset, 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 column-view:sort-by-column.

See column-view:get-sorter for the necessary steps for setting up customizable sorting for <GtkColumnView>.

self

Passed: a <GtkColumnViewColumn>.

a column

sorter

Passed, or left out: a <GtkSorter>, or #f.

the <GtkSorter> to associate with column

Method: column-view-column:set-title self [title]
Method: set-title self [title]

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.

self

Passed: a <GtkColumnViewColumn>.

a column

title

Passed, or left out: a string, or #f.

Title to use for this column

Method: column-view-column:set-visible self visible
Method: set-visible self visible

Sets whether this column should be visible in views.

self

Passed: a <GtkColumnViewColumn>.

a column

visible

Passed: a boolean.

whether this column should be visible