efl/src/lib/elementary/efl_ui_single_selectable.eo

48 lines
1.9 KiB
Plaintext

interface Efl.Ui.Single_Selectable {
[[Interface for getting access to a single selected item in the implementor.
The implementor is free to allow a specific number of selectables being selected or not.
This interface just covers always the latest selected selectable.
@since 1.23
]]
c_prefix: efl_ui_selectable;
methods {
@property last_selected {
[[The selectable that was selected most recently.]]
get {
}
values {
selectable : Efl.Ui.Selectable; [[The latest selected item.]]
}
}
@property fallback_selection {
[[A object that will be selected in case nothing is selected
A object set to this property will be selected instead of no item being selected.
Which means, there will be always at least one element selected.
If this property is $NULL, the state of "no item is selected" can be reached.
Setting this property as a result of selection events results in undefined behavior.
]]
values {
fallback : Efl.Ui.Selectable;
}
}
@property allow_manual_deselection {
[[This controlls if a selected item can be deselected due to clicking]]
values {
allow_manual_deselection : bool; [[$true if clicking while selected results in a state change to unselected]]
}
}
}
events {
selection_changed : void; [[Emitted when there is a change in the selection state. This event will collect all
the item selection change events that are happening within one loop iteration.
This means, you will only get this event once, even if a lot of items have changed.
If you are interested in detailed changes, subscribe to the individual
@[Efl.Ui.Selectable.selected,changed] events of each item.]]
}
}