# HG changeset patch # User Frank Benoit # Date 1202676373 -3600 # Node ID 3926f6c95d6f2c444e4deccf76b5a474beb18bcb # Parent 40c02ead0a2cea42776eb904affc57f359616443 Fix: Scrollbar events diff -r 40c02ead0a2c -r 3926f6c95d6f dsss.conf --- a/dsss.conf Sun Feb 10 03:34:55 2008 +0100 +++ b/dsss.conf Sun Feb 10 21:46:13 2008 +0100 @@ -2,6 +2,7 @@ [dwt] type=library +debugflags+=-g -gc -debug [simple.d] diff -r 40c02ead0a2c -r 3926f6c95d6f dwt/widgets/ScrollBar.d --- a/dwt/widgets/ScrollBar.d Sun Feb 10 03:34:55 2008 +0100 +++ b/dwt/widgets/ScrollBar.d Sun Feb 10 21:46:13 2008 +0100 @@ -26,6 +26,10 @@ import dwt.widgets.Scrollable; import dwt.dwthelper.utils; +import tango.util.log.Trace; +void trc( long line ){ + //Trace.formatln( "ScrollBar {}", line ); +} /** * Instances of this class are selectable user interface @@ -895,6 +899,7 @@ } LRESULT wmScrollChild (int wParam, int lParam) { +trc(__LINE__); /* Do nothing when scrolling is ending */ int code = wParam & 0xFFFF; diff -r 40c02ead0a2c -r 3926f6c95d6f dwt/widgets/Scrollable.d --- 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; diff -r 40c02ead0a2c -r 3926f6c95d6f dwt/widgets/Widget.d --- a/dwt/widgets/Widget.d Sun Feb 10 03:34:55 2008 +0100 +++ b/dwt/widgets/Widget.d Sun Feb 10 21:46:13 2008 +0100 @@ -30,6 +30,10 @@ import tango.io.Stdout; import tango.core.Thread; import dwt.dwthelper.utils; +import tango.util.log.Trace; +void trc( long line ){ + //Trace.formatln( "Widget {}", line ); +} /** * This class is the abstract superclass of all user interface objects.