summaryrefslogtreecommitdiff
path: root/src/Fl_Browser_.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-08-02 21:11:43 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-08-02 21:11:43 +0000
commit85533d11be0b32799d1baf343a13a633cb041ea2 (patch)
tree0925f1dd1abc26883357d0be4693f94b0f394226 /src/Fl_Browser_.cxx
parentaf75829757e1dba0ed23aef7ff165cf80c3766b6 (diff)
Fix mouse wheel stuff for browser and helpview widgets (move 3 lines at
a time...) Fl_Group::handle() now sends unknown events to the focus widget first, then to any other child that will take it... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1542 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Browser_.cxx')
-rw-r--r--src/Fl_Browser_.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx
index 4ae26e785..68ce30eae 100644
--- a/src/Fl_Browser_.cxx
+++ b/src/Fl_Browser_.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.1 2001/08/02 20:18:54 easysw Exp $"
+// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.2 2001/08/02 21:11:43 easysw Exp $"
//
// Base Browser widget class for the Fast Light Tool Kit (FLTK).
//
@@ -551,9 +551,13 @@ int Fl_Browser_::handle(int event) {
static char whichway;
static int py;
switch (event) {
- case FL_MOUSEWHEEL:
- position(position() + Fl::e_dy * incr_height());
+ case FL_MOUSEWHEEL: {
+ int i = position() + Fl::e_dy * incr_height() * 3;
+ if (i < 0) i = 0;
+ else if (i > (full_height() - h())) i = full_height() - h();
+ position(i);
return (1);
+ }
case FL_PUSH:
if (!Fl::event_inside(X, Y, W, H)) return 0;
@@ -711,5 +715,5 @@ void Fl_Browser_::item_select(void*, int) {}
int Fl_Browser_::item_selected(void* l) const {return l==selection_;}
//
-// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.1 2001/08/02 20:18:54 easysw Exp $".
+// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.2 2001/08/02 21:11:43 easysw Exp $".
//