Mercurial > projects > dwt-win
comparison dwt/widgets/MenuItem.d @ 117:25f88bf5a6df
Only one file was damaged
Backed out changeset 640928daee8c
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 11 Feb 2008 04:18:24 +0100 |
parents | 640928daee8c |
children | ab60f3309436 |
comparison
equal
deleted
inserted
replaced
115:640928daee8c | 117:25f88bf5a6df |
---|---|
359 * | 359 * |
360 * @since 3.1 | 360 * @since 3.1 |
361 */ | 361 */ |
362 /*public*/ Rectangle getBounds () { | 362 /*public*/ Rectangle getBounds () { |
363 checkWidget (); | 363 checkWidget (); |
364 if (OS.IsWinCE) return new Rectangle (0, 0, 0, 0); | 364 static if (OS.IsWinCE) return new Rectangle (0, 0, 0, 0); |
365 int index = parent.indexOf (this); | 365 int index = parent.indexOf (this); |
366 if (index is -1) return new Rectangle (0, 0, 0, 0); | 366 if (index is -1) return new Rectangle (0, 0, 0, 0); |
367 if ((parent.style & DWT.BAR) !is 0) { | 367 if ((parent.style & DWT.BAR) !is 0) { |
368 Decorations shell = parent.parent; | 368 Decorations shell = parent.parent; |
369 if (shell.menuBar !is parent) { | 369 if (shell.menuBar !is parent) { |
431 auto hMenu = parent.handle; | 431 auto hMenu = parent.handle; |
432 MENUITEMINFO info; | 432 MENUITEMINFO info; |
433 info.cbSize = MENUITEMINFO.sizeof; | 433 info.cbSize = MENUITEMINFO.sizeof; |
434 info.fMask = OS.MIIM_STATE; | 434 info.fMask = OS.MIIM_STATE; |
435 bool success; | 435 bool success; |
436 if (OS.IsWinCE) { | 436 static if (OS.IsWinCE) { |
437 int index = parent.indexOf (this); | 437 int index = parent.indexOf (this); |
438 if (index is -1) error (DWT.ERROR_CANNOT_GET_ENABLED); | 438 if (index is -1) error (DWT.ERROR_CANNOT_GET_ENABLED); |
439 success = cast(bool) OS.GetMenuItemInfo (hMenu, index, true, &info); | 439 success = cast(bool) OS.GetMenuItemInfo (hMenu, index, true, &info); |
440 } else { | 440 } else { |
441 success = cast(bool) OS.GetMenuItemInfo (hMenu, id, false, &info); | 441 success = cast(bool) OS.GetMenuItemInfo (hMenu, id, false, &info); |