Commit Graph

39 Commits

Author SHA1 Message Date
Elyes HAOUAS 2c8baa76f1 Fix typos - (Part #3)
Fix some typos

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12017
2020-07-06 10:52:51 +02:00
Marcel Hollerbach 92c01d9e63 efl_ui_item: add API that restricts a item from beeing unselected
Summary:
There are usecases where items should not be unselectable by the user.
For example in the tab_bar. With this commit, a tab bar user cannot
unselect a item by hand anymore.

Depends on D10305

Reviewers: zmike, woohyun, segfaultxavi, cedric

Reviewed By: zmike, segfaultxavi, cedric

Subscribers: SanghyeonLee, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10306
2020-01-02 09:12:39 -05:00
Marcel Hollerbach 7005241b22 efl_ui_collection: always scroll in the item
never the focused element. The focused element can be different from the
item. This fixes a error when item is not focusable, but content in the
item is.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10980
2020-01-02 12:16:13 +01:00
Cedric BAIL 4624b56bed elementary: make sure that our index for the maximum number of object is actually unsigned int bound.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10927
2019-12-27 11:36:59 +01:00
Marcel Hollerbach 5892292ac8 efl_ui: docuement code
there was the request that this needs to be documented, here we are.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10874
2019-12-13 09:33:07 -08:00
Marcel Hollerbach eaf2a8d7ec efl_ui_collection: do not leak
this fixes leaking of membership to a pan object, additionally this also
fixes the leaking of the pan object. This code was written with the
thought that edje deletes its children, long story short: no it does
not. While fixing the leak of the pan object, the error was found that
the membership of the item to the pan object was leaked, which ended up
in the item beeing deleted, even if its not part of the object anymore.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10841
2019-12-13 09:32:58 -08:00
Cedric BAIL 2b324779c9 elementary: reduce events triggered by Efl.Ui.PositionManager.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10687
2019-12-11 11:12:01 +01:00
Marcel Hollerbach f7868fd28c efl_ui_multi_selectable: clean this up
this commit merges common functions from efl_ui_multi_selectable and
efl_ui_multi_selectable_async. Additionally, the two different aspects
of accessing the elements in a multi_selectable widget (numerical or
object based) are now abstracted into interfaces called range_numeric and
range_object. numeric APIs are also prefixed with id's, so its possible
for one widget to implement both (if there will ever be the demand to do
that in future).

The main reason for this split is:
- there is no good common path between mvvm based multi_selectable and
object based multi_Selectable, so there is no way that both sides would
benefit, without the other one suffering.
- If we find later on the demand to implement both on one widget, we now
can fully do that
- Common API is available for both types, so its less API and less
confusion for the API user.

ref T7871
ref T8265

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10675
2019-11-25 13:31:24 +01:00
Mike Blumenkrantz f5a4fd89d9 efl_ui/item_clickable: fix event info for press events
this is just a button and not the full clickable struct

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10198
2019-09-26 16:30:32 +02: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
Cedric Bail 26d5b7366e elementary: forward Efl.Input.Clickable event to Efl.Ui.Collection* event.
Summary: Depends on D10176

Reviewers: zmike, segfaultxavi, bu5hm4n, SanghyeonLee, lauromoura, felipealmeida

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8266

Differential Revision: https://phab.enlightenment.org/D10177
2019-09-25 21:59:25 -04:00
SangHyeon Jade Lee 7884a38dbd efl_ui : change selected_items_get to selected_iterator_new.
multi_selectable_aync already changed name as
selected_iterator_new
so multi_selectable change name also for unity of API.

not sure about we need unselected_items_get in multi_selectable,
so skip to create new api for this time.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10148
2019-09-25 21:14:22 +02:00
SangHyeon Jade Lee 2c4db3b09a efl_ui : reverse the select method name to be ended verb on the last.
Summary:
our new method naming rule only allow verb at the last position,
so change name to fallow rule.

Reviewers: bu5hm4n, cedric, segfaultxavi

Reviewed By: bu5hm4n, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10144
2019-09-25 17:12:51 +09:00
Marcel Hollerbach 6714c821f7 efl_ui_pack: allow NULL as existing parameter in after and before
Summary:
with this commit all implementations of Efl.Pack_Linear to permit NULL
as existing parameter, this is verified with a spec test unit.

fixes T8210

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: woohyun, Jaehyun_Cho, YOhoho, segfaultxavi, zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8210

Differential Revision: https://phab.enlightenment.org/D10023
2019-09-23 16:15:44 -04:00
WooHyun Jung f7e183b851 efl_ui_scrollable: remove ui_scrollable_interactive and move all into ui_scrollable
Summary:
Based on the discussion T7883, there is no reason to keep those
interfaces separately. So, now, efl_ui_scrollable will support
the events and methods together.

@ref T7883

Reviewers: eagleeye, bu5hm4n, zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7883

Differential Revision: https://phab.enlightenment.org/D10072
2019-09-23 11:02:15 +02:00
Marcel Hollerbach 18e9a224be efl_ui_collection: protect against invalid access
i am not sure why this should ever happen. However, a error here is
better than a access out of the bounds of the array.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10066
2019-09-21 20:43:56 +02:00
Yeongjong Lee e06e03f220 efl_ui_collection: fix null pointer dereferences
This will fix Coverity issue.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9986
2019-09-19 14:37:23 -07:00
Marcel Hollerbach ff0aabd345 efl_ui_multi_selectable: remove SINGLE_ALWAYS
this should get a better solution later on. There is also no real usage
for that.

ref T7922

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9985
2019-09-17 13:46:05 +02:00
Marcel Hollerbach 5d5128b226 efl_ui_collection: fix the insertion of the first element with pack_at
Summary:
before pack_at with no element failed because the list element has been
NULL.
This fixes the insertion, the codepath also works without the error.
Depends on D9871

Reviewers: zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9890
2019-09-11 13:38:48 -04:00
Marcel Hollerbach 7024e6f03f efl_ui_collection: update theme name
item_container was the wrong name here. this fixes this to use the
correct name in the theme. Additionally the file name in the file is
adjusted.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9849
2019-09-10 09:10:11 +02:00
Marcel Hollerbach 605d04a302 efl_ui_collection: use the correct min size hint
there are not enough size hints, we should add more!
I mixed up which size hints i should have used here, after some back and
forth it turns out that i should use the combined. This fixes the list
example.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9779
2019-09-05 11:17:04 +02:00
Marcel Hollerbach 333a070915 efl_ui_collection: prevent the invalid insertion of items.
Summary:
the group hirachy that you can build up with group items is flattend
down in the collection, as a linear list. Based on that a user might be
able to insert items at invalid positions, like between groups, without
having set the proper group item, which ... is a problem.

This commit ensures that no new item ever destroys the neightboor hood
between two items of the same group or a item with a group and its group
leader.

Reviewers: stefan_schmidt, zmike, segfaultxavi, SanghyeonLee

Reviewed By: SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9778
2019-08-30 14:50:32 -04:00
Mike Blumenkrantz 6f68e32737 efl_ui/pan: remove pan,viewport,changed event
Summary:
this is just a duplicate of entity geometry changed events, users of
pan should just use those instead

ref T7708
Depends on D9791

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7708

Differential Revision: https://phab.enlightenment.org/D9792
2019-08-30 14:48:14 -04:00
Mike Blumenkrantz 7142acd19c efl_ui/pan: add position info to pan,content_position,changed event
Summary:
changed events should always send the related data when possible

ref T7708
Depends on D9789

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7708

Differential Revision: https://phab.enlightenment.org/D9790
2019-08-30 14:48:04 -04:00
Mike Blumenkrantz ba0cd5d23d efl_ui/pan: rename pan,position,changed -> pan,content_position,changed
Summary:
the pan object is not changing its position, it's moving the content

ref T7708
Depends on D9787

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7708

Differential Revision: https://phab.enlightenment.org/D9788
2019-08-30 14:47:52 -04:00
Marcel Hollerbach 53739890ce efl_ui_position_manager: refactor data access
before data access has been a property on
Efl.Ui.Position_Manager.Entity. However, we are not sure how stable all
this will be, and maybe we have the demand to change that in future, in
order to allow more high-performance item passing here.

Additionally, this patch addresses a few lectures learned from the past,
that includes:
- direct group header filling.
- direct group sizing
- difference between size for caching, and size for displaying
- Have a end_id which is the maximum of id that is filled.

ref T8179

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9754
2019-08-27 17:47:54 +02:00
Marcel Hollerbach 634ebfeaf1 efl_ui_collection: honor desktop vs. touch setting of elm config
with this commit we do desktop-like selection on desktop systems:
- Multiselect with CTRL pressed
- Normal single selection if no CTRL is pressed
on touch devices this is simple on/off selection:
- click to add it to multiselect
- click to remote it from mutliselect

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9664
2019-08-26 14:42:54 +02:00
Marcel Hollerbach 43edd17f41 efl_ui_single_selectable: add properties and events
this commit adds 2 new features, a new event and a new property

The fallback property is usefull if you want to have a selection that always falls back
to some preconfigured things.
As a usecase, think about a list of languges where you can select the
languages you want to have. When everything is deselected, the list will
simply fallback to the preconfigured element (for example the language
configured before)

The event is annoncing that there was a change to the selection. The
event is allowed to be defered, it will be emitted once for a range of
selection elements that happened during one loop iteration. This is
usefull if you are interested in a general selection where you want to
know that we changed from a specific set of selected element to another
set of elements, without monitoring every selectable in the widget.

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9662
2019-08-26 14:42:50 +02:00
Marcel Hollerbach 35f9fc26e3 efl_ui_multi_selectable: add APIs for selecting
this can be used to select / unselect a range or all selectables in a
container. The range selectable APIs do not have a strong ordering on a
and b, b does not have to come after a.

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9660
2019-08-26 14:42:48 +02:00
Yeongjong Lee 38cec03d67 efl_ui_collection: use length value for even parameter of eina_spans_intersect
Parameter of `eina_spans_intersect` are pairs of point and length.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9655
2019-08-21 07:56:54 +02:00
Marcel Hollerbach e2b859bdae efl_ui_position_manager: pass on information about group ids
every batched call will now contain the id of the first item, if the
conditions in the documentation are met.

ref T8115

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9586
2019-08-21 07:50:50 +02:00
Marcel Hollerbach 54c524f7f6 introduce efl_ui_multi_selectable and efl_ui_single_selectable
right now they are just thin wrappers from what have been in
efl_ui_collection. This is just a first effort, the interfaces have to
be equipped with more and better API, more events, and tests.

ref T8057

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9515
2019-08-07 14:48:41 +02:00
Marcel Hollerbach 63d3af3ce9 efl_ui_collection: implement initial focus behaviour
Summary:
the behaviour here is that the next item according to the direction is
getting focused. This sounds easy but is quite complex given the fact
that the items might be hidden. This is the first draft for this, to see
how good it performes.

Reviewers: zmike, stefan_schmidt, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9496
2019-08-06 09:34:42 -04:00
Marcel Hollerbach 1bd9a8f232 introduce a new interface efl_ui_selectable
this is meant to be implemented by entities that *can* be selectabled
(not to be confused with containers that can have selected contents)!

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9503
2019-08-05 19:49:13 +02:00
Christopher Michael a7971f409d efl_ui_collection: Mark unused parameter
double align is actually unused in this function, so mark it as such
2019-08-01 08:32:42 -04:00
Marcel Hollerbach d98d434e56 efl_ui_position_manager: move from accessor to function callback
this commit enables access to the item structure of the collection via a
function callback. The function callback now enables batching for items,
which does not pay off right now. However, a few more optimizations can
be done in order to get the whole payoff.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9445
2019-07-31 15:51:48 -07:00
Mike Blumenkrantz d17ec12faf efl_ui: always set restricted_min size hints internally
Summary:
regular min size hint is for users, internal calcs should use restricted

@fix

Depends on D9441

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9442
2019-07-30 13:12:52 -04:00
WooHyun Jung 77e268e6ab efl_input_clickable: rename efl_ui_clickable to efl_input_clickable
Summary:
Renamed all efl_ui_clickable_XXX to efl_input_clickable_XXX based on
the discussion in T7847

ref T7847 T7976

Reviewers: zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7976, T7847

Differential Revision: https://phab.enlightenment.org/D9427
2019-07-29 11:43:01 +02:00
Marcel Hollerbach a4f7baa911 rename efl_ui_item_container -> efl_ui_collection
this is the first rename of the main widget, the renames of the test
suites will follow

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9408
2019-07-25 20:27:39 +02:00