Mercurial > projects > dwt-win
diff dwt/widgets/Scrollable.d @ 104:3926f6c95d6f
Fix: Scrollbar events
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 10 Feb 2008 21:46:13 +0100 |
parents | 43c42c637c9c |
children | 6f75fdfa1bcd |
line wrap: on
line diff
--- a/dwt/widgets/Scrollable.d Sun Feb 10 03:34:55 2008 +0100 +++ b/dwt/widgets/Scrollable.d Sun Feb 10 21:46:13 2008 +0100 @@ -23,6 +23,10 @@ import dwt.internal.win32.OS; import dwt.dwthelper.utils; +import tango.util.log.Trace; +void trc( long line ){ + //Trace.formatln( "Scrollable {}", line ); +} /** * This class is the abstract superclass of all classes which @@ -255,8 +259,9 @@ } override LRESULT WM_HSCROLL (int wParam, int lParam) { +trc(__LINE__); LRESULT result = super.WM_HSCROLL (wParam, lParam); - if (result !is 0) return result; + if (result !is LRESULT.NULL) return result; /* * Bug on WinCE. lParam should be NULL when the message is not sent @@ -272,8 +277,9 @@ } override LRESULT WM_MOUSEWHEEL (int wParam, int lParam) { +trc(__LINE__); LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam); - if (result !is 0) return result; + if (result !is LRESULT.NULL) return result; /* * Translate WM_MOUSEWHEEL to WM_VSCROLL or WM_HSCROLL. @@ -341,7 +347,9 @@ } override LRESULT WM_SIZE (int wParam, int lParam) { +trc(__LINE__); LRESULT code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam); + assert( code !is LRESULT.NULL ); super.WM_SIZE (wParam, lParam); // widget may be disposed at this point if (code is 0) return LRESULT.ZERO; @@ -349,8 +357,9 @@ } override LRESULT WM_VSCROLL (int wParam, int lParam) { +trc(__LINE__); LRESULT result = super.WM_VSCROLL (wParam, lParam); - if (result !is 0) return result; + if (result !is LRESULT.NULL) return result; /* * Bug on WinCE. lParam should be NULL when the message is not sent * by a scroll bar control, but it contains the handle to the window. @@ -365,6 +374,7 @@ } LRESULT wmScroll (ScrollBar bar, bool update, HWND hwnd, int msg, int wParam, int lParam) { +trc(__LINE__); LRESULT result = LRESULT.NULL; if (update) { int type = msg is OS.WM_HSCROLL ? OS.SB_HORZ : OS.SB_VERT;