package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/List_box/index.html
Module Wrappers.List_box
type t = [ `list_box | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new ListBox
val unselect_row :
t ->
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitUnselects a single row of @box, if the selection mode allows it.
val unselect_all : t -> unitUnselect all children of @box, if the selection mode allows it.
val set_show_separators : t -> bool -> unitSets whether the list box should show separators between rows.
val set_selection_mode : t -> Gtk_enums.selectionmode -> unitSets how selection works in the listbox.
val set_placeholder :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the placeholder widget that is shown in the list when it doesn't display any visible children.
val set_adjustment :
t ->
[ `adjustment | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the adjustment (if any) that the widget uses to for vertical scrolling.
For instance, this is used to get the page size for PageUp/Down key handling.
In the normal case when the @box is packed inside a `GtkScrolledWindow` the adjustment from that will be picked up automatically, so there is no need to manually do that.
val set_activate_on_single_click : t -> bool -> unitIf @single is %TRUE, rows will be activated when you click on them, otherwise you need to double-click.
val select_row :
t ->
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.obj
option ->
unitMake @row the currently selected row.
val select_all : t -> unitSelect all children of @box, if the selection mode allows it.
val remove_all : t -> unitRemoves all rows from @box.
This function does nothing if @box is backed by a model.
val remove :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitRemoves a child from @box.
val prepend :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitPrepend a widget to the list.
If a sort function is set, the widget will actually be inserted at the calculated position.
val invalidate_sort : t -> unitUpdate the sorting for all rows.
Call this when result of the sort function on the @box is changed due to an external factor.
val invalidate_headers : t -> unitUpdate the separators for all rows.
Call this when result of the header function on the @box is changed due to an external factor.
val invalidate_filter : t -> unitUpdate the filtering for all rows.
Call this when result of the filter function on the @box is changed due to an external factor. For instance, this would be used if the filter function just looked for a specific search string and the entry with the search string has changed.
val insert :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
int ->
unitInsert the @child into the @box at @position.
If a sort function is set, the widget will actually be inserted at the calculated position.
If @position is -1, or larger than the total number of items in the @box, then the @child will be appended to the end.
val get_show_separators : t -> boolReturns whether the list box should show separators between rows.
val get_selection_mode : t -> Gtk_enums.selectionmodeGets the selection mode of the listbox.
val get_selected_rows :
t ->
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.obj listCreates a list of all selected children.
val get_selected_row :
t ->
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.obj
optionGets the selected row, or %NULL if no rows are selected.
Note that the box may allow multiple selection, in which case you should use method@Gtk.ListBox.selected_foreach to find all selected rows.
val get_row_at_y :
t ->
int ->
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.obj
optionGets the row at the @y position.
val get_row_at_index :
t ->
int ->
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.obj
optionGets the n-th child in the list (not counting headers).
If @index_ is negative or larger than the number of items in the list, %NULL is returned.
val get_adjustment :
t ->
[ `adjustment | `initially_unowned | `object_ ] Gobject.obj optionGets the adjustment (if any) that the widget uses to for vertical scrolling.
val get_activate_on_single_click : t -> boolReturns whether rows activate on single clicks.
val drag_unhighlight_row : t -> unitIf a row has previously been highlighted via gtk_list_box_drag_highlight_row(), it will have the highlight removed.
val drag_highlight_row :
t ->
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitAdd a drag highlight to a row.
This is a helper function for implementing DnD onto a `GtkListBox`. The passed in @row will be highlighted by setting the %GTK_STATE_FLAG_DROP_ACTIVE state and any previously highlighted row will be unhighlighted.
The row will also be unhighlighted when the widget gets a drag leave event.
val append :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitAppend a widget to the list.
If a sort function is set, the widget will actually be inserted at the calculated position.
val get_accept_unpaired_release : t -> boolGet property: accept-unpaired-release
val set_accept_unpaired_release : t -> bool -> unitSet property: accept-unpaired-release
val on_activate_cursor_row :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_move_cursor :
?after:bool ->
t ->
callback:
(object_:Gtk_enums.movementstep -> p0:int -> p1:bool -> p2:bool -> unit) ->
Gobject.Signal.handler_idval on_row_activated :
?after:bool ->
t ->
callback:
(row:
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.obj ->
unit) ->
Gobject.Signal.handler_idval on_row_selected :
?after:bool ->
t ->
callback:
(row:
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.obj
option ->
unit) ->
Gobject.Signal.handler_idval on_select_all :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_selected_rows_changed :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_toggle_cursor_row :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_unselect_all :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id