package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Column_view/index.html

Module Wrappers.Column_view

type t = [ `column_view | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : [ `selection_model ] Gobject.obj option -> t

Create a new ColumnView

val sort_by_column : t -> [ `column_view_column | `object_ ] Gobject.obj option -> Gtk_enums.sorttype -> unit

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 @column to associate a sorter with the column.

If @column is %NULL, the view will be unsorted.

val set_tab_behavior : t -> Gtk_enums.listtabbehavior -> unit

Sets the behavior of the <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keys.

val set_single_click_activate : t -> bool -> unit

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

val set_show_row_separators : t -> bool -> unit

Sets whether the list should show separators between rows.

val set_show_column_separators : t -> bool -> unit

Sets whether the list should show separators between columns.

val set_row_factory : t -> [ `list_item_factory | `object_ ] Gobject.obj option -> unit

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.

val set_reorderable : t -> bool -> unit

Sets whether columns should be reorderable by dragging.

val set_model : t -> [ `selection_model ] Gobject.obj option -> unit

Sets the model to use.

This must be a iface@Gtk.SelectionModel.

val set_header_factory : t -> [ `list_item_factory | `object_ ] Gobject.obj option -> unit

Sets the `GtkListItemFactory` 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.

val set_enable_rubberband : t -> bool -> unit

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

val scroll_to : t -> int -> [ `column_view_column | `object_ ] Gobject.obj option -> Gtk_enums.listscrollflags -> [ `scroll_info ] Gobject.obj option -> unit

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 listview is shown or focused. If it isn't, then the changes will take effect once that happens.

val remove_column : t -> [ `column_view_column | `object_ ] Gobject.obj -> unit

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

val insert_column : t -> int -> [ `column_view_column | `object_ ] Gobject.obj -> unit

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

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

val get_tab_behavior : t -> Gtk_enums.listtabbehavior

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

val get_sorter : t -> [ `sorter | `object_ ] Gobject.obj option

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); ```

val get_single_click_activate : t -> bool

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

val get_show_row_separators : t -> bool

Returns whether the list should show separators between rows.

val get_show_column_separators : t -> bool

Returns whether the list should show separators between columns.

val get_row_factory : t -> [ `list_item_factory | `object_ ] Gobject.obj option

Gets the factory set via method@Gtk.ColumnView.set_row_factory.

val get_reorderable : t -> bool

Returns whether columns are reorderable.

val get_model : t -> [ `selection_model ] Gobject.obj option

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

val get_header_factory : t -> [ `list_item_factory | `object_ ] Gobject.obj option

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

val get_enable_rubberband : t -> bool

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

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 ::items-changed signal.

val append_column : t -> [ `column_view_column | `object_ ] Gobject.obj -> unit

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

val on_activate : ?after:bool -> t -> callback:(position:int -> unit) -> Gobject.Signal.handler_id