Hey all,

A colleague of mine is working on adding UI-Mirroring to EFL. This is
behavior often seen on systems that use RTL languages. It essentially
means that all of the objects on the screen swap sides.

My colleague already wrote the code responsible for the actual mirroring
in Edje (with a lot of help from cedric, thanks mate :P) and now only
thing left is doing it conditionally, i.e only if the translation
indicates it should be, or if the programmer specifically set an object
to RTL.

We had in mind the following design:
Adding two fields to Evas_Object:
1. direction (will probably be inside cur/prev just like size coloring
and visibility) - the direction of the object.
2. direction_changing_behavior (or hopefully a better name) - can be
either AUTO or MANUAL. Manual means the direction will not change unless
set by the user explicitly, and AUTO means it will update according to
it's father, i.e it's direction is always like it's father's direction.

Drawing the object in LTR/RTL mode is easy, the more difficult part is
setting a father's directions (manually) and propagating the changes
down to it's children (that will only change if they have AUTO set...).
First I planned to recursively go through an object and all of it's
children (ones that have AUTO set anyway), but Sachiel said it's
impossible, so I moved to plan B, which is using signals.

I.e I want to have a signal DIRECTION_CHANGED, and have all the children
of each object register to that signal if they have any special handling
and they have AUTO set in the direction_changing_behavior (or they have
children that might have) - registration and handling will be done in
elm/evas/edje by us per object type (i.e image, button or foobar), and
not by the users of the API.

What do you think of the callback idea? does this sound like a good
solution? Any other ideas maybe?

Thanks a lot,
Tom.


------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to