Re: [Lazarus] questions regarding bi-directional ui design

2008-11-03 Thread Doug Chamberlin
ik wrote:
> For example, if TApplication.BidiMode (I have added support for it
> with the help of Paul) is set to bdRightToLeft, should every TControl
> and TMenu base compoents should be automatically be aligned to right
> or the developer must choose the direction regardless of
> TApplication.BidiMode ?

On this specific point I would recommend as part of the BiDi 
implementation expanding the choices for basic alignment to include a 
new value that means "automatically decide based on bd setting". Then, 
the logic would be to look at the BiDiMode to determine the alignment.

This way all existing code should work as it always has. If a developer 
wanted to adapt his program to take BiDi into account he could just set 
the BiDiMode and change all the alignments that should respond to the 
new alignment value. Any controls that should not adapt can continue to 
set their own alignment independent of the BiDi mode.

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] questions regarding bi-directional ui design

2008-11-02 Thread ik
Hello,

I'm working on the BiDi implementation of Lazarus, and there are few
things that require a lot of thinking regarding what we want to
achieve with Lazarus behavior.

For example, if TApplication.BidiMode (I have added support for it
with the help of Paul) is set to bdRightToLeft, should every TControl
and TMenu base compoents should be automatically be aligned to right
or the developer must choose the direction regardless of
TApplication.BidiMode ?

The Pro's for Auto Alignment:
* The program will be suited for any right to left language (at the
moment Hebrew and Arabic, Paul made it more elastic to add additional
languages if needed).
* The developer does not need to set direction by hand (unless they
want to make sure the direction of the ui is as they wish to have)
* We have better indication for the mode we are at inside a TControl
base component (instead of setting it by hand).
* I can finally start providing better looking software with Hebrew
that are not aligned to the left (it looks really bad and it is hard
to use).

The Cons/problems:
* How should anchors react ? a right anchor should be left or should
remain right ?
* What happen if the locale is Hebrew (for example) but the language
of the program is English. it will be very unusable to do it
automaticlly.
* Each UI toolkit display things differently with bidi direction and
there is no standard look. (Should Lazarus decide on such for the
developers ?)
* How can we control the direction progrematicly when needed, even
when we set the OI to work with bdLeftToRight.
* What happen with UI toolkits such as GTK1.2 and fpGUI that does not
support BiDi ?

Another issue is the translation of Lazarus.
I wish to make sure that some (and not all) of the UI of Lazarus
itself will be right to left when for example I use the Hebrew
language in the IDE. How should I approach the issue ?
Things to be aligned to the right is the menus and the Object
Inspector tabs, and all of the dialogs, but not the rest of the
environment. not the editor or the OI grid etc..
I need to know where and how to do such work.

Thanks,
Ido
-- 
http://ik.homelinux.org/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus