Browse Source

FL: Remove now unnecessary override of mousewheel behavior in Fl_Value_SliderX

tags/non-daw-v1.2.0
Jonathan Moore Liles 9 years ago
parent
commit
c2bf264120
3 changed files with 1 additions and 53 deletions
  1. +0
    -51
      FL/Fl_Value_SliderX.C
  2. +0
    -1
      FL/Fl_Value_SliderX.H
  3. +1
    -1
      lib/ntk

+ 0
- 51
FL/Fl_Value_SliderX.C 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 );
}

+ 0
- 1
FL/Fl_Value_SliderX.H View File

@@ -53,6 +53,5 @@ public:

virtual ~Fl_Value_SliderX() { }

virtual int handle ( int m );
virtual void draw ( void );
};

+ 1
- 1
lib/ntk

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

Loading…
Cancel
Save