package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/List_box_row/index.html
Module Wrappers.List_box_row
type t =
[ `list_box_row | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new ListBoxRow
val set_selectable : t -> bool -> unitSet whether the row can be selected.
val set_header :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the current header of the @row.
This is only allowed to be called from a callback@Gtk.ListBoxUpdateHeaderFunc. It will replace any existing header in the row, and be shown in front of the row in the listbox.
val set_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the child widget of @self.
val set_activatable : t -> bool -> unitSet whether the row is activatable.
val is_selected : t -> boolReturns whether the child is currently selected in its `GtkListBox` container.
val get_selectable : t -> boolGets whether the row can be selected.
val get_index : t -> intGets the current index of the @row in its `GtkListBox` container.
val get_header :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionReturns the current header of the @row.
This can be used in a callback@Gtk.ListBoxUpdateHeaderFunc to see if there is a header set already, and if so to update the state of it.
val get_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionGets the child widget of @row.
val get_activatable : t -> boolGets whether the row is activatable.
val changed : t -> unitMarks @row as changed, causing any state that depends on this to be updated.
This affects sorting, filtering and headers.
Note that calls to this method must be in sync with the data used for the row functions. For instance, if the list is mirroring some external data set, and *two* rows changed in the external data set then when you call gtk_list_box_row_changed() on the first row the sort function must only read the new data for the first of the two changed rows, otherwise the resorting of the rows will be wrong.
This generally means that if you don’t fully control the data model you have to duplicate the data that affects the listbox row functions into the row widgets themselves. Another alternative is to call method@Gtk.ListBox.invalidate_sort on any model change, but that is more expensive.
val on_activate :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id