package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Combo_box/index.html
Module Wrappers.Combo_box
type t = [ `combo_box | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new ComboBox
val new_with_entry : unit -> tCreate a new ComboBox
val new_with_model : [ `tree_model ] Gobject.obj -> tCreate a new ComboBox
val new_with_model_and_entry : [ `tree_model ] Gobject.obj -> tCreate a new ComboBox
val set_popup_fixed_width : t -> bool -> unitSpecifies whether the popup’s width should be a fixed width.
If @fixed is %TRUE, the popup's width is set to match the allocated width of the combo box.
val set_model : t -> [ `tree_model ] Gobject.obj option -> unitSets the model used by @combo_box to be @model.
Will unset a previously set model (if applicable). If model is %NULL, then it will unset the model.
Note that this function does not clear the cell renderers, you have to call method@Gtk.CellLayout.clear yourself if you need to set up different cell renderers for the new model.
val set_id_column : t -> int -> unitSets the model column which @combo_box should use to get string IDs for values from.
The column @id_column in the model of @combo_box must be of type %G_TYPE_STRING.
val set_entry_text_column : t -> int -> unitSets the model column which @combo_box should use to get strings from to be @text_column.
For this column no separate class@Gtk.CellRenderer is needed.
The column @text_column in the model of @combo_box must be of type %G_TYPE_STRING.
This is only relevant if @combo_box has been created with property@Gtk.ComboBox:has-entry as %TRUE.
val set_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the child widget of @combo_box.
val set_button_sensitivity : t -> Gtk_enums.sensitivitytype -> unitSets whether the dropdown button of the combo box should update its sensitivity depending on the model contents.
val set_active_iter : t -> [ `tree_iter ] Gobject.obj option -> unitSets the current active item to be the one referenced by @iter.
If @iter is %NULL, the active item is unset.
val set_active_id : t -> string option -> boolChanges the active row of @combo_box to the one that has an ID equal to @active_id.
If @active_id is %NULL, the active row is unset. Rows having a %NULL ID string cannot be made active by this function.
If the property@Gtk.ComboBox:id-column property of @combo_box is unset or if no row has the given ID then the function does nothing and returns %FALSE.
val set_active : t -> int -> unitSets the active item of @combo_box to be the item at @index.
val popup_for_device : t -> Ocgtk_gdk.Gdk.Wrappers.Device.t -> unitPops up the menu of @combo_box.
Note that currently this does not do anything with the device, as it was previously only used for list-mode combo boxes, and those were removed in GTK 4. However, it is retained in case similar functionality is added back later.
val popup : t -> unitPops up the menu or dropdown list of @combo_box.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
Before calling this, @combo_box must be mapped, or nothing will happen.
val popdown : t -> unitHides the menu or dropdown list of @combo_box.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
val get_popup_fixed_width : t -> boolGets whether the popup uses a fixed width.
val get_model : t -> [ `tree_model ] Gobject.obj optionReturns the `GtkTreeModel` of @combo_box.
val get_id_column : t -> intReturns the column which @combo_box is using to get string IDs for values from.
val get_has_entry : t -> boolReturns whether the combo box has an entry.
val get_entry_text_column : t -> intReturns the column which @combo_box is using to get the strings from to display in the internal entry.
val get_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionGets the child widget of @combo_box.
val get_button_sensitivity : t -> Gtk_enums.sensitivitytypeReturns whether the combo box sets the dropdown button sensitive or not when there are no items in the model.
val get_active_iter : t -> bool * [ `tree_iter ] Gobject.objSets @iter to point to the currently active item.
If no item is active, @iter is left unchanged.
val get_active_id : t -> string optionReturns the ID of the active row of @combo_box.
This value is taken from the active row and the column specified by the property@Gtk.ComboBox:id-column property of @combo_box (see method@Gtk.ComboBox.set_id_column).
The returned value is an interned string which means that you can compare the pointer by value to other interned strings and that you must not free it.
If the property@Gtk.ComboBox:id-column property of @combo_box is not set, or if no row is active, or if the active row has a %NULL ID value, then %NULL is returned.
val get_active : t -> intReturns the index of the currently active item.
If the model is a non-flat treemodel, and the active item is not an immediate child of the root of the tree, this function returns `gtk_tree_path_get_indices (path)0`, where `path` is the struct@Gtk.TreePath of the active item.
val get_has_frame : t -> boolGet property: has-frame
val set_has_frame : t -> bool -> unitSet property: has-frame
val get_popup_shown : t -> boolGet property: popup-shown
val on_activate :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_changed :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_format_entry_text :
?after:bool ->
t ->
callback:(path:string -> string) ->
Gobject.Signal.handler_idval on_move_active :
?after:bool ->
t ->
callback:(scroll_type:Gtk_enums.scrolltype -> unit) ->
Gobject.Signal.handler_idval on_popdown :
?after:bool ->
t ->
callback:(unit -> bool) ->
Gobject.Signal.handler_idval on_popup :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id