[51:7] extends: object
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 [property@Gtk.ColumnView:show-row-separators] and
[property@Gtk.ColumnView:show-column-separators] 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 [property@Gtk.ColumnView:enable-rubberband].
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
[method@Gtk.ColumnView.get_sorter] 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 [method@Gtk.ColumnViewColumn.set_sorter]. The initial sort
order can be set with [method@Gtk.ColumnView.sort_by_column]. 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
[property@Gtk.ColumnView:reorderable] and
[property@Gtk.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
[property@Gtk.ColumnView:show-column-separators] 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
[property@Gtk.ColumnView:show-row-separators] 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
[enum@Gtk.AccessibleRole.tree_grid] role, header title widgets are using the
[enum@Gtk.AccessibleRole.column_header] role. The row widgets are using the
[enum@Gtk.AccessibleRole.row] role, and individual cells are using the
[enum@Gtk.AccessibleRole.grid_cell] role
ColumnView (model = null)
Creates a new
GtkColumnView. You most likely want to call [method@Gtk.ColumnView.append_column] to add columns next.
model is the list model to use.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asWidget ()
Wraps this handle as
Widget.
A Widget object.asAccessible ()
Wraps this handle as
Accessible.
A Accessible object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asConstraintTarget ()
Wraps this handle as
ConstraintTarget.
A ConstraintTarget object.asScrollable ()
Wraps this handle as
Scrollable.
A Scrollable object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnActivate (callback Fn, UserData = null)
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 [method@Gtk.ListItem.set_activatable] for details on how to use this signal.
Fn is the Aussom callback.Fn is called with (ColumnView Self, int Position).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setEnablerubberband (bool Value)
Allow rubberband selection.
Value is the new property value.None.setHeaderfactory (object Value)
Factory for creating header widgets. The factory must be for configuring [class@Gtk.ListHeader] objects.
Value is the new property value.None.setModel (object Value)
Model for the items displayed.
Value is the new property value.None.setReorderable (bool Value)
Whether columns are reorderable.
Value is the new property value.None.setRowfactory (object Value)
The factory used for configuring rows. The factory must be for configuring [class@Gtk.ColumnViewRow] objects.
Value is the new property value.None.setShowcolumnseparators (bool Value)
Show separators between columns.
Value is the new property value.None.setShowrowseparators (bool Value)
Show separators between rows.
Value is the new property value.None.setSingleclickactivate (bool Value)
Activate rows on single click and select them on hover.
Value is the new property value.None.setTabbehavior (string Value)
Behavior of the Tab key
Value is the new property value.None.append_column (object column)
Appends the @column to the end of the columns in @self.
column is a column that hasn't been added to a GtkColumnView yet.None.get_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 [signal@Gio.ListModel::items-changed] signal.
get_enable_rubberband ()
Returns whether rows can be selected by dragging with the mouse.
get_header_factory ()
Gets the factory that's currently used to populate section headers.
get_model ()
Gets the model that's currently used to read the items displayed.
get_reorderable ()
Returns whether columns are reorderable.
get_row_factory ()
Gets the factory set via [method@Gtk.ColumnView.set_row_factory].
get_show_column_separators ()
Returns whether the list should show separators between columns.
get_show_row_separators ()
Returns whether the list should show separators between rows.
get_single_click_activate ()
Returns whether rows will be activated on single click and selected on hover.
get_sorter ()
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 [method@Gtk.ColumnViewColumn.set_sorter] for setting up per-column sorting. Here is an example:
c 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);
get_tab_behavior ()
Gets the behavior set for the Tab key.
insert_column (int position, object column)
Inserts a column at the given position in the columns of @self. If
is already a column of @self, it will be repositioned.position is the position to insert @column at.column is the column to insert.None.remove_column (object column)
Removes the @column from the list of columns of @self.
column is a column that's part of @self.None.scroll_to (int pos, object column, string flags, object scroll)
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.
pos is position of the item. Must be less than the number of items in the view..column is The column to scroll to or NULL to not scroll columns.flags is actions to perform.scroll is details of how to perform the scroll operation or %NULL to scroll into view.None.set_enable_rubberband (bool enable_rubberband)
Sets whether selections can be changed by dragging with the mouse.
enable_rubberband is whether to enable rubberband selection.None.set_header_factory (object factory)
Sets the factory to use for populating the [class@Gtk.ListHeader] objects used in section headers. If this factory is set to
NULL, the list will not show section headers.
factory is the factory to use.None.set_model (object model)
Sets the model to use. This must be a [iface@Gtk.SelectionModel].
model is the model to use.None.set_reorderable (bool reorderable)
Sets whether columns should be reorderable by dragging.
reorderable is whether columns should be reorderable.None.set_row_factory (object factory)
Sets the factory used for configuring rows. The factory must be for configuring [class@Gtk.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].
factory is The row factory.None.set_show_column_separators (bool show_column_separators)
Sets whether the list should show separators between columns.
show_column_separators is whether to show column separators.None.set_show_row_separators (bool show_row_separators)
Sets whether the list should show separators between rows.
show_row_separators is whether to show row separators.None.set_single_click_activate (bool single_click_activate)
Sets whether rows should be activated on single click and selected on hover.
single_click_activate is whether to activate items on single click.None.set_tab_behavior (string tab_behavior)
Sets the Tab key behavior. This influences how the Tab and Shift+Tab keys move the focus in the columnview.
tab_behavior is The desired tab behavior.None.sort_by_column (object column, string direction)
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 [method@Gtk.ColumnView.get_sorter] is set on a sort model, and [method@Gtk.ColumnViewColumn.set_sorter] has been called on
to associate a sorter with the column. If @column is unset, the view will be unsorted.column is the column to sort by.direction is the direction to sort in.None.columns ()
Returns
get_columnsas an Aussom list of wrapper objects. This companion method materializes the full collection up front; useget_columns()when lazy or change-notify access is required.
An Aussom list of elements.[687:7] extends: object
Generated low-level callback wrapper for GIR callback activate.
ColumnViewActivateCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, position, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[757:14] static extends: object
Generated metadata helpers for ColumnView class surfaces.
properties ()
Returns property metadata for
ColumnView.
A list.signals ()
Returns signal metadata for
ColumnView.
A list.