Commit Graph

9 Commits

Author SHA1 Message Date
Marcel Hollerbach 577b82dad6 Introduce Efl.Ui.Item_Container
this is a new widget which aims to replace Efl.Ui.Grid / Efl.Ui.List.
The widget is split up in a widget and a interface for item placement.

Efl_Ui_Item_Position_Manager: The interface contains API which is used
by the Item_Container to place the items, there is also a set of common
tests which tests for the casual tripping wires, and ensures that the
events are emitted in the correct moments (the later part still can be
improved)

Efl_Ui_Item_Container: The widget itself, it contains the API for the
enduser to add Items to the widget, it handles the different modes for
selection type and emits the events for selection changes. The pack API
is conform with the spec unit test. An additional set of tests is
defined which should be able to be run on every widget with a specific
position_manager beeing set.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9285
2019-07-24 10:38:22 -07:00
Cedric BAIL d902989b74 elementary: add a test for Efl.Ui.View interface.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9308
2019-07-17 21:58:01 +02:00
Marcel Hollerbach e922a23ddf efl_ui_spec_suite: introduce two new test suites
this checks that the expected errors are in place, and the state does
not get changed when there is an errornous call.

ref T7895
ref T7894
2019-07-08 19:56:33 +02:00
Xavi Artigas e776f5f0d7 Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).

Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.

This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.

Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.

Tests have been added to the Elementary Spec suite for all cases.

Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-04 19:38:20 +02:00
Marcel Hollerbach 5ca38bfc34 efl_test_clickable: introduce new tests
Summary:
the new test checks if the events are correctly emitted

Depends on D8821

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8822
2019-05-14 15:50:32 -04:00
Marcel Hollerbach 7aa9ea071a efl_pack: split algin and padding property
the pack interface is a general interface for how we pack things into a
container. the align and padding property has less to nothing to do with
this. Hence this commit splits the two properties into theire own
interface.

fix T7825

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8699
2019-04-26 12:06:02 +02:00
Marcel Hollerbach 2e85c6ba34 efl_ui_spec_suite: move the information about tests to the test files
for now the widgets which are tested are encoded in the test files where
the tests are implemented. This is for now done in a simple json format,
just for the sake of simplicity.

ref T7815

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8685
2019-04-24 15:52:48 +02:00
Marcel Hollerbach 0bd3ab8252 efl_ui_spec: add tests for efl.content
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8640
2019-04-21 10:51:46 +02:00
Marcel Hollerbach 6440e509a0 elm: here comes a new testsuite
We have two elementary test suite, what is more obvious than just adding
a third one! This testsuite aims for establishing a standard behaviour
for the interfaces we have added in efl now. This first part here brings
a few testcases for Efl.Pack which are currently only passing for
Efl.Ui.Box. More widgets will be added afterwards.

The testcases themself are not defined after what worked or did not
work, but rather what made sence (in my opinion ^_^).

ref T7767

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8518
2019-04-17 15:21:11 +02:00