2017-12-12 16:59:48 -08:00
|
|
|
import elm_general;
|
|
|
|
|
2019-03-08 06:55:43 -08:00
|
|
|
struct @beta Efl.Ui.List_View_Item_Event
|
2017-12-12 16:59:48 -08:00
|
|
|
{
|
2019-07-08 07:56:49 -07:00
|
|
|
[[Information related to item events.]] // TODO: This needs to be filled in.
|
|
|
|
layout: Efl.Ui.Layout; [[TBD]]
|
|
|
|
child: Efl.Model; [[TBD]]
|
|
|
|
index: int; [[TBD]]
|
2017-12-12 16:59:48 -08:00
|
|
|
}
|
2019-02-28 07:23:11 -08:00
|
|
|
class @beta Efl.Ui.List_View extends Efl.Ui.Layout_Base implements Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar,
|
2018-04-13 02:20:40 -07:00
|
|
|
Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Ui.Focus.Composition, Efl.Ui.Focus.Manager_Sub,
|
efl_ui_selectable: split this up
i dont know why, but something got badly mixed up, the selection APIs
for text and item ended up in the same interface, which seems ... weird
?
This commit splits that up into container_selectable and
text_selectable, there is no future plan on my list for text_selection.
The rest of this series is working towards removing
container_selectable, replacing it with a new interface. However, the
interface will stay until list_view is replaced.
The changes in the legacy code are removing the efl.ui.selection
interface from it, item emission is not depending on the inherited
interfaces, additionally, this interface does not provide any API, so
this should not be an issue.
ref T7766
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9498
2019-08-05 09:35:13 -07:00
|
|
|
Efl.Ui.Container_Selectable, Efl.Ui.List_View_Model, Efl.Ui.Widget_Focus_Manager
|
2017-12-12 16:59:48 -08:00
|
|
|
{
|
|
|
|
methods {
|
|
|
|
@property homogeneous {
|
2019-07-08 07:56:49 -07:00
|
|
|
[[When in homogeneous mode, all items have the same height and width. Otherwise, each item's size is respected.
|
|
|
|
]]
|
2017-12-12 16:59:48 -08:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
}
|
|
|
|
values {
|
2019-07-08 07:56:49 -07:00
|
|
|
homogeneous: bool; [[Homogeneous mode setting. Default is $false.]]
|
2017-12-12 16:59:48 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property select_mode {
|
|
|
|
[[Listview select mode.]]
|
|
|
|
get {}
|
|
|
|
set {}
|
|
|
|
values {
|
|
|
|
mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The select mode.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property default_style {
|
2019-07-08 07:56:49 -07:00
|
|
|
[[TBD]] // TODO: This needs to be filled in. Does not seem to be in use.
|
2017-12-12 16:59:48 -08:00
|
|
|
values {
|
2019-07-08 07:56:49 -07:00
|
|
|
style: stringshare; [[TBD]]
|
2017-12-12 16:59:48 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property layout_factory {
|
|
|
|
[[Listview layout factory set.]]
|
|
|
|
set {}
|
|
|
|
values {
|
|
|
|
factory: Efl.Ui.Factory; [[The factory.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
events {
|
efl_ui : change efl_ui_view_list to efl_ui_list_view.
Summary:
View is not a namespace, but an interface,
So, View_List cannot be under the view namespace for now.
it looks more suite to be end as View than List on this widget name.
Firstly, it follows our common naming rules of class.
Also, List_View is commonly presentable name on most UI frameworks,
so it is very easy to understand what this widget can do for the user.
Test Plan:
Make works.
Example is not works for now til stable model interface.
Reviewers: felipealmeida, woohyun, cedric, Hermet
Reviewed By: Hermet
Subscribers: larryolj, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7234
2018-11-04 21:27:05 -08:00
|
|
|
item,realized : Efl.Ui.List_View_Item_Event;
|
|
|
|
item,unrealized : Efl.Ui.List_View_Item_Event;
|
|
|
|
item,focused : Efl.Ui.List_View_Item_Event;
|
|
|
|
item,unfocused : Efl.Ui.List_View_Item_Event;
|
|
|
|
item,highlighted : Efl.Ui.List_View_Item_Event;
|
|
|
|
item,unhighlighted : Efl.Ui.List_View_Item_Event;
|
2017-12-12 16:59:48 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
implements {
|
|
|
|
Efl.Object.constructor;
|
|
|
|
Efl.Object.finalize;
|
|
|
|
Efl.Object.destructor;
|
2018-04-05 01:47:26 -07:00
|
|
|
Efl.Gfx.Entity.position { set; }
|
|
|
|
Efl.Gfx.Entity.size { set; }
|
2017-12-12 16:59:48 -08:00
|
|
|
// Smart obj
|
|
|
|
Efl.Canvas.Group.group_member_add;
|
|
|
|
Efl.Canvas.Group.group_calculate;
|
|
|
|
|
efl_ui : change efl_ui_view_list to efl_ui_list_view.
Summary:
View is not a namespace, but an interface,
So, View_List cannot be under the view namespace for now.
it looks more suite to be end as View than List on this widget name.
Firstly, it follows our common naming rules of class.
Also, List_View is commonly presentable name on most UI frameworks,
so it is very easy to understand what this widget can do for the user.
Test Plan:
Make works.
Example is not works for now til stable model interface.
Reviewers: felipealmeida, woohyun, cedric, Hermet
Reviewed By: Hermet
Subscribers: larryolj, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7234
2018-11-04 21:27:05 -08:00
|
|
|
Efl.Ui.List_View_Model.load_range { set;}
|
|
|
|
Efl.Ui.List_View_Model.realize;
|
|
|
|
Efl.Ui.List_View_Model.unrealize;
|
|
|
|
Efl.Ui.List_View_Model.model_size { get; }
|
|
|
|
Efl.Ui.List_View_Model.min_size { get; set; }
|
2017-12-12 16:59:48 -08:00
|
|
|
|
|
|
|
// Widget
|
2018-05-16 10:30:28 -07:00
|
|
|
Efl.Ui.Widget_Focus_Manager.focus_manager_create;
|
2019-03-04 10:37:18 -08:00
|
|
|
Efl.Ui.Widget.widget_input_event_handler;
|
2018-01-19 09:27:26 -08:00
|
|
|
Efl.Ui.Widget.focus_state_apply;
|
|
|
|
Efl.Ui.Focus.Composition.prepare;
|
2017-12-12 16:59:48 -08:00
|
|
|
Efl.Ui.View.model { get; set; }
|
|
|
|
|
2017-12-19 19:30:29 -08:00
|
|
|
Efl.Layout.Signal.signal_callback_add;
|
|
|
|
Efl.Layout.Signal.signal_callback_del;
|
2018-04-03 04:27:30 -07:00
|
|
|
Efl.Access.Object.access_children { get; }
|
2017-12-12 16:59:48 -08:00
|
|
|
Efl.Access.Selection.selected_children_count { get; }
|
|
|
|
Efl.Access.Selection.selected_child { get; }
|
|
|
|
Efl.Access.Selection.selected_child_deselect;
|
|
|
|
Efl.Access.Selection.child_select;
|
|
|
|
Efl.Access.Selection.child_deselect;
|
|
|
|
Efl.Access.Selection.is_child_selected;
|
|
|
|
Efl.Access.Selection.all_children_select;
|
2018-02-14 18:14:52 -08:00
|
|
|
Efl.Access.Selection.access_selection_clear;
|
2017-12-12 16:59:48 -08:00
|
|
|
}
|
2019-01-23 11:55:44 -08:00
|
|
|
composite {
|
|
|
|
Efl.Ui.Scrollable_Interactive;
|
|
|
|
Efl.Ui.Scrollbar;
|
|
|
|
}
|
2017-12-12 16:59:48 -08:00
|
|
|
}
|