Community
Participate
Working Groups
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.
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.
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?
Moving from Later.
*** Bug 4538 has been marked as a duplicate of this bug. ***
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.
*** Bug 22876 has been marked as a duplicate of this bug. ***
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).