2019-09-26 03:49:20 -07:00
|
|
|
interface Efl.Ui.Single_Selectable {
|
2019-08-06 10:55:40 -07:00
|
|
|
[[Interface for getting access to a single selected item in the implementor.
|
|
|
|
|
2019-09-02 07:24:26 -07:00
|
|
|
The implementor is free to allow a specific number of selectables being selected or not.
|
|
|
|
This interface just covers always the latest selected selectable.
|
2019-10-14 00:55:52 -07:00
|
|
|
|
|
|
|
@since 1.23
|
2019-08-06 10:55:40 -07:00
|
|
|
]]
|
2019-09-26 02:16:24 -07:00
|
|
|
c_prefix: efl_ui_selectable;
|
2019-08-06 10:55:40 -07:00
|
|
|
methods {
|
|
|
|
@property last_selected {
|
|
|
|
[[The selectable that was selected most recently.]]
|
|
|
|
get {
|
|
|
|
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
selectable : Efl.Ui.Selectable; [[The latest selected item.]]
|
|
|
|
}
|
|
|
|
}
|
2019-08-20 09:22:00 -07:00
|
|
|
@property fallback_selection {
|
|
|
|
[[A object that will be selected in case nothing is selected
|
|
|
|
|
2019-09-02 07:24:26 -07:00
|
|
|
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.
|
2019-08-20 09:22:00 -07:00
|
|
|
|
|
|
|
Setting this property as a result of selection events results in undefined behavior.
|
|
|
|
]]
|
|
|
|
values {
|
|
|
|
fallback : Efl.Ui.Selectable;
|
|
|
|
}
|
|
|
|
}
|
2020-01-02 06:07:13 -08:00
|
|
|
@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]]
|
|
|
|
}
|
|
|
|
}
|
2019-08-20 09:22:00 -07:00
|
|
|
}
|
|
|
|
events {
|
2019-09-02 07:24:26 -07:00
|
|
|
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.]]
|
2019-08-06 10:55:40 -07:00
|
|
|
}
|
|
|
|
}
|