summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2010-12-23 19:03:29 +0000
committerFelipe Heidrich <fheidric>2010-12-23 19:03:29 +0000
commite1ddb07c7c0cc45210739f25c19adbd93ffa639d (patch)
treee86a3ee5e0dbe8ad0879c9dabcb511e901373a07 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
parentb13cb0959e0afe3c17aa178a3bca80d7d1fd22d7 (diff)
downloadeclipse.platform.swt-e1ddb07c7c0cc45210739f25c19adbd93ffa639d.tar.gz
eclipse.platform.swt-e1ddb07c7c0cc45210739f25c19adbd93ffa639d.tar.xz
eclipse.platform.swt-e1ddb07c7c0cc45210739f25c19adbd93ffa639d.zip
[Bug 29779] BIDI: lack of ability to change orientation of widget in runtime
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java21
1 files changed, 21 insertions, 0 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 e1486d94af..746b0ab655 100755
--- 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
@@ -1272,6 +1272,27 @@ void updateLayout (boolean resize, boolean all) {
}
}
+void updateOrientation () {
+ Control [] controls = _getChildren ();
+ RECT [] rects = new RECT [controls.length];
+ for (int i=0; i<controls.length; i++) {
+ Control control = controls [i];
+ RECT rect = rects [i] = new RECT();
+ control.forceResize ();
+ OS.GetWindowRect (control.topHandle (), rect);
+ OS.MapWindowPoints (0, handle, rect, 2);
+ }
+ int orientation = style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+ super.updateOrientation ();
+ for (int i=0; i<controls.length; i++) {
+ Control control = controls [i];
+ RECT rect = rects [i];
+ control.setOrientation (orientation);
+ int flags = OS.SWP_NOSIZE | OS.SWP_NOZORDER | OS.SWP_NOACTIVATE;
+ SetWindowPos (control.topHandle (), 0, rect.left, rect.top, 0, 0, flags);
+ }
+}
+
void updateUIState () {
int /*long*/ hwndShell = getShell ().handle;
int uiState = /*64*/(int)OS.SendMessage (hwndShell, OS.WM_QUERYUISTATE, 0, 0);