From 85533d11be0b32799d1baf343a13a633cb041ea2 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 2 Aug 2001 21:11:43 +0000 Subject: 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 --- src/Fl_Group.cxx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/Fl_Group.cxx') diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx index db7d1bc43..34b2e692c 100644 --- a/src/Fl_Group.cxx +++ b/src/Fl_Group.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Group.cxx,v 1.8.2.8.2.2 2001/08/02 15:31:59 easysw Exp $" +// "$Id: Fl_Group.cxx,v 1.8.2.8.2.3 2001/08/02 21:11:43 easysw Exp $" // // Group widget for the Fast Light Tool Kit (FLTK). // @@ -189,6 +189,21 @@ int Fl_Group::handle(int event) { Fl_Tooltip::exit(this); // tooltip default: + // For all other events, try to give to each child, starting at focus: + for (i = 0; i < children(); i ++) + if (Fl::focus_ == child(i)) break; + + if (i >= children()) i = 0; + + if (children()) { + for (int j = i;;) { + if (send(child(j), event)) return 1; + j++; + if (j >= children()) j = 0; + if (j == i) break; + } + } + return 0; } @@ -523,5 +538,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& w) const { } // -// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.2 2001/08/02 15:31:59 easysw Exp $". +// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.3 2001/08/02 21:11:43 easysw Exp $". // -- cgit v1.2.3