diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-02 20:09:25 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-02 20:09:25 +0000 |
| commit | 2d3fd88eeb985c2d4cdb9659767fd0d970631ce8 (patch) | |
| tree | fbe45b470d4eb1079578a0877cebfddf2d4c7d03 /src/Fl_win32.cxx | |
| parent | 9d81d971f7861da5f558ecd797cf0aa575288dc9 (diff) | |
More mouse wheel stuff (as compatible as possible with the 2.0 code...)
Updated the makefile to use config.status --recheck before calling
config.status (why they can't provide one that does both, I don't
know...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1540 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 3fe4f4ec5..e6d97dd7c 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx,v 1.33.2.37 2001/04/27 15:43:38 easysw Exp $" +// "$Id: Fl_win32.cxx,v 1.33.2.37.2.1 2001/08/02 20:09:25 easysw Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -58,6 +58,14 @@ # define WM_MOUSELEAVE 0x02a3 #endif +#ifndef WM_MOUSEWHEEL +# define WM_MOUSEWHEEL 0x020a +#endif + +#ifndef WHEEL_DELTA +# define WHEEL_DELTA 120 // according to MSDN. +#endif + // // WM_FLSELECT is the user-defined message that we get when one of // the sockets has pending data, etc. @@ -581,6 +589,15 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar if (Fl::handle(FL_KEYBOARD,window)) return 0; break;} + case WM_MOUSEWHEEL: { + static int delta = 0; // running total of all motion + delta += (SHORT)(HIWORD(wParam)); + Fl::e_dy = delta / WHEEL_DELTA; + delta -= Fl::e_dy * WHEEL_DELTA; + if (Fl::e_dy) Fl::handle(FL_MOUSEWHEEL, window); + return 0; + } + case WM_GETMINMAXINFO: Fl_X::i(window)->set_minmax((LPMINMAXINFO)lParam); break; @@ -974,5 +991,5 @@ void Fl_Window::make_current() { } // -// End of "$Id: Fl_win32.cxx,v 1.33.2.37 2001/04/27 15:43:38 easysw Exp $". +// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.1 2001/08/02 20:09:25 easysw Exp $". // |
