Picker
Category | refcounted |
Type | hime_picker_t |
Inherits | View |
Choose a single item from a list of items.
Constructors
hime_picker_t hime_picker_create()
Create a new Picker.
Return
hime_picker_t
Methods
void hime_picker_set_model(self, model)
Set the combobox model used for displaying.
Parameters
hime_picker_t
selfhime_combobox_model_t
model
Return
void
hime_combobox_model_t hime_picker_get_model(self)
Return the picker's model.
Parameters
hime_picker_const_t
self
Return
hime_combobox_model_t
void hime_picker_select_item_at(self, index)
Select the item at index
.
Pass a negative number to deselect the item.
Parameters
hime_picker_t
selfint
index
Return
void
const char16_t* hime_picker_get_selected_item(self)
Return the text of selected item.
Parameters
hime_picker_const_t
self
Return
const char16_t*
int hime_picker_get_selected_item_index(self)
Return the index of selected item.
When nothing is selected, -1 will be returned.
Parameters
hime_picker_const_t
self
Return
int
Events
void hime_picker_on_change(picker)
Emitted when the content has changed.
Parameters
hime_picker_t
picker
Preventable
No.