diff options
author | Felipe Heidrich <fheidric> | 2010-12-23 19:03:29 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2010-12-23 19:03:29 +0000 |
commit | e1ddb07c7c0cc45210739f25c19adbd93ffa639d (patch) | |
tree | e86a3ee5e0dbe8ad0879c9dabcb511e901373a07 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java | |
parent | b13cb0959e0afe3c17aa178a3bca80d7d1fd22d7 (diff) | |
download | eclipse.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-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java | 21 |
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); |