package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Grid_view

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

Create a new GridView

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 items should be activated on single click and selected on hover.

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

Sets the model to use.

This must be a iface@Gtk.SelectionModel.

val set_min_columns : t -> int -> unit

Sets the minimum number of columns to use.

This number must be at least 1.

If @min_columns is smaller than the minimum set via method@Gtk.GridView.set_max_columns, that value is ignored.

val set_max_columns : t -> int -> unit

Sets the maximum number of columns to use.

This number must be at least 1.

If @max_columns is smaller than the minimum set via method@Gtk.GridView.set_min_columns, that value is used instead.

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

Sets the `GtkListItemFactory` to use for populating list items.

val set_enable_rubberband : t -> bool -> unit

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

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

Scrolls to the item at the given position and performs the actions specified in @flags.

This function works no matter if the gridview is shown or focused. If it isn't, then the changes will take effect once that happens.

val get_tab_behavior : t -> Gtk_enums.listtabbehavior

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

val get_single_click_activate : t -> bool

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

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

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

val get_min_columns : t -> int

Gets the minimum number of columns that the grid will use.

val get_max_columns : t -> int

Gets the maximum number of columns that the grid will use.

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

Gets the factory that's currently used to populate list items.

val get_enable_rubberband : t -> bool

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

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