-Updated UI, tweaked window size

This commit is contained in:
Harry van Haaren 2013-07-25 17:40:25 +01:00
parent 0b64f78e0c
commit 3f17e33e32
4 changed files with 20 additions and 67 deletions

View file

@ -61,41 +61,33 @@ class GMasterTrack : public Fl_Group
title( strdup(l) ),
bg( x, y , w, h, title ),
clipSel(x + 5, y + 26 + 102, 140, 294,"Testing"),
clipSel(x + 5, y + 26 + 102, 140, 294,""),
volBox(x+5, y+522+2, 140, 172, ""),
volBox(x+5, y+422, 140, 172, ""),
source(x+5, y+26, 140, 100, "Audio IN"),
fxBox(x+5, y+ 421, 140, 100, ""),
source(x+5, y+26, 140, 100, ""),
tapTempo(x + 25 + 52, y + 450 + 26, 66, 30,"Tap"),
metronomeButton(x + 7,y + 450 + 26, 66, 30,"Metro"),
tapTempo(x + 25 + 52, y + 26 + 5, 63, 30,"Tap"),
metronomeButton(x + 10,y + 26 + 5, 63, 30,"Metro"),
dial1(x+54, y + 420, 44, 44, "BPM"),
volume(x+108, y +530, 36, 150, "Vol")
volume(x+106, y +427, 36, 150, "Vol")
{
ID = privateID++;
tapTempo.callback( gmastertrack_button_callback, &ID );
volume.amplitude( 0.75, 0.8 );
metronomeButton.callback( gmastertrack_button_callback, 0 );
volBox.maximum(1.0f);
volBox.minimum(0.0f);
volBox.color( FL_BLACK );
volBox.selection_color( FL_BLUE );
fxBox.maximum(1.0f);
fxBox.minimum(0.0f);
fxBox.color( FL_BLACK );
fxBox.selection_color( FL_BLUE );
source.maximum(1.0f);
source.minimum(0.0f);
source.color( FL_BLACK );
source.selection_color( FL_BLUE );
metronomeButton.callback( gmastertrack_button_callback, 0 );
dial1.callback( gmastertrack_button_callback, 0 );
volume.amplitude( 0.75, 0.8 );
end(); // close the group
}
@ -117,13 +109,10 @@ class GMasterTrack : public Fl_Group
Fl_Progress source;
Fl_Progress volBox;
Fl_Progress fxBox;
Avtk::Button tapTempo;
Avtk::LightButton metronomeButton;
Avtk::Dial dial1;
Avtk::Volume volume;
static int privateID;

View file

@ -39,38 +39,18 @@ class GTrack : public Fl_Group
clipSel(x + 5, y + 26 + 102, 100, 294,""),
volBox(x+5, y+522+2, 100, 172, ""),
volBox(x+5, y+422, 100, 172, ""),
/*
button1(x + 5, y + 324 + 102, 100, 18,"Rec"),
button2(x + 5, y + 344 + 102, 100, 18,"Play"),
button3(x + 5, y + 364 + 102, 100, 18,"Stop"),
button4(x + 5, y + 384 + 102, 48, 18,"-"),
button5(x +57, y + 384 + 102, 48, 18,"+"),
button6(x + 5, y + 404 + 102, 100, 18,"Load"),
*/
volume(x+65, y +427, 36, 150, "Vol"),
volume(x+66, y +527, 36, 150, "Vol"),
dial1(x+22, y +440 , 30, 30, "Rev"),
dial2(x+22, y +440 + 50, 30, 30, "S-C"),
dial3(x+22, y +440 +100, 30, 30, "P-S"),
dial1(x+22, y +440 + 100, 30, 30, "Rev"),
dial2(x+22, y +440 + 150, 30, 30, "S-C"),
dial3(x+22, y +440 + 200, 30, 30, "P-S"),
progress(x+5, y+ 26, 100, 100, "Source UI"),
//unit(x+5, y+200+26, 100, 100, "Unit"),
fx(x+5, y+ 421, 100, 100, "FX")
progress(x+5, y+ 26, 100, 100, "Source UI")
{
ID = privateID++;
/*
button1.callback( gtrack_button_callback, &ID );
button2.callback( gtrack_button_callback, &ID );
button3.callback( gtrack_button_callback, &ID );
button4.callback( gtrack_button_callback, &ID );
button5.callback( gtrack_button_callback, &ID );
button6.callback( gtrack_button_callback, &ID );
*/
volume.callback( gtrack_button_callback, 0 );
volume.amplitude( 0.75, 0.5 );
@ -80,22 +60,11 @@ class GTrack : public Fl_Group
progress.color( FL_BLACK );
progress.selection_color( FL_BLUE );
fx.maximum(1.0f);
fx.minimum(0.0f);
fx.color( FL_BLACK );
fx.selection_color( FL_BLUE );
volBox.maximum(1.0f);
volBox.minimum(0.0f);
volBox.color( FL_BLACK );
volBox.selection_color( FL_BLUE );
/*
unit.maximum(1.0f);
unit.minimum(0.0f);
unit.color( FL_BLACK );
unit.selection_color( FL_BLUE );
*/
end(); // close the group
}
@ -129,9 +98,6 @@ class GTrack : public Fl_Group
Avtk::Dial dial3;
Fl_Progress progress;
//Fl_Progress unit;
Fl_Progress fx;
static int privateID;
};

View file

@ -46,7 +46,7 @@ static void gui_static_read_rb(void* inst)
}
Gui::Gui() :
window(1110,750)
window(1110,650)
{
window.color(FL_BLACK);
window.label("Luppp");
@ -62,10 +62,10 @@ Gui::Gui() :
{
stringstream s;
s << "Track " << i+1;
tracks.push_back( new GTrack(8 + i * 118, 40, 110, 700, s.str().c_str() ) );
tracks.push_back( new GTrack(8 + i * 118, 40, 110, 600, s.str().c_str() ) );
}
master = new GMasterTrack(8 + i * 118, 40, 150, 700, "Master");
master = new GMasterTrack(8 + i * 118, 40, 150, 600, "Master");
window.end();
}

View file

@ -19,8 +19,6 @@
using namespace std;
static void gunittrack_button_callback(Fl_Widget *w, void *data) {
int track = 0;
if ( data )
track = *(int*)data;