Mercurial > projects > dwt-win
comparison dwt/widgets/Shell.d @ 212:ab60f3309436
reverted the char[] to String and use the an alias.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:12:38 +0200 |
parents | 07ed83d51a19 |
children | 36f5cb12e1a2 |
comparison
equal
deleted
inserted
replaced
211:ff59aeb96cac | 212:ab60f3309436 |
---|---|
146 HANDLE toolTipHandle_; | 146 HANDLE toolTipHandle_; |
147 HANDLE balloonTipHandle_; | 147 HANDLE balloonTipHandle_; |
148 int minWidth = DWT.DEFAULT, minHeight = DWT.DEFAULT; | 148 int minWidth = DWT.DEFAULT, minHeight = DWT.DEFAULT; |
149 HBRUSH [] brushes; | 149 HBRUSH [] brushes; |
150 bool showWithParent; | 150 bool showWithParent; |
151 char[] toolTitle, balloonTitle; | 151 String toolTitle, balloonTitle; |
152 HICON toolIcon; | 152 HICON toolIcon; |
153 HICON balloonIcon; | 153 HICON balloonIcon; |
154 WNDPROC windowProc_; | 154 WNDPROC windowProc_; |
155 Control lastActive, lockToolTipControl; | 155 Control lastActive, lockToolTipControl; |
156 static if( OS.IsWinCE ){ | 156 static if( OS.IsWinCE ){ |
799 } | 799 } |
800 | 800 |
801 void fixShell (Shell newShell, Control control) { | 801 void fixShell (Shell newShell, Control control) { |
802 if (this is newShell) return; | 802 if (this is newShell) return; |
803 if (control is lastActive) setActiveControl (null); | 803 if (control is lastActive) setActiveControl (null); |
804 char[] toolTipText = control.toolTipText_; | 804 String toolTipText = control.toolTipText_; |
805 if (toolTipText !is null) { | 805 if (toolTipText !is null) { |
806 control.setToolTipText (this, null); | 806 control.setToolTipText (this, null); |
807 control.setToolTipText (newShell, toolTipText); | 807 control.setToolTipText (newShell, toolTipText); |
808 } | 808 } |
809 } | 809 } |
1500 } | 1500 } |
1501 OS.SetWindowRgn (handle, hRegion, true); | 1501 OS.SetWindowRgn (handle, hRegion, true); |
1502 this.region = region; | 1502 this.region = region; |
1503 } | 1503 } |
1504 | 1504 |
1505 void setToolTipText (HWND hwnd, char[] text) { | 1505 void setToolTipText (HWND hwnd, String text) { |
1506 static if (OS.IsWinCE) return; | 1506 static if (OS.IsWinCE) return; |
1507 TOOLINFO lpti; | 1507 TOOLINFO lpti; |
1508 lpti.cbSize = TOOLINFO.sizeof; | 1508 lpti.cbSize = TOOLINFO.sizeof; |
1509 lpti.hwnd = handle; | 1509 lpti.hwnd = handle; |
1510 lpti.uId = cast(uint) hwnd; | 1510 lpti.uId = cast(uint) hwnd; |
1553 lpstrTip = cast(TCHAR*)OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount); | 1553 lpstrTip = cast(TCHAR*)OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount); |
1554 OS.MoveMemory (lpstrTip, charz.ptr, byteCount); | 1554 OS.MoveMemory (lpstrTip, charz.ptr, byteCount); |
1555 lpnmtdi.lpszText = lpstrTip; | 1555 lpnmtdi.lpszText = lpstrTip; |
1556 } | 1556 } |
1557 | 1557 |
1558 void setToolTipTitle (HWND hwndToolTip, char[] text, HICON icon) { | 1558 void setToolTipTitle (HWND hwndToolTip, String text, HICON icon) { |
1559 /* | 1559 /* |
1560 * Bug in Windows. For some reason, when TTM_SETTITLE | 1560 * Bug in Windows. For some reason, when TTM_SETTITLE |
1561 * is used to set the title of a tool tip, Windows leaks | 1561 * is used to set the title of a tool tip, Windows leaks |
1562 * GDI objects. This happens even when TTM_SETTITLE is | 1562 * GDI objects. This happens even when TTM_SETTITLE is |
1563 * called with TTI_NONE and NULL. The documentation | 1563 * called with TTI_NONE and NULL. The documentation |
1764 } | 1764 } |
1765 if ((style & DWT.ON_TOP) !is 0) bits |= OS.WS_EX_TOPMOST; | 1765 if ((style & DWT.ON_TOP) !is 0) bits |= OS.WS_EX_TOPMOST; |
1766 return bits; | 1766 return bits; |
1767 } | 1767 } |
1768 | 1768 |
1769 override char[] windowClass () { | 1769 override String windowClass () { |
1770 static if (OS.IsSP) return DialogClass; | 1770 static if (OS.IsSP) return DialogClass; |
1771 if ((style & DWT.TOOL) !is 0) { | 1771 if ((style & DWT.TOOL) !is 0) { |
1772 int trim = DWT.TITLE | DWT.CLOSE | DWT.MIN | DWT.MAX | DWT.BORDER | DWT.RESIZE; | 1772 int trim = DWT.TITLE | DWT.CLOSE | DWT.MIN | DWT.MAX | DWT.BORDER | DWT.RESIZE; |
1773 if ((style & trim) is 0) return TCHARsToStr( display.windowShadowClass ); | 1773 if ((style & trim) is 0) return TCHARsToStr( display.windowShadowClass ); |
1774 } | 1774 } |