diff --git a/src/avtk/avtk_box.h b/src/avtk/avtk_box.h index 69bae61..4efe59f 100644 --- a/src/avtk/avtk_box.h +++ b/src/avtk/avtk_box.h @@ -106,55 +106,6 @@ class Box : public Fl_Widget h = H; redraw(); } - - /* - int handle(int event) - { - - switch(event) - { - case FL_PUSH: - if ( Fl::event_state(FL_BUTTON3) && Fl::event_y() < y + 20 ) - { - const char* name = fl_input( "Track name: ", "" ); - if ( name ) - { - free( (char*) label ); - label = strdup( name ); - redraw(); - } - return 1; - } - - redraw(); - return 1; - case FL_DRAG: { - int t = Fl::event_inside(this); - if (t != highlight) { - redraw(); - } - } - return 1; - case FL_RELEASE: - if (highlight) { - highlight = 0; - redraw(); - do_callback(); - } - return 1; - case FL_SHORTCUT: - if ( test_shortcut() ) - { - do_callback(); - return 1; - } - return 0; - default: - return Fl_Widget::handle(event); - } - - } - */ }; } // Avtk diff --git a/src/avtk/avtk_image.h b/src/avtk/avtk_image.h index b6a01a2..c73b398 100644 --- a/src/avtk/avtk_image.h +++ b/src/avtk/avtk_image.h @@ -85,17 +85,6 @@ class Image : public Fl_Widget x = gui->getWindowWidth() - w; } - /* - Fl_Widget::resize(X,Y,W,H); - - - x = X; - y = Y; - w = W; - h = H; - */ - - redraw(); } diff --git a/src/avtk/avtk_sidechain_gain.h b/src/avtk/avtk_sidechain_gain.h index b2b283d..5c11d95 100644 --- a/src/avtk/avtk_sidechain_gain.h +++ b/src/avtk/avtk_sidechain_gain.h @@ -165,55 +165,6 @@ class SidechainGain : public Fl_Slider cairo_line_to( cr, x + w, y + h * 0.25 + h/2 * _release ); cairo_set_source_rgba( cr, 1.0, 0.0, 0.f , 1 ); cairo_stroke( cr ); - /* - float makeupGainPx = makeupGain * h * 0.5; - - float xDist = 0.1 * w; - float yDist = 0.1 * h; - - float xThresh = x + (w * 0.25) + (w*0.5) * threshVal; - float yThresh = y + (h * 0.25) + (h*0.5)*(1-threshVal); - - float startx = xThresh - xDist; - float starty = yThresh + yDist; - - float cp1x = xThresh; - float cp1y = yThresh - makeupGainPx; - - float cp2x = xThresh; - float cp2y = yThresh - makeupGainPx; - - float endx = xThresh + (xDist*1.2); - float endy = yThresh - (yDist*1.2)*(1-ratioVal) - makeupGainPx; - - // normal line (greyed) - cairo_move_to( cr, x , y + h ); - cairo_line_to( cr, x + w, y ); - cairo_set_source_rgba( cr, 66 / 255.f, 66 / 255.f , 66 / 255.f , 0.5 ); - cairo_set_line_width(cr, 1.4); - cairo_stroke( cr ); - - cairo_move_to( cr, x , y + h - makeupGainPx ); - cairo_line_to( cr, startx, starty - makeupGainPx ); - - // draw curve - cairo_curve_to( cr, cp1x, cp1y, cp2x, cp2y, endx, endy ); - - cairo_line_to( cr, x + w, y + (h/4)*ratioVal + (h)*(1-threshVal)*(0.5*ratioVal) - makeupGainPx ); - - cairo_line_to( cr, x + w, y + h ); - cairo_line_to( cr, x , y + h ); - cairo_close_path(cr); - - cairo_set_source_rgba( cr, 0 / 255.f, 153 / 255.f , 255 / 255.f , 0.21 ); - cairo_fill_preserve(cr); - - cairo_set_source_rgba( cr, 0 / 255.f, 153 / 255.f , 255 / 255.f , 1 ); - cairo_set_line_width(cr, 1.5); - cairo_set_line_join( cr, CAIRO_LINE_JOIN_ROUND); - cairo_set_line_cap ( cr, CAIRO_LINE_CAP_ROUND); - cairo_stroke( cr ); - */ // stroke outline cairo_rectangle(cr, x, y, w, h); @@ -251,77 +202,7 @@ class SidechainGain : public Fl_Slider } int handle(int event) - { - /* - switch(event) - { - case FL_PUSH: - highlight = 0; - mouseRightClicked = false; - if ( Fl::event_button() == FL_RIGHT_MOUSE ) - { - active = !active; - redraw(); - mouseRightClicked = true; - do_callback(); - } - return 1; - case FL_DRAG: - { - if ( Fl::event_state(FL_BUTTON1) ) - { - if ( mouseClicked == false ) // catch the "click" event - { - mouseClickedX = Fl::event_x(); - mouseClickedY = Fl::event_y(); - mouseClicked = true; - } - - float deltaX = mouseClickedX - Fl::event_x(); - float deltaY = mouseClickedY - Fl::event_y(); - - float valX = value(); - valX -= deltaX / 100.f; - float valY = makeupGain; - valY += deltaY / 100.f; - - if ( valX > 1.0 ) valX = 1.0; - if ( valX < 0.0 ) valX = 0.0; - - if ( valY > 1.0 ) valY = 1.0; - if ( valY < 0.0 ) valY = 0.0; - - //handle_drag( value + deltaY ); - set_value( valX ); - makeupGain = valY; - - mouseClickedX = Fl::event_x(); - mouseClickedY = Fl::event_y(); - redraw(); - do_callback(); - } - } - return 1; - case FL_RELEASE: - mouseRightClicked = false; - if (highlight) { - highlight = 0; - redraw(); - do_callback(); - } - mouseClicked = false; - return 1; - case FL_SHORTCUT: - if ( test_shortcut() ) - { - do_callback(); - return 1; - } - return 0; - default: - return Fl_Widget::handle(event); - } - */ + { //TODO needed? return 0; } diff --git a/src/avtk/bindings.cxx b/src/avtk/bindings.cxx index ab731e3..3835849 100644 --- a/src/avtk/bindings.cxx +++ b/src/avtk/bindings.cxx @@ -155,67 +155,4 @@ void Bindings::resize(int X, int Y, int W, int H) redraw(); } -/* -int Bindings::handle(int event) -{ - switch(event) - { - case FL_PUSH: - highlight = 0; - redraw(); - return 1; - case FL_DRAG: - { - if ( Fl::event_state(FL_BUTTON1) ) - { - if ( mouseClicked == false ) // catch the "click" event - { - mouseClickedX = Fl::event_x(); - mouseClickedY = Fl::event_y(); - mouseClicked = true; - } - - float delta = (mouseClickedY - Fl::event_y() ) / float(h); - // handle the x / y swap, and the inverting of direction (mouseX / Y relative) - if ( orientationHorizontal ) - delta = ( Fl::event_x() - mouseClickedX ) / float(w); - - float valY = value(); - valY += delta; - - if ( valY > 1.0 ) valY = 1.0; - if ( valY < 0.0 ) valY = 0.0; - - set_value( valY ); - - mouseClickedX = Fl::event_x(); - mouseClickedY = Fl::event_y(); - redraw(); - do_callback(); - } - } - return 1; - case FL_ENTER: - return 1; - case FL_RELEASE: - if (highlight) { - highlight = 0; - redraw(); - do_callback(); - } - mouseClicked = false; - return 1; - case FL_SHORTCUT: - if ( test_shortcut() ) - { - do_callback(); - return 1; - } - return 0; - default: - return Fl_Widget::handle(event); - } -} -*/ - } // namespace Avtk diff --git a/src/controller/genericmidi.cxx b/src/controller/genericmidi.cxx index b8d71f1..e191931 100644 --- a/src/controller/genericmidi.cxx +++ b/src/controller/genericmidi.cxx @@ -601,7 +601,7 @@ void GenericMIDI::setSceneState(int t, int scene, GridLogic::State s) void GenericMIDI::reset() -{ +{//TODO needed? /* unsigned char data[3]; // setup "volume" style rotary display diff --git a/src/gridlogic.cxx b/src/gridlogic.cxx index 2d07d9a..3eb9370 100644 --- a/src/gridlogic.cxx +++ b/src/gridlogic.cxx @@ -215,25 +215,7 @@ void GridLogic::pressed( int track, int scene ) { //LUPPP_NOTE("netralizing & qStop on scene %i due to press on %i", i, scene ); LooperClip* ilc = jack->getLooper( track )->getClip( i ); - /* - if ( ilc->getState() == GridLogic::STATE_EMPTY || - ilc->getState() == GridLogic::STATE_STOPPED ) - { - // pass - } - else if ( ilc->somethingQueued() ) - { - LUPPP_NOTE("netralizing & qStop on scene %i due to press on %i", i, scene ); - ilc->neutralize(); - jack->getControllerUpdater()->setSceneState(track, i, ilc->getState() ); - } - else // catch all others, netralize & stop - { - ilc->neutralize(); - ilc->queueStop(); - jack->getControllerUpdater()->setSceneState(track, i, ilc->getState() ); - } - */ + ilc->neutralize(); ilc->queueStop(); jack->getControllerUpdater()->setSceneState(track, i, ilc->getState() ); diff --git a/src/looper.cxx b/src/looper.cxx index 34d3e9d..27732d7 100644 --- a/src/looper.cxx +++ b/src/looper.cxx @@ -72,7 +72,7 @@ LooperClip* Looper::getClip(int scene) } void Looper::beat() -{ +{//TODO needed? //FIXME: Need to keep looperClips in sync when there exists no int N // such that playSpeed*N==1 // for(int i=0;i