Commit edb61f00 authored by Alexandre De Fonvillars's avatar Alexandre De Fonvillars
Browse files

Update u1-interface.cpp

parent d56de680
......@@ -47,12 +47,12 @@ void CreerInterface()
gInterface.Slider2->bounds(1, 20 ) ;
//Création des tabulations
gInterface.Tab1 = new Fl_Tabs( L_ZONE + 5, 5, L_IHM - L_ZONE - 10, H_IHM*7/8, "");
gInterface.Tab1 = new Fl_Tabs( L_ZONE + 5, 5, L_IHM - L_ZONE - 10, H_IHM - 10, "");
{
int xTab = L_ZONE + 5, yTab = 5, lTab = L_IHM - L_ZONE - 10, hTab = H_IHM*7/8;
int xTab = L_ZONE + 5, yTab = 5, lTab = L_IHM - L_ZONE - 10, hTab = H_IHM - 10;
int xGroup = xTab, yGroup = yTab + 20, lGroup = lTab, hGroup = hTab -20;
int lGap = lGroup/10, hGap= hGroup/20;
int lWidget = lGroup/2 - lGap, hWidget = hGroup/25;
int lGap = lGroup/10, hGap= hGroup/25;
int lWidget = lGroup/2 - lGap, hWidget = hGroup/30;
int xR = xGroup+lGroup/2-lWidget-lGap/4, xL = xGroup+lGroup/2+lGap/4; //Position en x right, x left des widgets
......@@ -81,26 +81,13 @@ void CreerInterface()
}
grp0->end();
Fl_Group *grp1 = new Fl_Group( xGroup, yGroup, lGroup, hGroup ,"Valeurs");
Fl_Group *grp1 = new Fl_Group( xGroup, yGroup, lGroup, hGroup ,"Corde");
{
int y = yGroup + hGap*2; //y : compteur qui permet de placer les positions successives des widgets
//Valeurs pour les k de la corde
gInterface.SliderK = new Fl_Value_Slider(xR , y, lWidget, hWidget, "k");
gInterface.SliderK->type( FL_HORIZONTAL ) ;
gInterface.SliderK->align( FL_ALIGN_TOP ) ;
gInterface.SliderK->bounds(1, 50 ) ;
gInterface.SliderK->precision( 1 ) ;
gInterface.SliderK->callback( SliderKCallback, NULL ) ;
gInterface.SliderKc = new Fl_Value_Slider( xL , y, lWidget, hWidget, "kc");
gInterface.SliderKc->type( FL_HORIZONTAL ) ;
gInterface.SliderKc->align( FL_ALIGN_TOP ) ;
gInterface.SliderKc->bounds(1, 50 ) ;
gInterface.SliderKc->precision( 1 ) ;
gInterface.SliderKc->callback( SliderKcCallback, NULL ) ;
//Valeurs pour les x de la corde
y += hWidget + hGap*2;
gInterface.SliderX3 = new Fl_Value_Slider(xR , y, lWidget*2+lGap/2, hWidget, "x4 (x10e4)");
gInterface.SliderX3->type( FL_HORIZONTAL ) ;
gInterface.SliderX3->align( FL_ALIGN_TOP ) ;
......@@ -160,7 +147,6 @@ void CreerInterface()
gInterface.SliderH2->precision( 1 ) ;
gInterface.SliderH2->callback( SliderH1Callback, NULL ) ;
//Valeurs pour m de la corde
y += hWidget + hGap*2;
gInterface.SliderM = new Fl_Value_Slider(xR , y, lWidget, hWidget, "m (x10000)");
......@@ -170,19 +156,54 @@ void CreerInterface()
gInterface.SliderM->precision( 1 ) ;
gInterface.SliderM->callback( SliderMCallback, NULL ) ;
//Valeurs pour k de la corde
gInterface.SliderR = new Fl_Value_Slider(xL , y, lWidget, hWidget, "r");
gInterface.SliderR->type( FL_HORIZONTAL ) ;
gInterface.SliderR->align( FL_ALIGN_TOP ) ;
gInterface.SliderR->bounds(1, 20 ) ;
gInterface.SliderR->precision( 1 ) ;
gInterface.SliderR->callback( SliderRCallback, NULL ) ;
gInterface.SliderKc = new Fl_Value_Slider( xL , y, lWidget, hWidget, "kc");
gInterface.SliderKc->type( FL_HORIZONTAL ) ;
gInterface.SliderKc->align( FL_ALIGN_TOP ) ;
gInterface.SliderKc->bounds(1, 50 ) ;
gInterface.SliderKc->precision( 1 ) ;
gInterface.SliderKc->callback( SliderKcCallback, NULL ) ;
//Valeurs pour les k de la corde
y += hWidget + hGap*2;
gInterface.SliderK1 = new Fl_Value_Slider(xR , y, lWidget, hWidget, "k1");
gInterface.SliderK1->type( FL_HORIZONTAL ) ;
gInterface.SliderK1->align( FL_ALIGN_TOP ) ;
gInterface.SliderK1->bounds(1, 100 ) ;
gInterface.SliderK1->precision( 1 ) ;
gInterface.SliderK1->callback( SliderK1Callback, NULL ) ;
gInterface.SliderK2 = new Fl_Value_Slider(xL , y, lWidget, hWidget, "k2");
gInterface.SliderK2->type( FL_HORIZONTAL ) ;
gInterface.SliderK2->align( FL_ALIGN_TOP ) ;
gInterface.SliderK2->bounds(1, 100 ) ;
gInterface.SliderK2->precision( 1 ) ;
gInterface.SliderK2->callback( SliderK1Callback, NULL ) ;
//Valeurs pour r de la corde
y += hWidget + hGap*3/4;
gInterface.SliderR1 = new Fl_Value_Slider(xR , y, lWidget, hWidget, "r1");
gInterface.SliderR1->type( FL_HORIZONTAL ) ;
gInterface.SliderR1->align( FL_ALIGN_TOP ) ;
gInterface.SliderR1->bounds(1, 20 ) ;
gInterface.SliderR1->precision( 1 ) ;
gInterface.SliderR1->callback( SliderR1Callback, NULL ) ;
gInterface.SliderR2 = new Fl_Value_Slider(xL , y, lWidget, hWidget, "r2");
gInterface.SliderR2->type( FL_HORIZONTAL ) ;
gInterface.SliderR2->align( FL_ALIGN_TOP ) ;
gInterface.SliderR2->bounds(1, 20 ) ;
gInterface.SliderR2->precision( 1 ) ;
gInterface.SliderR2->callback( SliderR2Callback, NULL ) ;
gInterface.BoutonReset = new Fl_Button(xR, hGroup - 5, lWidget, hWidget, "Reset") ;
gInterface.BoutonReset->box(FL_PLASTIC_UP_BOX);
gInterface.BoutonReset->callback( BoutonResetCB, NULL ) ;
}
grp1->end();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment