From f02d8aa43bc129293c5c7eefbc69ec56dcdb6c98 Mon Sep 17 00:00:00 2001 From: Gerald Date: Thu, 10 Nov 2016 23:13:37 +0100 Subject: [PATCH] Added controls for send/return to gui (non-functional) --- src/gtrack.cxx | 34 +++++++++++++++++++++++++--------- src/gtrack.hxx | 6 +++++- src/gui.cxx | 4 ++-- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/gtrack.cxx b/src/gtrack.cxx index 81f2a17..002ec3c 100644 --- a/src/gtrack.cxx +++ b/src/gtrack.cxx @@ -28,6 +28,7 @@ static void gtrack_xsideDial_cb(Fl_Widget *w, void *data); static void gtrack_sendDial_cb(Fl_Widget *w, void *data); static void gtrack_send_cb(Fl_Widget *w, void *data); static void gtrack_record_cb(Fl_Widget *w, void *data); +static void gtrack_jacksendactivate_cb(Fl_Widget* w,void *data); GTrack::GTrack(int x, int y, int w, int h, const char* l ) : @@ -37,18 +38,22 @@ GTrack::GTrack(int x, int y, int w, int h, const char* l ) : radial( x+5, y+ 26, 100, 100, ""), clipSel(x + 5, y + 26 + 102, 100, 294,""), - - volBox(x+5, y+422, 100, 172, ""), - volume(x+66, y +425, 36, 166, ""), + jackSendBox(x+5, y+422, 100, 45, ""), + jackSendDial(x+21, y+422+8, 30,30, ""), + jackSendActivate(x+66, y+422+11, 36,25, "FX"), + volBox(x+5, y+422+50, 100, 172, ""), + volume(x+66, y +425+50, 36, 166, ""), + + - sendDial (x+21, y +430 + 0, 30, 30, ""), - sendActive (x+11, y +430 + 32, 50, 25, "Snd"), + sendDial (x+21, y +430 + 50, 30, 30, ""), + sendActive (x+11, y +430 + 82, 50, 25, "Snd"), - xsideDial (x+21, y +430 + 69, 30, 30, ""), - keyActive (x+11, y +430 + 101, 50, 25, "Key"), + xsideDial (x+21, y +430 + 69+50, 30, 30, ""), + keyActive (x+11, y +430 + 151, 50, 25, "Key"), - recordActive (x+11, y +430 + 132, 50, 25, "XRec") + recordActive (x+11, y +430 + 182, 50, 25, "XRec") { ID = privateID++; @@ -68,7 +73,10 @@ GTrack::GTrack(int x, int y, int w, int h, const char* l ) : recordActive.callback( gtrack_record_cb, this ); volume.callback( gtrack_vol_cb, this ); - + + jackSendActivate.setColor( 0, 0.6, 1 ); + jackSendActivate.callback(gtrack_jacksendactivate_cb,this); + jackSendDial.align(FL_ALIGN_INSIDE); //volBox.color( fl_rgb_color( 0,0,0 ) ); end(); // close the group @@ -171,3 +179,11 @@ void gtrack_record_cb(Fl_Widget *w, void *data) //printf("track %i record Arm %s\n", track->ID, b ? "off" : "on" ); } +void gtrack_jacksendactivate_cb(Fl_Widget* w,void *data) +{ + GTrack* track = (GTrack*) data; + Avtk::LightButton* d = (Avtk::LightButton*)w; + bool b=d->value(); + d->value(!b); +} + diff --git a/src/gtrack.hxx b/src/gtrack.hxx index 9741e0d..64bfdb0 100644 --- a/src/gtrack.hxx +++ b/src/gtrack.hxx @@ -78,12 +78,16 @@ class GTrack : public Fl_Group Avtk::RadialStatus radial; Avtk::ClipSelector clipSel; - + Avtk::Box volBox; Avtk::Volume volume; private: + Avtk::Box jackSendBox; + Avtk::Dial jackSendDial; + Avtk::LightButton jackSendActivate; + Avtk::Dial sendDial; Avtk::LightButton sendActive; diff --git a/src/gui.cxx b/src/gui.cxx index 4546d9e..3ffc4c9 100644 --- a/src/gui.cxx +++ b/src/gui.cxx @@ -328,7 +328,7 @@ static int cb_nsm_save ( char **out_msg, void *userdata ) Gui::Gui(const char* argZero) : samplerate( 0 ), - window(1110,650), + window(1110,700), enableJackSendReturns(false), diskReader( new DiskReader() ), diskWriter( new DiskWriter() ) @@ -425,7 +425,7 @@ Gui::Gui(const char* argZero) : stringstream s; s << "Track " << i+1; //printf("track name %s\n", s.str().c_str() ); - tracks.push_back( new GTrack(8 + i * 118, 40, 110, 600, s.str().c_str() ) ); + tracks.push_back( new GTrack(8 + i * 118, 40, 110, 650, s.str().c_str() ) ); } master = new GMasterTrack(8 + i * 118, 40, 150, 600, "Master");