/* Form definition file generated with fdesign. */

#include "forms.h"
#include <stdlib.h>
#include "mainform.h"

FD_main *create_form_main(void)
{
  FL_OBJECT *obj;
  FD_main *fdui = (FD_main *) fl_calloc(1, sizeof(*fdui));

  fdui->main = fl_bgn_form(FL_NO_BOX, 680, 450);
  obj = fl_add_box(FL_UP_BOX,0,0,680,450,"");
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,480,370,180,60,"Acceleration Control");
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,20,50,230,200,"Side View");
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,500,260,160,100,"Top");
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,500,20,160,230,"Side");
  fdui->load = obj = fl_add_button(FL_NORMAL_BUTTON,20,260,80,30,"Load file");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_WHEAT,FL_COL1);
    fl_set_object_callback(obj,Load,0);
  fdui->save = obj = fl_add_button(FL_NORMAL_BUTTON,20,290,80,30,"Save File");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_WHEAT,FL_COL1);
    fl_set_object_callback(obj,Save,0);
  fdui->animate = obj = fl_add_button(FL_NORMAL_BUTTON,20,320,80,40,"Animate");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_DODGERBLUE,FL_COL1);
    fl_set_object_callback(obj,Animate,0);
  fdui->rKnee = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,70,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,2);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->rAnkle = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,90,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,3);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->lHipB = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,160,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,7);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->lKnee = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,180,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,6);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->lAnkle = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,200,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,5);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->torso = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,290,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,4);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->rHipT = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,310,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,0);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->lHipT = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,330,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,8);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  obj = fl_add_text(FL_NORMAL_TEXT,20,10,180,30,"Gait Generator v0.1");
    fl_set_object_lsize(obj,FL_LARGE_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_ITALIC_STYLE+FL_SHADOW_STYLE);
  obj = fl_add_text(FL_NORMAL_TEXT,510,30,140,20,"Right: Hip/Knee/Ankle/Arm");
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  obj = fl_add_text(FL_NORMAL_TEXT,510,270,140,20,"Torso/RightHip/LeftHip");
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  obj = fl_add_text(FL_NORMAL_TEXT,510,140,140,20,"Left: Hip/Knee/Ankle/Arm");
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  fdui->rHipB = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,50,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_lalign(obj,FL_ALIGN_TOP_RIGHT);
    fl_set_object_callback(obj,AngleUpdate,1);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,260,260,230,100,"Top View");
  fdui->framePos = obj = fl_add_counter(FL_NORMAL_COUNTER,110,300,100,20,"Frame position");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP_LEFT);
    fl_set_object_callback(obj,ChangeFrame,0);
    fl_set_counter_precision(obj, 0);
    fl_set_counter_bounds(obj, 0, 1000000);
    fl_set_counter_step(obj, 1, 1);
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,260,50,230,200,"Front View");
  fdui->sideView = obj = fl_add_box(FL_EMBOSSED_BOX,30,60,210,180,"");
    fl_set_object_color(obj,FL_LEFT_BCOL,FL_COL1);
  fdui->frontView = obj = fl_add_box(FL_EMBOSSED_BOX,270,60,210,180,"");
    fl_set_object_color(obj,FL_LEFT_BCOL,FL_COL1);
  fdui->topView = obj = fl_add_box(FL_EMBOSSED_BOX,270,270,210,80,"");
    fl_set_object_color(obj,FL_LEFT_BCOL,FL_COL1);
  fdui->quit = obj = fl_add_lightbutton(FL_PUSH_BUTTON,410,20,80,20,"Quit");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_GREEN,FL_RED);
  fdui->about = obj = fl_add_button(FL_NORMAL_BUTTON,330,20,80,20,"About");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_callback(obj,About,0);
  fdui->time = obj = fl_add_input(FL_NORMAL_INPUT,140,340,40,20,"Time");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_callback(obj,TimeDelta,0);
  fdui->NumFrames = obj = fl_add_text(FL_NORMAL_TEXT,140,320,40,20,"Text");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  obj = fl_add_text(FL_NORMAL_TEXT,110,320,30,20,"Max");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
  fdui->rotSide = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,110,260,140,20,"Rotate side view");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM_RIGHT);
    fl_set_object_callback(obj,AngleUpdate,11);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->rArm = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,110,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,9);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->lArm = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,220,140,20,"");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_GREEN);
    fl_set_object_callback(obj,AngleUpdate,10);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -90, 90);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 1);
  fdui->sideAcc = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,380,140,20,"Side");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_BLUE);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT);
    fl_set_object_callback(obj,AngleUpdate,20);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -511, 511);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 0);
  fdui->frontAcc = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,510,400,140,20,"Front");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_COL1,FL_BLUE);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT);
    fl_set_object_callback(obj,AngleUpdate,21);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, -511, 511);
    fl_set_slider_value(obj, 0);
    fl_set_slider_size(obj, 0.15);
    fl_set_slider_step(obj, 1);
    fl_set_slider_increment(obj, 1, 0);
  fl_end_form();

  fdui->main->fdui = fdui;

  return fdui;
}
/*---------------------------------------*/

FD_about *create_form_about(void)
{
  FL_OBJECT *obj;
  FD_about *fdui = (FD_about *) fl_calloc(1, sizeof(*fdui));

  fdui->about = fl_bgn_form(FL_NO_BOX, 260, 210);
  obj = fl_add_box(FL_FLAT_BOX,0,0,260,210,"");
  fdui->AboutText = obj = fl_add_browser(FL_NORMAL_BROWSER,0,0,260,210,"");
    fl_set_object_boxtype(obj,FL_FRAME_BOX);
    fl_set_object_color(obj,FL_DODGERBLUE,FL_YELLOW);
    fl_set_browser_hscrollbar(obj, FL_OFF);
    fl_set_browser_vscrollbar(obj, FL_OFF);
  fl_end_form();

  fdui->about->fdui = fdui;

  return fdui;
}
/*---------------------------------------*/

