Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Group.d @ 39:0ecb2b338560
further work on phobosification
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 25 Mar 2009 13:20:43 +0100 |
parents | 2e09b0e6857a |
children |
comparison
equal
deleted
inserted
replaced
38:2e09b0e6857a | 39:0ecb2b338560 |
---|---|
200 } | 200 } |
201 /* | 201 /* |
202 * If the group has text, and the text is wider than the | 202 * If the group has text, and the text is wider than the |
203 * client area, pad the width so the text is not clipped. | 203 * client area, pad the width so the text is not clipped. |
204 */ | 204 */ |
205 TCHAR* buffer = StrToTCHARz (/+getCodePage (),+/ string); | 205 LPCTSTR buffer = StrToTCHARz (/+getCodePage (),+/ string); |
206 HFONT newFont, oldFont; | 206 HFONT newFont, oldFont; |
207 auto hDC = OS.GetDC (handle); | 207 auto hDC = OS.GetDC (handle); |
208 newFont = cast(HFONT) OS.SendMessage (handle, OS.WM_GETFONT, 0, 0); | 208 newFont = cast(HFONT) OS.SendMessage (handle, OS.WM_GETFONT, 0, 0); |
209 if (newFont !is null) oldFont = OS.SelectObject (hDC, newFont); | 209 if (newFont !is null) oldFont = OS.SelectObject (hDC, newFont); |
210 RECT rect; | 210 RECT rect; |
262 * fix is to add a space to both sides of the text. | 262 * fix is to add a space to both sides of the text. |
263 */ | 263 */ |
264 if ((style & SWT.RIGHT_TO_LEFT) !is 0) { | 264 if ((style & SWT.RIGHT_TO_LEFT) !is 0) { |
265 if (OS.COMCTL32_MAJOR < 6 || !OS.IsAppThemed ()) { | 265 if (OS.COMCTL32_MAJOR < 6 || !OS.IsAppThemed ()) { |
266 String string = enabled || text.length is 0 ? text : " " ~ text ~ " "; | 266 String string = enabled || text.length is 0 ? text : " " ~ text ~ " "; |
267 TCHAR* buffer = StrToTCHARz (/+getCodePage (),+/ string); | 267 LPCTSTR buffer = StrToTCHARz (/+getCodePage (),+/ string); |
268 OS.SetWindowText (handle, buffer); | 268 OS.SetWindowText (handle, buffer); |
269 } | 269 } |
270 } | 270 } |
271 } | 271 } |
272 | 272 |
402 if (!OS.IsWindowEnabled (handle)) { | 402 if (!OS.IsWindowEnabled (handle)) { |
403 if (string.length !is 0) string = " " ~ string ~ " "; | 403 if (string.length !is 0) string = " " ~ string ~ " "; |
404 } | 404 } |
405 } | 405 } |
406 } | 406 } |
407 TCHAR* buffer = StrToTCHARz(/+getCodePage (),+/ string); | 407 LPCTSTR buffer = StrToTCHARz(/+getCodePage (),+/ string); |
408 OS.SetWindowText (handle, buffer); | 408 OS.SetWindowText (handle, buffer); |
409 } | 409 } |
410 | 410 |
411 override int widgetStyle () { | 411 override int widgetStyle () { |
412 /* | 412 /* |