Commit Graph

19 Commits

Author SHA1 Message Date
Marcel Hollerbach 77a04db578 efl_ui_tab_pager: do not directly inherit from spotlight anymore
spotlight moved away from layout, this could have also been solved with
setting a edje object as resize object. However, this commit now
contains the spotlight internally.

The resons why containing it internally is better:
- You now only have one way of selecting a page, marking it as selection
via the selectable API
- You cannot build race conditions between selecting a page and setting
the active_element anymore
- The tab_pager is now also just a simple single_selectable implementor,
which makes this whole usage more convinient.
- There is now a event you can listen to if you want to know if
something has changed the selected item
- push and pop would have never worked correctly in the tab_pager, as
the item would have appeared always before the item was "faded" in. This
possibility is not given anymore

Last but not least, this makes tab_pager usable again, the tab bar is
displayed again.

Differential Revision: https://phab.enlightenment.org/D10775
2020-02-03 17:16:03 +01:00
Marcel Hollerbach 1df17abba5 efl_ui_*selectable: unify these APIs with the same c_prefix
Summary:
with this commit that api for single and multi selectable shares the
same prefix, which makes sense in c as we do not really differ between
those two types there anyway.

ref T7871

Reviewers: SanghyeonLee, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7871

Differential Revision: https://phab.enlightenment.org/D10183
2019-09-26 18:32:58 +09:00
Jaehyun Cho dd5e7c7019 efl_ui_tab_pager: fix infinite selected calls
Since tab_pager's _select() and tab_bar's _selection_change_cb() cause
calling each other infinitely.
2019-09-23 20:08:32 +09:00
Marcel Hollerbach 588745e995 efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.

We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.

The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.

Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.

ref T7991

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-06 16:10:40 +02:00
Marcel Hollerbach 7f94410a90 efl_ui_tab_pager: make this compatible with Efl.Pack_Linear test suite
the testsuite now is happy with the behaviour in there. Additionally,
the internals are cleaned up, fields that are not used anymore are
deleted, and the logic maintaining them as well.

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9732
2019-08-29 14:42:46 +02:00
Marcel Hollerbach 3cc427234e efl_ui_tab_pager: remove the setter for tab_bar
the setter of the tab_bar here is quite useless. If you set it after
something else was set, the item situation is not clear anymore, there
is more in the spotlight than in the bar. You cannot use the widget
without tab bar. So the logical consequence for me was that the pager
create the tab bar by itself, and you can just access it via a getter.

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9731
2019-08-29 14:42:45 +02:00
Marcel Hollerbach ffafe749ed efl_ui_tab_bar: migrate to Efl.Pack_Linear
with pack linear it is a lot more convinient and error prover to add
items to this widget, this also comes with the pack test suite, which
verifies that this behaviour is not broken. Additionally we have fewer
APIs that a user has to learn.

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9730
2019-08-29 14:42:43 +02:00
Marcel Hollerbach 3c317618e5 efl_ui_tab_bar: implement efl.ui.single_selectable
this is for now the simples way IMO, the one or another implementation
thing in efl_ui_tab_pager is a little bit clumsy, but that should be
able to be improved once Efl.Pack_Linear is implemented.

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9729
2019-08-29 14:42:42 +02:00
Marcel Hollerbach ef3d88dfc9 introduce efl_ui_tab_bar_default_item
Summary:
Tab bar used a direct layout to implement all this functionality by its
own. However, it seems that we can reuse a lot of object functionality
that is already part of efl.ui.item. With this commit the features that
are not part of Efl.Ui.Item are moved to Efl.Ui.Tab_Bar_Default_Item.

The tab bar is changed in a way that you do not need to pass the icon
and label by hand anymore, you can rather just pass the tab_bar default
item. Additionally, the item for a tab_page can now directly be
generated from a page.

This is the first commit in order to cleanup efl_ui_tab_bar, tab_page &
tab_pager. The goal is also to implement our interfaces for inserting
elements on those objects. So our common test suites can also be used.

Reviewers: zmike, segfaultxavi, cedric, woohyun, bowonryu

Reviewed By: woohyun

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9726
2019-08-29 21:07:48 +09:00
Cedric BAIL 47c5736ef9 elementary: rename Activew_View to Spotlight.
View is something that is expected in the context of MVVM, so using it somewhere else is
going to lead to some confusion. Spotlight does descrive the objective of all of this
widget in actually a more explicit way as they all give the spotlight to one sub widget
at a time.

I have also renamed the View_Manager to be just Manager as the View there wasn't useful.
2019-07-05 19:18:22 +02:00
Marcel Hollerbach 37266b93a5 efl.ui.pager: remove!
This can be done with Efl.Ui.Active_View

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8907
2019-05-30 11:48:18 +02:00
Marcel Hollerbach bdc63d57d5 efl_ui_tab_pager: migrate to active_view
This now migrates to active_view. When we get back to this widget for
stabelization. This is only the first step for loosening efl.ui.pager so
it can be removed. For now the API of efl_ui_tab_pager stayes the same.

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8906
2019-05-30 11:48:17 +02:00
Yeongjong Lee 41136db8e8 ui.widget: remove elm_widget_sub_object_parent_add from each of widgets
since commit a1addad60e, To add myself as a sub object of parent object will be
done in Efl.Ui.Widget constructor.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8280
2019-04-18 11:01:19 +02:00
Bowon Ryu a026405a6a efl_ui_tab_pager: fixed issue where tab_pager does not work
Summary:
I fixed the tab_pager behavior problem caused by changing efl interface.
and I have also fixed some sample code errors.
 - using efl_file_load for efl_file_set
 - using efl_del for unpacked tab_page
 - disable unimplemented features

Test Plan: elementary_test -to efl.ui.tab_pager

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8471
2019-03-26 14:20:27 +09:00
Marcel Hollerbach 11003bcae3 efl_ui: rename select and unselected of efl_ui_selectable
Summary:
this was conflicting with a model event. Prefixing it with "item,"
resolves this, and describes better what it does.
Depends on D8413

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8414
2019-03-19 16:30:19 -04:00
Marcel Hollerbach c9cdb916cd Revert "efl_ui_selectable: namespace events to avoid conflicts"
Summary:
This reverts commit f629f11bed.

This breaks legacy events. As the selected event is used in legacy
widgets. Also this commits mixed up two different concepts, selection in
a entry etc. and selection of a item.
Depends on D8411

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8412
2019-03-19 16:29:39 -04:00
Mike Blumenkrantz f629f11bed efl_ui_selectable: namespace events to avoid conflicts
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8261
2019-03-08 12:17:54 -08:00
Xavi Artigas 6b7346b7b2 Remove individual class BETA guards
Summary:
Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged
as @beta. This means that any app (and the EFL code) wanting to use BETA features
has to enable them class by class, which is cumbersome.
This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT
guard, so apps only need to define one symbol to access BETA features.

Any usage of the per-class guards has been removed from the EFL code and examples.
When building EFL the global guard is defined by configure, so all EFL methods
already have access to BETA API.
Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to
use BETA API have to define this symbol before including any EFL header
(It has been added to the examples requiring it).

Test Plan:
make && make check && make examples still work, but there's a lot less #defines
in the code

Reviewers: zmike, bu5hm4n, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T6788

Differential Revision: https://phab.enlightenment.org/D7924
2019-02-13 18:09:17 +01:00
Bowon Ryu 67045ea28a efl_ui_tab_pager: add Efl.Ui.Tab_Pager and related classes
Summary:
the basic concept of Efl.Ui.Tab_Pager is similar to elm_toolbar.
user can attach Efl.Ui.Tab_Bar to the tab_pager.
user can create an Efl.Ui.Tab_Page to add tab label, tab icon and set the content of the page.
user can pack Efl.Ui.Tab_Page into tab_pager.
The tab and page match one to one.
user can controls tab and page through tab_pager.

See T5317

Test Plan: elementary_test -to efl.ui.tab_pager

Reviewers: cedric, woohyun, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: eunue

Differential Revision: https://phab.enlightenment.org/D5988
2018-05-02 21:11:41 +09:00