FL: Remove now unnecessary override of mousewheel behavior in Fl_Value_SliderX

pull/43/head
Jonathan Moore Liles 2013-02-04 22:18:18 -08:00
parent 94d55bd4e1
commit c2bf264120
3 changed files with 1 additions and 53 deletions

View File

@ -55,54 +55,3 @@ Fl_Value_SliderX::draw ( void )
Fl_Value_Slider::draw();
}
int
Fl_Value_SliderX::handle ( int m )
{
/* Fl_Value_Slider and friends should really handle mousewheel, but they don't in FTLK1 */
switch ( m )
{
case FL_MOUSEWHEEL:
{
if ( this != Fl::belowmouse() )
return 0;
int steps = 16;
if ( Fl::event_ctrl() )
steps = 128;
float step = fabs( maximum() - minimum() ) / (float)steps;
float d = ((float)Fl::event_dy()) * step;
double v = value() + d;
if ( maximum() > minimum() )
{
if ( v < minimum() )
v = minimum();
else if ( v > maximum() )
v = maximum();
}
else
{
if ( v > minimum() )
v = minimum();
else if ( v < maximum() )
v = maximum();
}
value( v );
do_callback();
return 1;
}
}
return Fl_Value_Slider::handle( m );
}

View File

@ -53,6 +53,5 @@ public:
virtual ~Fl_Value_SliderX() { }
virtual int handle ( int m );
virtual void draw ( void );
};

@ -1 +1 @@
Subproject commit 37a2409bd983cc467016395c3e93e4a592e3985c
Subproject commit 7d4ce9ed0a3e30c59d6b767455bf51009e353a3e