package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/String_list/index.html
Module Wrappers.String_list
type t = [ `string_list | `object_ ] Gobject.objval new_ : string array option -> tCreate a new StringList
val take : t -> string -> unitAdds @string to self at the end, and takes ownership of it.
This variant of method@Gtk.StringList.append is convenient for formatting strings:
```c gtk_string_list_take (self, g_strdup_print ("%d dollars", lots)); ```
val splice : t -> int -> int -> string array option -> unitChanges @self by removing @n_removals strings and adding @additions to it.
This function is more efficient than method@Gtk.StringList.append and method@Gtk.StringList.remove, because it only emits the ::items-changed signal once for the change.
This function copies the strings in @additions.
The parameters @position and @n_removals must be correct (ie: @position + @n_removals must be less than or equal to the length of the list at the time this function is called).
val remove : t -> int -> unitRemoves the string at @position from @self.
@position must be smaller than the current length of the list.
val get_string : t -> int -> string optionGets the string that is at @position in @self.
If @self does not contain @position items, %NULL is returned.
This function returns the const char *. To get the object wrapping it, use g_list_model_get_item().
val append : t -> string -> unitAppends @string to @self.
The @string will be copied. See method@Gtk.StringList.take for a way to avoid that.
val get_item_type : t -> Gobject.Type.tGet property: item-type
val get_n_items : t -> intGet property: n-items