comparison dwt/widgets/CoolBar.d @ 213:36f5cb12e1a2

Update to SWT 3.4M7
author Frank Benoit <benoit@tionex.de>
date Sat, 17 May 2008 17:34:28 +0200
parents ab60f3309436
children 43b41c7fe84a
comparison
equal deleted inserted replaced
212:ab60f3309436 213:36f5cb12e1a2
1100 * not running the default window proc or the rebar window 1100 * not running the default window proc or the rebar window
1101 * proc. 1101 * proc.
1102 */ 1102 */
1103 if (OS.COMCTL32_MAJOR >= 6) return LRESULT.ZERO; 1103 if (OS.COMCTL32_MAJOR >= 6) return LRESULT.ZERO;
1104 Rectangle rect = getBounds (); 1104 Rectangle rect = getBounds ();
1105 int code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam); 1105 int /*long*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
1106 OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam); 1106 OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
1107 if ( rect != getBounds ()) { 1107 if ( rect != getBounds ()) {
1108 parent.redraw (rect.x, rect.y, rect.width, rect.height, true); 1108 parent.redraw (rect.x, rect.y, rect.width, rect.height, true);
1109 } 1109 }
1110 return new LRESULT (code); 1110 return new LRESULT (code);
1111 } 1111 }
1112 1112
1113 override LRESULT WM_SIZE (int wParam, int lParam) { 1113 override LRESULT WM_SIZE (int wParam, int lParam) {
1114 if (ignoreResize) { 1114 if (ignoreResize) {
1115 int code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam); 1115 int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
1116 if (code is 0) return LRESULT.ZERO; 1116 if (code is 0) return LRESULT.ZERO;
1117 return new LRESULT (code); 1117 return new LRESULT (code);
1118 } 1118 }
1119 //TEMPORARY CODE 1119 //TEMPORARY CODE
1120 // if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) { 1120 // if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
1128 override LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) { 1128 override LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) {
1129 switch (hdr.code) { 1129 switch (hdr.code) {
1130 case OS.RBN_BEGINDRAG: { 1130 case OS.RBN_BEGINDRAG: {
1131 int pos = OS.GetMessagePos (); 1131 int pos = OS.GetMessagePos ();
1132 POINT pt; 1132 POINT pt;
1133 pt.x = cast(short) (pos & 0xFFFF); 1133 OS.POINTSTOPOINT (pt, pos);
1134 pt.y = cast(short) (pos >> 16);
1135 OS.ScreenToClient (handle, &pt); 1134 OS.ScreenToClient (handle, &pt);
1136 int button = display.lastButton !is 0 ? display.lastButton : 1; 1135 int button = display.lastButton !is 0 ? display.lastButton : 1;
1137 if (!sendDragEvent (button, pt.x, pt.y)) return LRESULT.ONE; 1136 if (!sendDragEvent (button, pt.x, pt.y)) return LRESULT.ONE;
1138 break; 1137 break;
1139 } 1138 }