HomePhabricator

Canvas image: add Efl.Canvas.Text.Factory + use in Ui.Text

Authored by herdsman on Nov 9 2017, 7:53 AM.

Description

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

Details

Committed
cedricJan 18 2018, 10:20 AM
Parents
rEFL2eac0dd89d01: Edje: remove item provider from eo api
Branches
Unknown
Tags
Unknown