Mercurial > projects > dwt-win
comparison dwt/widgets/Scrollable.d @ 331:27479f54069d
Removed trace outputs.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 27 Jan 2009 10:40:55 +0100 |
parents | fd9c62a2998e |
children |
comparison
equal
deleted
inserted
replaced
330:f980ea238e72 | 331:27479f54069d |
---|---|
25 import dwt.widgets.Event; | 25 import dwt.widgets.Event; |
26 import dwt.widgets.ScrollBar; | 26 import dwt.widgets.ScrollBar; |
27 import dwt.widgets.Widget; | 27 import dwt.widgets.Widget; |
28 | 28 |
29 import dwt.dwthelper.utils; | 29 import dwt.dwthelper.utils; |
30 //import tango.util.log.Trace; | |
31 void trc( long line ){ | |
32 //Trace.formatln( "Scrollable {}", line ); | |
33 } | |
34 | 30 |
35 /** | 31 /** |
36 * This class is the abstract superclass of all classes which | 32 * This class is the abstract superclass of all classes which |
37 * represent controls that have standard scroll bars. | 33 * represent controls that have standard scroll bars. |
38 * <dl> | 34 * <dl> |
277 override int windowProc () { | 273 override int windowProc () { |
278 return display.windowProc; | 274 return display.windowProc; |
279 } | 275 } |
280 | 276 |
281 override LRESULT WM_HSCROLL (int wParam, int lParam) { | 277 override LRESULT WM_HSCROLL (int wParam, int lParam) { |
282 trc(__LINE__); | |
283 LRESULT result = super.WM_HSCROLL (wParam, lParam); | 278 LRESULT result = super.WM_HSCROLL (wParam, lParam); |
284 if (result !is null) return result; | 279 if (result !is null) return result; |
285 | 280 |
286 /* | 281 /* |
287 * Bug on WinCE. lParam should be NULL when the message is not sent | 282 * Bug on WinCE. lParam should be NULL when the message is not sent |
295 } | 290 } |
296 return result; | 291 return result; |
297 } | 292 } |
298 | 293 |
299 override LRESULT WM_MOUSEWHEEL (int wParam, int lParam) { | 294 override LRESULT WM_MOUSEWHEEL (int wParam, int lParam) { |
300 trc(__LINE__); | |
301 int scrollRemainder = display.scrollRemainder; | 295 int scrollRemainder = display.scrollRemainder; |
302 LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam); | 296 LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam); |
303 if (result !is null) return result; | 297 if (result !is null) return result; |
304 /* | 298 /* |
305 * Translate WM_MOUSEWHEEL to WM_VSCROLL or WM_HSCROLL. | 299 * Translate WM_MOUSEWHEEL to WM_VSCROLL or WM_HSCROLL. |
375 } | 369 } |
376 return new LRESULT (code); | 370 return new LRESULT (code); |
377 } | 371 } |
378 | 372 |
379 override LRESULT WM_SIZE (int wParam, int lParam) { | 373 override LRESULT WM_SIZE (int wParam, int lParam) { |
380 trc(__LINE__); | |
381 int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam); | 374 int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam); |
382 super.WM_SIZE (wParam, lParam); | 375 super.WM_SIZE (wParam, lParam); |
383 // widget may be disposed at this point | 376 // widget may be disposed at this point |
384 if (code is 0) return LRESULT.ZERO; | 377 if (code is 0) return LRESULT.ZERO; |
385 return new LRESULT (code); | 378 return new LRESULT (code); |
386 } | 379 } |
387 | 380 |
388 override LRESULT WM_VSCROLL (int wParam, int lParam) { | 381 override LRESULT WM_VSCROLL (int wParam, int lParam) { |
389 trc(__LINE__); | |
390 LRESULT result = super.WM_VSCROLL (wParam, lParam); | 382 LRESULT result = super.WM_VSCROLL (wParam, lParam); |
391 if (result !is null) return result; | 383 if (result !is null) return result; |
392 /* | 384 /* |
393 * Bug on WinCE. lParam should be NULL when the message is not sent | 385 * Bug on WinCE. lParam should be NULL when the message is not sent |
394 * by a scroll bar control, but it contains the handle to the window. | 386 * by a scroll bar control, but it contains the handle to the window. |