summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
diff options
context:
space:
mode:
authorLina Kemmel <lkemmel@il.ibm.com>2013-03-13 15:12:29 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2013-03-13 15:12:29 -0400
commit2b14d767020ed3598cdf53c0df27bc3b8bd1ea64 (patch)
treec1d7cf106131c5d5751b32f571340a38b99f3353 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
parent71391fc1dc9d75effb13782c0dee4de011e77da2 (diff)
downloadeclipse.platform.swt-2b14d767020ed3598cdf53c0df27bc3b8bd1ea64.tar.gz
eclipse.platform.swt-2b14d767020ed3598cdf53c0df27bc3b8bd1ea64.tar.xz
eclipse.platform.swt-2b14d767020ed3598cdf53c0df27bc3b8bd1ea64.zip
Bug 273198 - [Bidi] Lack of support for controlling text direction independently from widget orientation
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index 632a44a63a..c88e9be174 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -1159,6 +1159,23 @@ boolean setTabGroupFocus () {
return false;
}
+boolean updateTextDirection(int textDirection) {
+ if (super.updateTextDirection(textDirection)) {
+ /*
+ * OS.WS_EX_RTLREADING doesn't propagate to children
+ */
+ Control[] children = _getChildren ();
+ int i = children.length;
+ while (i-- > 0) {
+ if (children[i] != null && !children[i].isDisposed ()) {
+ children[i].updateTextDirection(textDirection);
+ }
+ }
+ return true;
+ }
+ return false;
+}
+
String toolTipText (NMTTDISPINFO hdr) {
Shell shell = getShell ();
if ((hdr.uFlags & OS.TTF_IDISHWND) == 0) {
@@ -1891,7 +1908,9 @@ LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
}
}
if (widget != null) {
- if ((widget.getStyle () & SWT.RIGHT_TO_LEFT) != 0) {
+ int style = widget.getStyle();
+ int flags = SWT.RIGHT_TO_LEFT | SWT.FLIP_TEXT_DIRECTION;
+ if ((style & flags) != 0 && (style & flags) != flags) {
lpnmtdi.uFlags |= OS.TTF_RTLREADING;
} else {
lpnmtdi.uFlags &= ~OS.TTF_RTLREADING;