Bug 15165 - BIDI: enable RTL orientation in SWT widgets
Summary: BIDI: enable RTL orientation in SWT widgets
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 4538 22876 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-03 00:34 EDT by Matitiahu Allouche CLA
Modified: 2008-11-12 14:10 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matitiahu Allouche CLA 2002-05-03 00:34:45 EDT
This is not a bug but a request for enhanced support for Bidi in SWT widgets.  
Many platforms support RTL orientation in their GUI.
SWT provides no API to trigger the RTL capabilities of the platform.
My request is to enrich the SWT API so that the full Bidi capabilities of the 
platform can be used when using SWT widgets (e.g. in plugin development).

As I see it, the design should include an API to set RTL orientation at the 
process level (or the closest equivalent from within Eclipse), and another to 
set RTL orientation at the widget level, maybe as a flag in widget creation and 
modification.
It is understood that these APIs will have effect only inasmuch as the platform 
itself supports these functionalities.
Comment 1 Mike Wilson CLA 2002-05-03 09:38:45 EDT
See bug #4538 for a description of the o/s support provided by win32.

I'd like to see SWT support RTL orientation. Unfortunately, there are issues 
at several levels:
  - support for RTL is significantly less mature on platforms other than win32 
(although gtk2 seems to have made some inroads on this). This is an issue for 
deciding on the *API* rather than an implementation problem.
  - the SWT developers are already max'ed out in terms of requirements for R2.0
  - we don't understand the usage patterns well enough to be confident in what 
we would implement
  - Eclipse itself would need to have a clear story on how it behaves in the 
RTL context (for example, if some plugins ignored an RTL flag, but others 
honoured it, you would get a random mix in the resulting UI. Ugh! (Related to 
this is the problem of dealing with R1.0 plugins))

Basically, I believe the best way to make RTL support show up in Eclipse is to 
have a dedicated group of native RTL users work together to decide on an API 
(at both the Eclipse UI and SWT levels), get it reviewed by the Eclipse UI and 
SWT developers, and then implement it. Absolutely the best way to get the 
support in is to provide a well-written, working implementation. 

Added NE to the CC list so he can follow the discussion.
Comment 2 Matitiahu Allouche CLA 2002-09-03 10:06:51 EDT
This subject has been dormant for a while, it is time to push it forward.  
Developers from the Arabic and Hebrew competency centers at IBM have cooperated 
to create a high level design document for RTL support in SWT.  How should we 
proceed.  Should I attach it to a comment on this bug?
Comment 3 Veronika Irvine CLA 2002-09-11 14:06:45 EDT
Moving from Later.
Comment 4 Steve Northover CLA 2003-01-10 19:12:30 EST
*** Bug 4538 has been marked as a duplicate of this bug. ***
Comment 5 Steve Northover CLA 2003-01-10 19:43:55 EST
Ok, three new style bits have been added to SWT.  They are SWT.LEFT_TO_RIGHT, 
SWT.RIGHT_TO_LEFT and SWT.MIRRORED.  Only the first two can be set by the 
application (SWT.MIRRORED cannot).  When mirroring is used to implement an 
orientation (currently only SWT.RIGHT_TO_LEFT on Windows), the SWT.MIRRORED bit 
is set.

Children are initialized to have the orientation of their parent when they are 
created.  Using either flag, it is possible to override the inherited behavior 
of the parent.  It is easy to find out the orientation of a child by testing 
for either bit, one of which will always be set.

Note that this is the first time we have inherited style bits from a parent so 
the breaks an SWT convention (not sure what other style bits could be 
inherited).  The problem with sticking to dogma, and forcing the application 
writer to set the bit for every control was just to tedious given that "most 
things just work" when RIGHT_TO_LEFT orientation is specified.

I'm not going to close this PR becuase support has not been added to the other 
platforms.
Comment 6 Steve Northover CLA 2003-01-28 15:09:51 EST
*** Bug 22876 has been marked as a duplicate of this bug. ***
Comment 7 Felipe Heidrich CLA 2008-11-12 14:10:00 EST
This is report is not helpful.

SWT.RIGHT_TO_LEFT is supported on win32 and gtk.
We will implement it on other platforms as long as it makes sense for it (i.e. the desktop can be mirrored, other application on the platform are mirrored). We will use one report per platform.

Closing as fixed (back the day).