2013-04-20 12:50:30 +02:00
|
|
|
|
|
|
|
#include "gui.hxx"
|
2013-05-13 03:43:44 +02:00
|
|
|
#include "avtk/avtk_image.h"
|
|
|
|
|
|
|
|
#include <sstream>
|
|
|
|
|
|
|
|
// Hack, move to gtrack.cpp
|
|
|
|
int GTrack::privateID = 0;
|
|
|
|
|
|
|
|
using namespace std;
|
2013-04-20 12:50:30 +02:00
|
|
|
|
|
|
|
Gui::Gui()
|
|
|
|
{
|
2013-05-15 05:05:36 +02:00
|
|
|
window = new Fl_Double_Window(600,280);
|
2013-04-20 13:20:46 +02:00
|
|
|
window->color(FL_BLACK);
|
2013-05-13 03:43:44 +02:00
|
|
|
window->label("Luppp 5");
|
|
|
|
|
|
|
|
|
|
|
|
Avtk::Image* header = new Avtk::Image(0,0,600,36,"header.png");
|
|
|
|
|
|
|
|
for (int i = 0; i < 5; i++ )
|
|
|
|
{
|
|
|
|
stringstream s;
|
|
|
|
s << "Track " << i+1;
|
|
|
|
tracks.push_back( new GTrack(8 + i * 118, 40, 110, 230, s.str().c_str() ) );
|
|
|
|
}
|
2013-04-20 13:20:46 +02:00
|
|
|
|
2013-05-15 03:55:51 +02:00
|
|
|
box = new Fl_Box(655, 5, 200, 60, "BPM = 120");
|
|
|
|
box->box(FL_UP_BOX);
|
|
|
|
box->labelsize(36);
|
|
|
|
box->labeltype(FL_SHADOW_LABEL);
|
|
|
|
|
2013-04-20 12:50:30 +02:00
|
|
|
window->end();
|
|
|
|
}
|
|
|
|
|
|
|
|
int Gui::show()
|
|
|
|
{
|
|
|
|
window->show();
|
|
|
|
return Fl::run();
|
|
|
|
}
|