Esempio n. 1
0
//-----------------------------------------------------------------------------
void NrmDlg::create_dlg()
{
	Fl_Menu_Item k[]={{"x"}, {"y"}, { "z"}, {0}};
	wnd = new Fl_Double_Window(135, 215);
	min = new Fl_Value_Input(10, 25, 115, 25, mgl_gettext("Minimal value (v1)"));
	min->align(FL_ALIGN_TOP_LEFT);
	min->tooltip(mgl_gettext("Minimal value for resulting data values"));
	max = new Fl_Value_Input(10, 70, 115, 25, mgl_gettext("Maximal value (v2)"));
	max->align(FL_ALIGN_TOP_LEFT);
	max->tooltip(mgl_gettext("Maximal value for resulting data values"));
	dir = new Fl_Choice(10, 115, 115, 25, mgl_gettext("Direction"));
	dir->align(FL_ALIGN_TOP_LEFT);	dir->copy(k);
	dir->tooltip(mgl_gettext("Direction along which data will be filled"));
	sym = new Fl_Check_Button(10, 115, 115, 25, mgl_gettext("Symetrical range"));
	sym->tooltip(mgl_gettext("Normalize in symmetrical range: -max(|v1|,|v2|) ... max(|v1|,|v2|)"));

	Fl_Button *o;
	o = new Fl_Button(25, 150, 85, 25, mgl_gettext("Cancel"));	o->callback(close_dlg_cb,wnd);
	o->box(UDAV_UP_BOX);	o->down_box(UDAV_DOWN_BOX);
	o->tooltip(mgl_gettext("Do nothing and close this window"));
	o = new Fl_Return_Button(25, 180, 85, 25, mgl_gettext("Change"));o->callback(nrm_dlg_cb,wnd);
	o->box(UDAV_UP_BOX);	o->down_box(UDAV_DOWN_BOX);
	o->tooltip(mgl_gettext("Change data values and close this window"));
	wnd->end();
}
Esempio n. 2
0
Fl_Double_Window* make_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = controls = new Fl_Double_Window(255, 60, "Rotation Angle");
    w = o;
    { Fl_Value_Input* o = angle_value = new Fl_Value_Input(180, 5, 70, 25, "Angle");
      o->minimum(-65000);
      o->maximum(65000);
      o->callback((Fl_Callback*)cb_angle_value);
      o->when(FL_WHEN_ENTER_KEY);
    }
    { Fl_Roller* o = angle_roller = new Fl_Roller(5, 35, 245, 20);
      o->type(1);
      o->minimum(65000);
      o->maximum(-65000);
      o->step(0.1);
      o->callback((Fl_Callback*)cb_angle_roller);
    }
    { Fl_Button* o = new Fl_Button(70, 5, 55, 25, "next");
      o->shortcut(0x66);
      o->callback((Fl_Callback*)cb_next);
    }
    { Fl_Button* o = new Fl_Button(5, 5, 55, 25, "prev");
      o->shortcut(0x64);
      o->callback((Fl_Callback*)cb_prev);
    }
    o->end();
    o->resizable(o);
  }
  { ImageWindow* o = iw1 = new ImageWindow(100, 100);
    w = o;
    o->box(FL_FLAT_BOX);
    o->color(FL_BACKGROUND_COLOR);
    o->selection_color(FL_BACKGROUND_COLOR);
    o->labeltype(FL_NO_LABEL);
    o->labelfont(0);
    o->labelsize(14);
    o->labelcolor(FL_FOREGROUND_COLOR);
    o->align(FL_ALIGN_TOP);
    o->when(FL_WHEN_RELEASE);
    o->end();
  }
  { ImageWindow* o = iw2 = new ImageWindow(100, 100);
    w = o;
    o->box(FL_FLAT_BOX);
    o->color(FL_BACKGROUND_COLOR);
    o->selection_color(FL_BACKGROUND_COLOR);
    o->labeltype(FL_NO_LABEL);
    o->labelfont(0);
    o->labelsize(14);
    o->labelcolor(FL_FOREGROUND_COLOR);
    o->align(FL_ALIGN_TOP);
    o->when(FL_WHEN_RELEASE);
    o->end();
  }
  return w;
}
Esempio n. 3
0
File: Main.cpp Progetto: aib/glito
void initParamWindow() {
    const int heightInput = 28;
    const int wideLabel = 205;
    const int wideInput = 130;
    const int between = 5;
    const int Ybetween = 3;
    const int YbetweenMore = 6;
    const int alignStyle = FL_ALIGN_INSIDE | FL_ALIGN_RIGHT;
    const Fl_Boxtype inputStyle = FL_PLASTIC_DOWN_BOX;
    int x = 10;
    int y = 10;
    const int wide = x+wideLabel+between+wideInput+x;
    const int height =  y + 14*(heightInput+Ybetween) - Ybetween + 9*YbetweenMore + y;
    paramWindow = new Fl_Window( wide, height, _("Parameters") );
    Fl_Group* win2 = new Fl_Group( 0, 0, wide, height );
    paramWindow->resizable(win2);
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Schema size:") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->type(FL_HORIZONTAL);
	o->minimum(0);
	o->maximum(1);
	o->value(glito->getCloseEdge());
	o->step(0.01);
	o->callback( (Fl_Callback*)closeEdge_param, glito );
    }
    y += heightInput + Ybetween;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Preview Size:") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->type(FL_HORIZONTAL);
	o->minimum(0);
	o->maximum(1);
	o->value(glito->getPreviewSize());
	o->step(0.01);
	o->callback( (Fl_Callback*)previewSize_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Rotation shift (rad):") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->type(FL_HORIZONTAL);
	o->minimum(0.002);
	o->maximum(0.2);
	o->value(glito->rotationShift);
	o->step(0.001);
	o->callback( (Fl_Callback*)rotationShift_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Size of saved images:") );
	o->align( alignStyle );
    }
    {
	Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between, y, wideInput/2-5, heightInput );
	o->box(inputStyle);
	o->value(IS::translate(glito->imageSavedWidth).c_str());
	o->callback( (Fl_Callback*)imageSavedWidth_param, glito );
    }
    {
	Fl_Box* o = new Fl_Box( x+wideLabel+between+wideInput/2-5, y, 10, heightInput, "x" );
	o->align( FL_ALIGN_INSIDE | FL_ALIGN_CENTER );
    }
    {
	Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between+wideInput/2+5, y,
					    wideInput/2-5, heightInput );
	o->box(inputStyle);
	o->value(IS::translate(glito->imageSavedHeight).c_str());
	o->callback( (Fl_Callback*)imageSavedHeight_param, glito );
    }
    y += heightInput + Ybetween;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Size of animations:") );
	o->align( alignStyle );
    }
    {
	Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between, y, wideInput/2-5, heightInput );
	o->box(inputStyle);
	o->value(IS::translate(glito->animationSavedWidth).c_str());
	o->callback( (Fl_Callback*)animationSavedWidth_param, glito );
    }
    {
	Fl_Box* o = new Fl_Box( x+wideLabel+between+wideInput/2-5, y, 10, heightInput, "x" );
	o->align( FL_ALIGN_INSIDE | FL_ALIGN_CENTER );
    }
    {
	Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between+wideInput/2+5, y,
					    wideInput/2-5, heightInput );
	o->box(inputStyle);
	o->value(IS::translate(glito->animationSavedHeight).c_str());
	o->callback( (Fl_Callback*)animationSavedHeight_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Frames per cycle (>1):") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Input* o = new Fl_Value_Input( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->minimum(10);
	o->maximum(100);
	o->value(glito->framesPerCycle);
	o->step(1);
	o->callback( (Fl_Callback*)framesPerCycle_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Motion detection (ms):") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->type(FL_HORIZONTAL);
	o->minimum(1);
	o->maximum(200);
	o->value(glito->intervalMotionDetection);
	o->step(1);
	o->callback( (Fl_Callback*)intervalMotionDetection_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	{
	    Fl_Button* o = new Fl_Button( x, y, 70, heightInput, _("Density") );
	    o->box(FL_PLASTIC_UP_BOX);
	    o->value( glito->trueDensity );
	    o->callback( (Fl_Callback*)trueDensity_param, glito );
	}
	{
	    Fl_Box* o = new Fl_Box( x, y, wideLabel+30, heightInput, _("or pseudo-density:") );
	    o->align( alignStyle );
	    if ( glito->trueDensity ) o->deactivate();
	}
	{
	    Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+30+between, y,
						      100, heightInput );
	    o->box(inputStyle);
	    if ( glito->trueDensity ) o->deactivate();
	    o->type(FL_HORIZONTAL);
	    o->minimum(0);
	    o->maximum(1);
	    o->value( ImagePseudoDensity::pseudoDensity.getProba() );
	    o->step(0.01);
	    o->callback( (Fl_Callback*)logProbaHitMax_param );
	}
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideInput, heightInput, _("Points for framing:") );
	o->align( FL_ALIGN_INSIDE | FL_ALIGN_LEFT );
    }
    y += heightInput;
    {
	int xLine = 0;
	{
	    Fl_Int_Input* o = new Fl_Int_Input( x+xLine, y, 80, heightInput );
	    o->box(inputStyle);
	    o->value(IS::translate(glito->pointsForFraming).c_str());
	    o->callback( (Fl_Callback*)pointsForFraming_param, glito );
	}
	xLine += 80;
	{
	    Fl_Box* o = new Fl_Box( x+xLine, y, 20, heightInput, " (x " );
	    o->align( FL_ALIGN_INSIDE | FL_ALIGN_CENTER );
	}
	xLine += 20;
	{
	    Fl_Value_Slider* o = new Fl_Value_Slider( x+xLine, y, 100, heightInput );
	    o->box(inputStyle);
	    o->type(FL_HORIZONTAL);
	    o->minimum(0);
	    o->maximum(1);
	    o->box(inputStyle);
	    o->value(glito->animationFraming);
	    o->step(0.01);
	    o->callback( (Fl_Callback*)animationFraming_param, glito );
	}
	xLine += 100;
	{
	    Fl_Box* o = new Fl_Box( x+xLine, y, 110, heightInput, _(" for animation)") );
	    o->align( FL_ALIGN_INSIDE | FL_ALIGN_LEFT );
	}
    }
    y += heightInput + 2*Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wide-20, heightInput,
				_("Number of iterations limited by:") );
	o->align( FL_ALIGN_INSIDE | FL_ALIGN_LEFT );
    }
    y += heightInput;
    {
	Fl_Round_Button* o = new Fl_Round_Button( x, y, wideInput, heightInput,
						  _("Interval per frame (ms)") );
	o->box(FL_NO_BOX);
	o->type(FL_RADIO_BUTTON);
	o->when(FL_WHEN_CHANGED);
	o->value(glito->clockNumber);
	o->callback( (Fl_Callback*)clockNumber_param, glito );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	if ( !glito->clockNumber ) o->deactivate();
	o->type(FL_HORIZONTAL);
	o->minimum(1);
	o->maximum(200);
	o->value(glito->intervalFrame);
	o->step(1);
	o->callback( (Fl_Callback*)intervalFrame_param, glito );
    }
    y += heightInput + Ybetween;
    {
	int xLine = 0;
	{
	    Fl_Round_Button* o = new Fl_Round_Button( x, y, 127, heightInput,
						      _("Points per frame") );
	    o->box(FL_NO_BOX);
	    o->type(FL_RADIO_BUTTON);
	    o->when(FL_WHEN_CHANGED);
	    o->value(!glito->clockNumber);
	    o->callback( (Fl_Callback*)clockNumber_param, glito );
	}
	xLine += 127 + between;
	{
	    Fl_Int_Input* o = new Fl_Int_Input( x+xLine, y, 80, heightInput );
	    o->box(inputStyle);
	    if ( glito->clockNumber ) o->deactivate();
	    o->value(IS::translate(glito->pointsPerFrame).c_str());
	    o->callback( (Fl_Callback*)pointsPerFrame_param, glito );
	}
	xLine += 80 + 2;
	{
	    Fl_Button* o = new Fl_Button( x+xLine, y, wide - (x+xLine) - 10,
					  heightInput, _("Calibrate") );
	    o->box(FL_PLASTIC_UP_BOX);
	    if ( glito->clockNumber ) o->deactivate();
	    o->callback( (Fl_Callback*)calibrate_param, glito );
	}
    }
    y += heightInput + Ybetween + 2*YbetweenMore;
    {
	int xLine = 0;
	{
	    Fl_Button* o = new Fl_Button( x, y, 90, heightInput, _("Black/White") );
	    o->box(FL_PLASTIC_UP_BOX);
	    o->value( !ImageGray::background.isBlack() );
	    o->callback( (Fl_Callback*)blackWhite_param );
	}
	xLine += 90 + 2*between + 5;
	{
	    Fl_Choice* o = new Fl_Choice( x+xLine+110, y, 95, heightInput,
					  _("Transparency:") );
	    o->add( ImageGray::transparency.stringNone().c_str(),
		    0, (Fl_Callback*)transparency_param, (void*)0 );
	    o->add( ImageGray::transparency.stringSimple().c_str(),
		    0, (Fl_Callback*)transparency_param, (void*)1 );
	    o->add( ImageGray::transparency.stringAlpha().c_str(),
		    0, (Fl_Callback*)transparency_param, (void*)2 );
	    if ( ImageGray::transparency.useAlphaTransparency() ) {
		o->value(2);
	    } else if ( ImageGray::transparency.useSimpleTransparency() ) {
		o->value(1);
	    } else {
		o->value(0);
	    }
	}
    }
    y += heightInput + Ybetween;
    {
	// invisible box to allow correct resizing
	Fl_Box* o = new Fl_Box( 0, y, 100, 0 );
	win2->resizable(*o);
    }
    win2->end();
    paramWindow->end();
}
Esempio n. 4
0
int main (int argc, char **argv) {

  Fl_Window* w;
  fl_init_locale_support("ewmconf", PREFIX"/share/locale");
  readConfiguration();
   {Fl_Window* o = new Fl_Window(320, 370, _("Window manager settings"));
    w = o;
     {Fl_Tabs* o = new Fl_Tabs(2, 5, 318, 325);
      o->color((Fl_Color)16);
       {Fl_Group* o = new Fl_Group(1, 29, 316, 295, _("&Titlebar"));
        o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
         {Fl_Choice* o = new Fl_Choice(83, 13, 105, 22, _("Text align:")); o->begin();
          o->callback((Fl_Callback*)cb_Text);
          new Fl_Item(_("Left"));
          new Fl_Item(_("Right"));
          new Fl_Item(_("Center"));
          o->value(title_align);
          o->end();
        }
         {Fl_Value_Input* o = new Fl_Value_Input(243, 13, 60, 22, _("Height:"));
          o->minimum(10);
          o->maximum(50);
          o->step(1);
          o->value(20);
          o->callback((Fl_Callback*)cb_Height);
          o->value(title_height);
        }
         {Fl_Button* o = titlebarLabelColorButton = new Fl_Button(85, 55, 60, 20, _("Titlebar label color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_titlebarLabelColorButton);
          o->align(132);
          o->color((Fl_Color)title_normal_color_text);
        }
         {Fl_Button* o = titlebarColorButton = new Fl_Button(85, 120, 60, 20, _("Titlebar color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_titlebarColorButton);
          o->align(132);
          o->color((Fl_Color) title_normal_color);
        }
         {Fl_Group* o = new Fl_Group(153, 45, 160, 110);
           {Fl_Button* o = titlebarActiveLabelColorButton = new Fl_Button(90, 10, 60, 20, _("Titlebar active label color: "));
            o->box(FL_DOWN_BOX);
            o->callback((Fl_Callback*)cb_titlebarActiveLabelColorButton);
            o->align(132);
            o->color((Fl_Color) title_active_color_text);
          }
           {Fl_Button* o = titlebarActiveColorButton = new Fl_Button(90, 75, 60, 20, _("Titlebar active color: "));
            o->box(FL_DOWN_BOX);
            o->callback((Fl_Callback*)cb_titlebarActiveColorButton);
            o->align(132);
            o->color((Fl_Color)title_active_color);
          }
          o->end();
        }
         {Fl_Choice* o = titlebarDrawGrad = new Fl_Choice(85, 157, 163, 23, _("Box type:")); o->begin();
          o->callback((Fl_Callback*)cb_titlebarDrawGrad);
          o->align(132);
          new Fl_Item(_("Flat"));
          new Fl_Item(_("Horizontal shade"));
          new Fl_Item(_("Thin down"));
          new Fl_Item(_("Up box"));
          new Fl_Item(_("Down box"));
          new Fl_Item(_("Plastic"));
          o->value(title_draw_grad);
          o->end();
        }
         {Fl_Check_Button* o = useThemeButton = new Fl_Check_Button(8, 220, 300, 20, _("&Use theme"));
          o->callback((Fl_Callback*)cb_useThemeButton);
          o->value(use_theme);
        }
         {Fl_Input* o = themePathInput = new Fl_Input(65, 247, 210, 23, _("Path:"));
          o->callback((Fl_Callback*)cb_themePathInput);
          o->deactivate();
          themePathInput->value(theme_path);
        }
         {Fl_Button* o = browse_btn = new Fl_Button(280, 247, 25, 23, _("..."));
          o->callback((Fl_Callback*)cb_browse_btn);
          o->deactivate();
        }
         {Fl_Divider* o = new Fl_Divider(8, 190, 300, 25, _("label"));
          o->color((Fl_Color)16);
        }
         {Fl_Divider* o = new Fl_Divider(8, 85, 297, 25, _("label"));
          o->color((Fl_Color)16);
        }
        o->end();
      }
       {Fl_Group* o = new Fl_Group(3, 20, 310, 305, _("&Resizing"));
        o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
        o->hide();
         {Fl_Check_Button* o = animateButton = new Fl_Check_Button(10, 10, 300, 20, _("Animate size changes"));
          o->value(1);
          o->callback((Fl_Callback*)cb_animateButton);
          o->value(animate);
        }
         {Fl_Value_Slider* o = animateSlider = new Fl_Value_Slider(70, 35, 235, 20, _("Speed:"));
          o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
          o->box(FL_DOWN_BOX);
          o->text_size(10);
          o->minimum(5);
          o->maximum(20);
          o->step(2);
          o->value(14);
          o->slider_size(8);
          o->callback((Fl_Callback*)cb_animateSlider);
          o->align(FL_ALIGN_LEFT);
          o->value(animate_speed);
          if(animate) o->activate(); else o->deactivate();
        }
        new Fl_Divider(0, 60, 300, 25, _("label"));
         {Fl_Check_Button* o = opaqueResize = new Fl_Check_Button(10, 85, 290, 20, _("Show window content while resizing"));
          o->callback((Fl_Callback*)cb_opaqueResize);
          o->value(opaque_resize);
        }
        o->end();
      }
      o->end();
    }
     {Fl_Button* o = new Fl_Button(67, 337, 80, 25, _("&OK"));
      o->shortcut(0xff0d);
      o->callback((Fl_Callback*)cb_OK);
    }
     {Fl_Button* o = new Fl_Button(152, 337, 80, 25, _("&Apply"));
      o->callback((Fl_Callback*)cb_Apply);
    }
     {Fl_Button* o = new Fl_Button(237, 337, 80, 25, _("&Cancel"));
      o->shortcut(0xff1b);
      o->callback((Fl_Callback*)cb_Cancel);
    }
    o->end();
  }
  useThemeButton->do_callback();
  w->show(argc, argv);
  return  Fl::run();
}
Esempio n. 5
0
parameter_window::parameter_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = param_window = new Fl_Double_Window(391, 105, "Open Slice Parameter");
    w = o;
    o->user_data((void*)(this));
    { Fl_Value_Input* o = width = new Fl_Value_Input(55, 10, 50, 25, "X size :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(1000);
      o->value(512);
      o->when(FL_WHEN_RELEASE);
    }
    { Fl_Value_Input* o = height = new Fl_Value_Input(55, 40, 50, 25, "Y size :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(1000);
      o->value(512);
    }
    { Fl_Value_Input* o = depth = new Fl_Value_Input(55, 70, 50, 25, "Z size :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(1000);
      o->value(400);
    }
    { Fl_Value_Input* o = sizeX = new Fl_Value_Input(170, 10, 50, 25, "Real X :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(100);
      o->value(0.625);
    }
    { Fl_Value_Input* o = sizeY = new Fl_Value_Input(170, 40, 50, 25, "Real Y :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(100);
      o->value(0.625);
    }
    { Fl_Value_Input* o = sizeZ = new Fl_Value_Input(170, 70, 50, 25, "Real Z :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(100);
      o->value(1);
    }
    { Fl_Value_Input* o = offset = new Fl_Value_Input(315, 10, 65, 25, "CT offset :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->minimum(-2000);
      o->maximum(7999);
    }
    { Fl_Return_Button* o = OK = new Fl_Return_Button(235, 60, 70, 35, "OK");
      o->labelsize(16);
      o->callback((Fl_Callback*)cb_OK);
    }
    { Fl_Button* o = Cancel = new Fl_Button(310, 60, 70, 35, "Cancel");
      o->labelsize(16);
      o->callback((Fl_Callback*)cb_Cancel);
    }
    o->set_modal();
    o->end();
  }
  val = -1;
}
Esempio n. 6
0
FltDesignUI::FltDesignUI() {
  Fl_Window* w;
  { Fl_Window* o = mainWindow = new Fl_Window(439, 249, "Filter Design UI");
    w = o;
    o->user_data((void*)(this));
    { Fl_Group* o = kernel = new Fl_Group(0, 20, 272, 140, "Filter Kernel");
      o->box(FL_ENGRAVED_FRAME);
      o->when(FL_WHEN_CHANGED);
      { Fl_Value_Input* o = ele0 = new Fl_Value_Input(5, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele0);
      }
      { Fl_Value_Input* o = ele1 = new Fl_Value_Input(58, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele1);
      }
      { Fl_Value_Input* o = ele2 = new Fl_Value_Input(111, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele2);
      }
      { Fl_Value_Input* o = ele3 = new Fl_Value_Input(164, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele3);
      }
      { Fl_Value_Input* o = ele4 = new Fl_Value_Input(217, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele4);
      }
      { Fl_Value_Input* o = ele5 = new Fl_Value_Input(5, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele5);
      }
      { Fl_Value_Input* o = ele6 = new Fl_Value_Input(58, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele6);
      }
      { Fl_Value_Input* o = ele7 = new Fl_Value_Input(111, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele7);
      }
      { Fl_Value_Input* o = ele8 = new Fl_Value_Input(164, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele8);
      }
      { Fl_Value_Input* o = ele9 = new Fl_Value_Input(217, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele9);
      }
      { Fl_Value_Input* o = ele10 = new Fl_Value_Input(5, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele10);
      }
      { Fl_Value_Input* o = ele11 = new Fl_Value_Input(58, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele11);
      }
      { Fl_Value_Input* o = ele12 = new Fl_Value_Input(111, 78, 50, 25);
        o->maximum(255);
        o->value(1);
        o->callback((Fl_Callback*)cb_ele12);
      }
      { Fl_Value_Input* o = ele13 = new Fl_Value_Input(164, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele13);
      }
      { Fl_Value_Input* o = ele14 = new Fl_Value_Input(217, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele14);
      }
      { Fl_Value_Input* o = ele15 = new Fl_Value_Input(5, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele15);
      }
      { Fl_Value_Input* o = ele16 = new Fl_Value_Input(58, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele16);
      }
      { Fl_Value_Input* o = ele17 = new Fl_Value_Input(111, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele17);
      }
      { Fl_Value_Input* o = ele18 = new Fl_Value_Input(164, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele18);
      }
      { Fl_Value_Input* o = ele19 = new Fl_Value_Input(217, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele19);
      }
      { Fl_Value_Input* o = ele20 = new Fl_Value_Input(5, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele20);
      }
      { Fl_Value_Input* o = ele21 = new Fl_Value_Input(58, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele21);
      }
      { Fl_Value_Input* o = ele22 = new Fl_Value_Input(111, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele22);
      }
      { Fl_Value_Input* o = ele23 = new Fl_Value_Input(164, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele23);
      }
      { Fl_Value_Input* o = ele24 = new Fl_Value_Input(217, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele24);
      }
      o->end();
    }
    { Fl_Value_Input* o = scale = new Fl_Value_Input(112, 163, 154, 25, "Divide by::");
      o->maximum(255);
      o->value(1);
      o->callback((Fl_Callback*)cb_scale);
    }
    { Fl_Value_Input* o = offset = new Fl_Value_Input(112, 191, 154, 25, "Offset:");
      o->maximum(255);
      o->callback((Fl_Callback*)cb_offset);
    }
    { Fl_Group* o = new Fl_Group(280, 20, 160, 64, "Filter Range");
      o->box(FL_ENGRAVED_FRAME);
      { Fl_Round_Button* o = image = new Fl_Round_Button(284, 27, 68, 28, "Whole Image");
        o->type(102);
        o->down_box(FL_ROUND_DOWN_BOX);
      }
      { Fl_Round_Button* o = selection = new Fl_Round_Button(284, 51, 68, 28, "Brush Selection");
        o->type(102);
        o->down_box(FL_ROUND_DOWN_BOX);
      }
      o->end();
    }
    { Fl_Button* o = new Fl_Button(4, 224, 124, 24, "Load");
      o->callback((Fl_Callback*)cb_Load);
    }
    { Fl_Button* o = new Fl_Button(144, 224, 124, 24, "Save");
      o->callback((Fl_Callback*)cb_Save);
    }
    { Fl_Button* o = new Fl_Button(280, 125, 156, 24, "Preview");
      o->callback((Fl_Callback*)cb_Preview);
    }
    { Fl_Button* o = new Fl_Button(280, 159, 156, 24, "Cancel");
      o->callback((Fl_Callback*)cb_Cancel);
    }
    { Fl_Button* o = new Fl_Button(280, 192, 156, 24, "Accept");
      o->callback((Fl_Callback*)cb_Accept);
    }
    { Fl_Button* o = new Fl_Button(280, 224, 156, 24, "Close");
      o->callback((Fl_Callback*)cb_Close);
    }
    o->end();
  }
}
Esempio n. 7
0
Fl_Window * make_window() 
{
  Fl_Window * w;
  { 
    Fl_Window * o = main_window = new Fl_Window(741, 622, "ASF/AMC Motion Capture Player");
    w = o;
    { 
      Fl_Group * o = new Fl_Group(10, 485, 615, 140);
      { 
        Fl_Button * o = loadSkeleton_button = new Fl_Button(10, 495, 120, 40, "Load Skeleton");//***
        o->callback((Fl_Callback *)load_callback);
      }

      { 
        Fl_Button * o = loadMotion_button = new Fl_Button(140, 495, 120, 40, "Load Motion"); //***
        o->callback((Fl_Callback *)load_callback);
      }

      // "Reload motion" always reload the last skeleton loaded
      { 
        Fl_Button * o = reloadMotion_button = new Fl_Button(270, 495, 120, 40, "Reload Motion");//***
        o->callback((Fl_Callback *)reload_callback);
      }

      { 
        Fl_Button * o = resetScene_button = new Fl_Button(400, 495, 120, 40, "Reset Scene");
        o->callback((Fl_Callback *)resetScene_callback);
      }

      { 
        Fl_Light_Button* o = record_button = new Fl_Light_Button(380, 575, 40, 25, "R");
        o->callback((Fl_Callback *)record_callback, (void*)(0));
      }

      { 
        Fl_Button * o = screenShot_button = new Fl_Button(280, 575, 90, 25, "ScreenShot");
        o->callback((Fl_Callback *)saveScreenToFile_callback);
      }

      { 
        Fl_Button * o = pause_button = new Fl_Button(430, 575, 35, 25, "@||");
        o->labeltype(FL_SYMBOL_LABEL);
        o->labelsize(12);
        o->callback((Fl_Callback *)play_callback);
      }
      { 
        Fl_Button* o = rewind_button = new Fl_Button(465, 575, 35, 25, "@|<");
        o->labeltype(FL_SYMBOL_LABEL);
        o->labelsize(12);
        o->callback((Fl_Callback *)play_callback);
      }
      { 
        Fl_Button* o = play_button = new Fl_Button(500, 575, 35, 25, "@>");
        o->labeltype(FL_SYMBOL_LABEL);
        o->labelsize(12);
        o->callback((Fl_Callback *)play_callback, (void*)(0));
      }
      { 
        Fl_Button* o = minusOne_button = new Fl_Button(535, 575, 35, 25, "-1");
        o->labeltype(FL_SYMBOL_LABEL);
        o->labelsize(12);
        o->callback((Fl_Callback *)play_callback, (void*)(0));
      }
      { 
        Fl_Button* o = plusOne_button = new Fl_Button(570, 575, 35, 25, "+1");
        o->labeltype(FL_SYMBOL_LABEL);
        o->labelsize(12);
        o->callback((Fl_Callback *)play_callback, (void*)(0));
      }
      { 
        Fl_Button* o = repeat_button = new Fl_Button(605, 575, 35, 25, "@<->");
        o->labeltype(FL_SYMBOL_LABEL);
        o->labelsize(12);
        o->callback((Fl_Callback *)play_callback, (void*)(0));
      }
      o->end();
    }  // FL_group

    { 
      Player_Gl_Window * o = glwindow = new Player_Gl_Window(5, 5, 640, 480, "label");
      o->box(FL_DOWN_FRAME);
      o->labeltype(FL_NO_LABEL);
    }

    { 
      Fl_Value_Slider* o = frame_slider = new Fl_Value_Slider(10, 545, 630, 20);  // slider
      o->type(5);
      o->labelsize(18);
      o->minimum(1);
      o->maximum(60000);
      o->step(1);
      o->callback((Fl_Callback*)fslider_callback, (void*)(0));
      o->align(197);
    }

    { 
      Fl_Value_Input* o = speedUp = new Fl_Value_Input(65, 575, 40, 25, "Speed");
      o->minimum(0);
      o->value(1);
      o->callback((Fl_Callback*)playSpeed_callback);
    }
    
    { 
      Fl_Value_Input * o = sub_input = new Fl_Value_Input(690, 55, 45, 25, "Skeleton ID:");
      o->callback((Fl_Callback*)skeletonID_callback);
      sub_input->align(Fl_Align(FL_ALIGN_TOP_RIGHT));
    }
	  { 
      Fl_Value_Input * o = tx_input = new Fl_Value_Input(690, 95, 45, 25, "tx:");
      o->callback((Fl_Callback*)tx_callback);
    }
	  { 
      Fl_Value_Input * o = ty_input = new Fl_Value_Input(690, 122, 45, 25, "ty:");
      o->callback((Fl_Callback*)ty_callback);
    }
	  { 
      Fl_Value_Input * o = tz_input = new Fl_Value_Input(690, 152, 45, 25, "tz:");
      o->callback((Fl_Callback*)tz_callback);
    }
	  { 
      Fl_Value_Input * o = rx_input = new Fl_Value_Input(690, 190, 45, 25, "rx:");
      o->callback((Fl_Callback*)rx_callback);
    }
	  { 
      Fl_Value_Input * o = ry_input = new Fl_Value_Input(690, 217, 45, 25, "ry:");
      o->callback((Fl_Callback*)ry_callback);
    }
	  { 
      Fl_Value_Input * o = rz_input = new Fl_Value_Input(690, 247, 45, 25, "rz:");
      o->callback((Fl_Callback*)rz_callback);
    }

    { 
      Fl_Value_Input * o = joint_idx = new Fl_Value_Input(195, 575, 45, 25, "Show Joint");
      o->maximum(30);
      o->step(1);
      o->value(-1);
      o->callback((Fl_Callback*)spotJoint_callback);
    }

    { 
      Fl_Light_Button * o = groundPlane_button = new Fl_Light_Button(650, 315, 85, 25, "Ground");
      o->callback((Fl_Callback*)renderGroundPlane_callback, (void*)(0));
      o->align(FL_ALIGN_INSIDE);
    }

    { 
      Fl_Light_Button * o = fog_button = new Fl_Light_Button(650, 345, 85, 25, "Fog");
      o->callback((Fl_Callback*)useFog_callback, (void*)(0));
      o->align(FL_ALIGN_INSIDE);
    }

    { 
      Fl_Light_Button * o = worldAxes_button = new Fl_Light_Button(650, 375, 85, 25, "Axes");
      o->callback((Fl_Callback*)renderWorldAxes_callback, (void*)(0));
      o->align(FL_ALIGN_INSIDE);
    }

    { 
      Fl_Button * o = aboutPlayer_button = new Fl_Button(650, 420, 85, 25, "About");
      o->callback((Fl_Callback *)aboutPlayer_callback);
      o->align(FL_ALIGN_INSIDE);
    }
    o->end();
  }
  return w;
}
Esempio n. 8
0
Fl_Window* make_codingstyle_window() {
  Fl_Window* w;
   {Fl_Window* o = new Fl_Window(310, 255);
    w = o;
    o->shortcut(0xff1b);
     {Fl_Tabs* o = new Fl_Tabs(0, 0, 303, 220);
      o->color((Fl_Color)0xfffffffe);
       {Fl_Group* o = new Fl_Group(1, 24, 301, 195, _("Brace Style"));
         {Fl_Group* o = new Fl_Group(14, 22, 282, 122, _("Brace Style"));
          o->box(FL_ENGRAVED_BOX);
          o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
           {Fl_Box* o = new Fl_Box(20, 6, 47, 20, _("if ( x ) {"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(20, 25, 45, 20, _("++y;"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(20, 41, 36, 20, _("}"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(114, 6, 47, 20, _("if ( x )"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(114, 25, 36, 20, _("{"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(115, 42, 46, 20, _("++y;"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(114, 59, 36, 20, _("}"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Round_Button* o = pStyle1 = new Fl_Round_Button(16, 84, 66, 25, _("Style 1"));
            o->type(Fl_Round_Button::RADIO);
            o->value(1);
            o->callback((Fl_Callback*)cb_pStyle1);
          }
           {Fl_Box* o = new Fl_Box(201, 6, 47, 20, _("if ( x )"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(201, 25, 36, 20, _("{"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(227, 42, 34, 22, _("++y;"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(201, 59, 36, 20, _("}"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Round_Button* o = pStyle2 = new Fl_Round_Button(109, 84, 66, 25, _("Style 2"));
            o->type(Fl_Round_Button::RADIO);
            o->callback((Fl_Callback*)cb_pStyle2);
          }
           {Fl_Round_Button* o = pStyle3 = new Fl_Round_Button(200, 84, 66, 25, _("Style 3"));
            o->type(Fl_Round_Button::RADIO);
            o->callback((Fl_Callback*)cb_pStyle3);
          }
          o->end();
        }
         {Fl_Check_Button* o = pNoSpaceParens = new Fl_Check_Button(15, 147, 195, 22, _("No space before parentheses"));
          o->callback((Fl_Callback*)cb_pNoSpaceParens);
        }
         {Fl_Check_Button* o = pBraceFuncs = new Fl_Check_Button(15, 170, 174, 22, _("Apply to function braces"));
          o->value(1);
          o->callback((Fl_Callback*)cb_pBraceFuncs);
        }
        o->end();
      }
       {Fl_Group* o = new Fl_Group(1, 24, 301, 195, _("Other"));
        o->hide();
         {Fl_Group* o = new Fl_Group(11, 22, 284, 90, _("Indentation"));
          o->box(FL_ENGRAVED_BOX);
          o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
           {Fl_Value_Input* o = pTabSize = new Fl_Value_Input(129, 33, 60, 22, _("Tab size for indents"));
            o->maximum(12);
            o->value(2);
            o->callback((Fl_Callback*)cb_pTabSize);
          }
           {Fl_Check_Button* o = pIndentTabs = new Fl_Check_Button(13, 7, 114, 22, _("Indent with tabs"));
            o->callback((Fl_Callback*)cb_pIndentTabs);
          }
           {Fl_Check_Button* o = pIndentCode = new Fl_Check_Button(14, 58, 151, 22, _("Indent code blocks"));
            o->callback((Fl_Callback*)cb_pIndentCode);
          }
          o->end();
        }
         {Fl_Check_Button* o = pReturnParens = new Fl_Check_Button(10, 120, 220, 22, _("Always use parentheses on return"));
          o->callback((Fl_Callback*)cb_pReturnParens);
        }
        o->end();
      }
      o->end();
    }
     {Fl_Button* o = new Fl_Button(115, 227, 59, 23, _("Cancel"));
      o->callback((Fl_Callback*)cb_Cancel);
    }
     {Fl_Button* o = new Fl_Button(180, 227, 59, 23, _("Save"));
      o->callback((Fl_Callback*)cb_Save);
    }
     {Fl_Button* o = new Fl_Button(245, 227, 59, 23, _("Use"));
      o->callback((Fl_Callback*)cb_Use);
    }
    o->end();
    o->resizable(o);
  }
  return  w;
}