Mercurial > projects > dynamin
changeset 30:545af935f201
Remove delta from MouseTurnedEventArgs (Windows-centric).
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 25 Jul 2009 15:27:35 -0500 |
parents | e6843df719a8 |
children | 2a194d52fdb5 |
files | dynamin/gui/events.d dynamin/gui/windows_window.d |
diffstat | 2 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/dynamin/gui/events.d Sat Jul 25 15:25:38 2009 -0500 +++ b/dynamin/gui/events.d Sat Jul 25 15:27:35 2009 -0500 @@ -79,17 +79,11 @@ } /// class MouseTurnedEventArgs : StopEventArgs { - int _delta; double _scrollAmount; public: - this(int delta, double scrollAmount) { - _delta = delta; + this(double scrollAmount) { _scrollAmount = scrollAmount; } - /* - * This is the amount the mouse wheel was turned. - */ - //int delta() { return _delta; } /** * The amount that a control should scroll in response to this event. * In a text control, this is the number of lines to scroll.
--- a/dynamin/gui/windows_window.d Sat Jul 25 15:25:38 2009 -0500 +++ b/dynamin/gui/windows_window.d Sat Jul 25 15:27:35 2009 -0500 @@ -756,7 +756,7 @@ int delta = -cast(short)HIWORD(wParam); auto screenPt = Point(LOWORD(lParam), HIWORD(lParam)); auto des = c.getDescendantAtPoint(c.screenToContent(screenPt)); - scope args = new MouseTurnedEventArgs(delta, delta*scrollLines/120.0); + scope args = new MouseTurnedEventArgs(delta*scrollLines/120.0); des.mouseTurned(args); return 0; case WM_SYSKEYDOWN: