Commit Graph

3 Commits

Author SHA1 Message Date
Ali Alzyod 621d2cdecf Efl.Canvas.Text rename into Efl.Canvas.Textblock
Summary:
Efl.Canvas.Text                renamed into **Efl.Canvas.Textblock**
Efl.Canvas.Text_Factory  renamed into **Efl.Canvas.Textblock_Factory**

Reviewers: woohyun, segfaultxavi, zmike, bu5hm4n, YOhoho

Reviewed By: segfaultxavi

Subscribers: cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10808
2019-12-10 17:39:59 +09:00
Daniel Hirt 26c1f2477c Ui text: port widget to new interfaces
This is a big rewrite. In addition to implementing functionality with
the new Efl interfaces, a lot of legacy (Elm) code was removed.

A lot of work is squashed in this patch as the widget would've been
completely broken otherwise.

The major changes are:

Life-cycle:
  - Code was split to have 'finalize'
  - Item anchors (emoticons, images) were rewritten to have proper
  life-cycle

Scrolling logic:
  - Efl.Ui.Internal_Text_Scroller widget was added, and replaces the old
  Elm.Interface_Scrollable implementation. Singe-line and multi-line
  modes were fixed as well as sizing calculations. The object is now
  swallowed inside the Ui.Text widget.

Copy and paste:
  - Code was converted to Efl.Selection logic.

Modified tests:
    elementary_test -to "efl.ui.text"
    elementary_test -to "efl.ui.text label"

Added tests:
    elementary_test -to "efl.ui.text inputfield"

Removed test:
    elementary_test -to "efl.ui.text.async"
2018-11-05 18:17:42 +02:00
Daniel Hirt 4a905a22a4 Canvas image: add Efl.Canvas.Text.Factory + use in Ui.Text
This interface has a simple 'create' method to create Efl.Canvas.Object
given a key.
This is used higher-up in Ui.Text in the next commit.

Ui text: add ability to set item factories

Added API to set an item factory object.
This is similar to the previous item providers (that worked with
callbacks).

You instantiate a factory object and set it on the Ui.Text object.
Each factory implements the "create" method from
Efl.Canvas.Text.Item_Factory.

This also includes 3 public factories (Image, Emoticon and Fallback):
  - Image factory: creates images from added entries (key strings)
  - Emoticon factory: creates emoticons by querying the theme
  - Fallback: creates image, then falls back to emoticon

If no factory is set, then the fallback (internal) factory is used.

See the added "Ui.text Item Factory" test in elementary_test for an
example of usage.

@feature
2018-01-18 10:20:28 -08:00