Mercurial > projects > dwt-win
comparison dwt/widgets/Tree.d @ 263:27244095ce14
Fix struct sizes, based on a comparison to the values seen by C apps.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 26 Jul 2008 02:08:41 +0200 |
parents | b3dbd786541a |
children | 4289aa6cbc0c |
comparison
equal
deleted
inserted
replaced
262:59f6b9f052ff | 263:27244095ce14 |
---|---|
2078 /* Add the tool tip item for the header */ | 2078 /* Add the tool tip item for the header */ |
2079 if (headerToolTipHandle !is null) { | 2079 if (headerToolTipHandle !is null) { |
2080 RECT rect; | 2080 RECT rect; |
2081 if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, &rect) !is 0) { | 2081 if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, &rect) !is 0) { |
2082 TOOLINFO lpti; | 2082 TOOLINFO lpti; |
2083 lpti.cbSize = TOOLINFO.sizeof; | 2083 lpti.cbSize = OS.TOOLINFO_sizeof; |
2084 lpti.uFlags = OS.TTF_SUBCLASS; | 2084 lpti.uFlags = OS.TTF_SUBCLASS; |
2085 lpti.hwnd = hwndHeader; | 2085 lpti.hwnd = hwndHeader; |
2086 lpti.uId = column.id = display.nextToolTipId++; | 2086 lpti.uId = column.id = display.nextToolTipId++; |
2087 lpti.rect.left = rect.left; | 2087 lpti.rect.left = rect.left; |
2088 lpti.rect.top = rect.top; | 2088 lpti.rect.top = rect.top; |
2247 OS.GetModuleHandle (null), | 2247 OS.GetModuleHandle (null), |
2248 null); | 2248 null); |
2249 if (itemToolTipHandle is null) error (DWT.ERROR_NO_HANDLES); | 2249 if (itemToolTipHandle is null) error (DWT.ERROR_NO_HANDLES); |
2250 OS.SendMessage (itemToolTipHandle, OS.TTM_SETDELAYTIME, OS.TTDT_INITIAL, 0); | 2250 OS.SendMessage (itemToolTipHandle, OS.TTM_SETDELAYTIME, OS.TTDT_INITIAL, 0); |
2251 TOOLINFO lpti; | 2251 TOOLINFO lpti; |
2252 lpti.cbSize = TOOLINFO.sizeof; | 2252 lpti.cbSize = OS.TOOLINFO_sizeof; |
2253 lpti.hwnd = handle; | 2253 lpti.hwnd = handle; |
2254 lpti.uId = cast(int)handle; | 2254 lpti.uId = cast(int)handle; |
2255 lpti.uFlags = OS.TTF_SUBCLASS | OS.TTF_TRANSPARENT; | 2255 lpti.uFlags = OS.TTF_SUBCLASS | OS.TTF_TRANSPARENT; |
2256 lpti.lpszText = OS.LPSTR_TEXTCALLBACK; | 2256 lpti.lpszText = OS.LPSTR_TEXTCALLBACK; |
2257 OS.SendMessage (itemToolTipHandle, OS.TTM_ADDTOOL, 0, &lpti); | 2257 OS.SendMessage (itemToolTipHandle, OS.TTM_ADDTOOL, 0, &lpti); |
2563 } | 2563 } |
2564 | 2564 |
2565 /* Remove the tool tip item for the header */ | 2565 /* Remove the tool tip item for the header */ |
2566 if (headerToolTipHandle !is null) { | 2566 if (headerToolTipHandle !is null) { |
2567 TOOLINFO lpti; | 2567 TOOLINFO lpti; |
2568 lpti.cbSize = TOOLINFO.sizeof; | 2568 lpti.cbSize = OS.TOOLINFO_sizeof; |
2569 lpti.uId = column.id; | 2569 lpti.uId = column.id; |
2570 lpti.hwnd = hwndHeader; | 2570 lpti.hwnd = hwndHeader; |
2571 OS.SendMessage (headerToolTipHandle, OS.TTM_DELTOOL, 0, &lpti); | 2571 OS.SendMessage (headerToolTipHandle, OS.TTM_DELTOOL, 0, &lpti); |
2572 } | 2572 } |
2573 } | 2573 } |
5464 | 5464 |
5465 void updateHeaderToolTips () { | 5465 void updateHeaderToolTips () { |
5466 if (headerToolTipHandle is null) return; | 5466 if (headerToolTipHandle is null) return; |
5467 RECT rect; | 5467 RECT rect; |
5468 TOOLINFO lpti; | 5468 TOOLINFO lpti; |
5469 lpti.cbSize = TOOLINFO.sizeof; | 5469 lpti.cbSize = OS.TOOLINFO_sizeof; |
5470 lpti.uFlags = OS.TTF_SUBCLASS; | 5470 lpti.uFlags = OS.TTF_SUBCLASS; |
5471 lpti.hwnd = hwndHeader; | 5471 lpti.hwnd = hwndHeader; |
5472 lpti.lpszText = OS.LPSTR_TEXTCALLBACK; | 5472 lpti.lpszText = OS.LPSTR_TEXTCALLBACK; |
5473 for (int i=0; i<columnCount; i++) { | 5473 for (int i=0; i<columnCount; i++) { |
5474 TreeColumn column = columns [i]; | 5474 TreeColumn column = columns [i]; |
6688 if (OS.IsWindowVisible (itemToolTipHandle)) { | 6688 if (OS.IsWindowVisible (itemToolTipHandle)) { |
6689 OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE); | 6689 OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE); |
6690 } | 6690 } |
6691 } | 6691 } |
6692 TOOLINFO lpti; | 6692 TOOLINFO lpti; |
6693 lpti.cbSize = TOOLINFO.sizeof; | 6693 lpti.cbSize = OS.TOOLINFO_sizeof; |
6694 lpti.hwnd = handle; | 6694 lpti.hwnd = handle; |
6695 lpti.uId = cast(int) handle; | 6695 lpti.uId = cast(int) handle; |
6696 lpti.uFlags = OS.TTF_SUBCLASS | OS.TTF_TRANSPARENT; | 6696 lpti.uFlags = OS.TTF_SUBCLASS | OS.TTF_TRANSPARENT; |
6697 lpti.rect.left = cellRect.left; | 6697 lpti.rect.left = cellRect.left; |
6698 lpti.rect.top = cellRect.top; | 6698 lpti.rect.top = cellRect.top; |
7730 if (!OS.IsWinCE && OS.WIN32_VERSION < OS.VERSION (6, 0)) { | 7730 if (!OS.IsWinCE && OS.WIN32_VERSION < OS.VERSION (6, 0)) { |
7731 OS.SetTextColor (nmcd.nmcd.hdc, OS.GetSysColor (OS.COLOR_INFOTEXT)); | 7731 OS.SetTextColor (nmcd.nmcd.hdc, OS.GetSysColor (OS.COLOR_INFOTEXT)); |
7732 } | 7732 } |
7733 if (OS.SendMessage (itemToolTipHandle, OS.TTM_GETCURRENTTOOL, 0, 0) !is 0) { | 7733 if (OS.SendMessage (itemToolTipHandle, OS.TTM_GETCURRENTTOOL, 0, 0) !is 0) { |
7734 TOOLINFO lpti; | 7734 TOOLINFO lpti; |
7735 lpti.cbSize = TOOLINFO.sizeof; | 7735 lpti.cbSize = OS.TOOLINFO_sizeof; |
7736 if (OS.SendMessage (itemToolTipHandle, OS.TTM_GETCURRENTTOOL, 0, cast(int)&lpti) !is 0) { | 7736 if (OS.SendMessage (itemToolTipHandle, OS.TTM_GETCURRENTTOOL, 0, cast(int)&lpti) !is 0) { |
7737 int index; | 7737 int index; |
7738 TreeItem item; | 7738 TreeItem item; |
7739 RECT* cellRect, itemRect; | 7739 RECT* cellRect, itemRect; |
7740 int pos = OS.GetMessagePos (); | 7740 int pos = OS.GetMessagePos (); |