/* 
 * Thomas Pantzer: new_panel.cc, v0.4.7  8.6.99 16:32 
 * 
 * 
 * Copyright 1999 by Thomas Pantzer
 * 
 * Permission to use, copy, modify, and distribute this software for noncommercial 
 * use and without fee is hereby granted, provided that the above copyright notice 
 * appear in all copies and that both that copyright notice and this permission 
 * notice appear in supporting documentation, and that the name of the Author not be 
 * used in advertising or publicity pertaining to distribution of the software 
 * without specific, written prior permission. The Author makes no representations about
 * the suitability of this software for any purpose.  It is provided "as is" 
 * without expressed or implied warranty. 
 * 
 * 
 * pantec@isys2.informatik.uni-leipzig.de   (Thomas Pantzer) 
 * 
 */

/* Form definition file generated with fdesign. */

#include "copyright.h"

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

FD_panel *create_form_panel(void)
{
  FL_OBJECT *obj;
  FD_panel *fdui = (FD_panel *) fl_calloc(1, sizeof(*fdui));

//  char st[256]; 	

  fdui->panel = fl_bgn_form(FL_NO_BOX, 655, 715);
  obj = fl_add_box(FL_UP_BOX,0,0,655,715,"");
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,430,330,215,375,"Sensors");
    fl_set_object_lcolor(obj,FL_WHITE);
    fl_set_object_lstyle(obj,FL_NORMAL_STYLE+FL_SHADOW_STYLE);
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,10,10,635,310,"Vision");
    fl_set_object_lcolor(obj,FL_WHITE);
    fl_set_object_lstyle(obj,FL_NORMAL_STYLE+FL_SHADOW_STYLE);
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,10,330,410,70,"Control");
    fl_set_object_lcolor(obj,FL_WHITE);
    fl_set_object_lstyle(obj,FL_NORMAL_STYLE+FL_SHADOW_STYLE);
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,260,410,160,295,"Properties");
    fl_set_object_lcolor(obj,FL_WHITE);
    fl_set_object_lstyle(obj,FL_NORMAL_STYLE+FL_SHADOW_STYLE);
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,240,150,240,10,"Filter");
    fl_set_object_boxtype(obj,FL_FRAME_BOX);
    fl_set_object_lcolor(obj,FL_WHITE);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT);
    fl_set_object_lstyle(obj,FL_NORMAL_STYLE+FL_SHADOW_STYLE);
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,10,560,240,145,"Action");
    fl_set_object_lcolor(obj,FL_WHITE);
    fl_set_object_lstyle(obj,FL_NORMAL_STYLE+FL_SHADOW_STYLE);
  obj = fl_add_labelframe(FL_ENGRAVED_FRAME,10,410,240,140,"Display");
    fl_set_object_lcolor(obj,FL_WHITE);
    fl_set_object_lstyle(obj,FL_NORMAL_STYLE+FL_SHADOW_STYLE);

/*
  fdui->pathlen_sl = obj = fl_add_valslider(FL_VERT_NICE_SLIDER,105,430,30,95,"PathLen");
    fl_set_object_boxtype(obj,FL_FRAME_BOX);
    fl_set_object_color(obj,FL_DARKCYAN,FL_YELLOW);
    fl_set_object_callback(obj,slider_cb,cmd_pathlen);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, 200000, 10000);
    fl_set_slider_value(obj, 20000);

  fdui->stepping_sl = obj = fl_add_valslider(FL_VERT_NICE_SLIDER,140,430,30,95,"Stepping");
    fl_set_object_boxtype(obj,FL_FRAME_BOX);
    fl_set_object_color(obj,FL_DARKCYAN,FL_WHEAT);
    fl_set_object_callback(obj,slider_cb,cmd_stepping);
*/

  fdui->update_sl = obj = fl_add_valslider(FL_VERT_NICE_SLIDER,175,430,30,95,"Update");
    fl_set_object_boxtype(obj,FL_FRAME_BOX);
    fl_set_object_color(obj,FL_DARKCYAN,FL_DARKGOLD);
    fl_set_object_callback(obj,slider_cb,cmd_update);
    fl_set_slider_precision(obj, 0);
    fl_set_slider_bounds(obj, 3000, 200);
    fl_set_slider_value(obj, 200);

  fdui->turn_dl = obj = fl_add_dial(FL_LINE_DIAL,100,655,40,40,"Turn");
    fl_set_object_boxtype(obj,FL_ROUNDED3D_UPBOX);
    fl_set_object_color(obj,FL_CYAN,FL_RED);
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT);
    fl_set_object_callback(obj,dial_cb,cmd_turn);
    fl_set_dial_bounds(obj, 0, 360);
    fl_set_dial_value(obj, 180);
    fl_set_dial_step(obj, 1);
    fl_set_dial_direction(obj, FL_DIAL_CCW);
    fl_set_object_posthandler(obj, post_handler);

  fdui->gripper_dl = obj = fl_add_dial(FL_LINE_DIAL,15,570,75,75,"Arm");
    fl_set_object_boxtype(obj,FL_OVAL3D_UPBOX);
    fl_set_object_color(obj,FL_CYAN,FL_BLUE);
    fl_set_object_callback(obj,dial_cb,cmd_armpos);
    fl_set_dial_bounds(obj,-45.0,225);
//    fl_set_dial_bounds(obj, 0, 255);
//    fl_set_dial_angles(obj, 75, 285);
    fl_set_dial_angles(obj, 45, 315);
    fl_set_dial_value(obj, 110);
    fl_set_dial_step(obj, 1);
    fl_set_dial_direction(obj, FL_DIAL_CCW);
    fl_set_dial_return(obj, FL_RETURN_CHANGED);
    fl_set_object_posthandler(obj, post_handler);



  fdui->move_bt[7] = obj = fl_add_button(FL_TOUCH_BUTTON,100,575,25,25,"@7");
     fl_set_object_callback(fdui->move_bt[7],do_nothing,cmd_move7);
  fdui->move_bt[8] = obj = fl_add_button(FL_TOUCH_BUTTON,125,575,25,25,"@8");
     fl_set_object_callback(fdui->move_bt[8],do_nothing,cmd_move8);
  fdui->move_bt[9] = obj = fl_add_button(FL_TOUCH_BUTTON,150,575,25,25,"@9");
     fl_set_object_callback(fdui->move_bt[9],do_nothing,cmd_move9);
  fdui->move_bt[4] = obj = fl_add_button(FL_TOUCH_BUTTON,100,600,25,25,"@4");
     fl_set_object_callback(fdui->move_bt[4],do_nothing,cmd_move4);
  fdui->move_bt[1] = obj = fl_add_button(FL_TOUCH_BUTTON,100,625,25,25,"@1");
     fl_set_object_callback(fdui->move_bt[1],do_nothing,cmd_move1);
  fdui->move_bt[2] = obj = fl_add_button(FL_TOUCH_BUTTON,125,625,25,25,"@2");
     fl_set_object_callback(fdui->move_bt[2],do_nothing,cmd_move2);
  fdui->move_bt[3] = obj = fl_add_button(FL_TOUCH_BUTTON,150,625,25,25,"@3");
     fl_set_object_callback(fdui->move_bt[3],do_nothing,cmd_move3);
  fdui->move_bt[6] = obj = fl_add_button(FL_TOUCH_BUTTON,150,600,25,25,"@6");
     fl_set_object_callback(fdui->move_bt[6],do_nothing,cmd_move6);

  for (int i=1; i<=9; i++)
    { 
     if (i == 5)
	continue;
  	
     fl_set_object_lcolor(fdui->move_bt[i],FL_BLUE);
     fl_set_object_posthandler(fdui->move_bt[i], post_handler);
     fl_set_object_prehandler(fdui->move_bt[i], preemptive_handler);
    } 


  fdui->led_bt = obj = fl_add_checkbutton(FL_PUSH_BUTTON,30,430,65,25,"LED");
    fl_set_object_boxtype(obj,FL_FLAT_BOX);
    fl_set_object_callback(obj,button_cb,cmd_led);
    fl_set_object_posthandler(obj, post_handler);

  fdui->odo_bt = obj = fl_add_checkbutton(FL_PUSH_BUTTON,30,455,65,25,"Odo");
    fl_set_object_boxtype(obj,FL_FLAT_BOX);
    fl_set_object_callback(obj,button_cb,cmd_odo);
    fl_set_object_posthandler(obj, post_handler);

  fdui->visual_bt = obj = fl_add_checkbutton(FL_PUSH_BUTTON,30,480,65,25,"Visual");
    fl_set_object_boxtype(obj,FL_FLAT_BOX);
    fl_set_object_callback(obj,button_cb,cmd_visual);
    fl_set_object_posthandler(obj, post_handler);

  fdui->mpeg_bt = obj = fl_add_checkbutton(FL_PUSH_BUTTON,30,505,65,25,"MPEG");
    fl_set_object_boxtype(obj,FL_FLAT_BOX);
    fl_set_object_callback(obj,button_cb,cmd_mpeg);
    fl_set_object_posthandler(obj, post_handler);

  fdui->run_bt = obj = fl_add_lightbutton(FL_PUSH_BUTTON,190,665,50,30,"Run");
    fl_set_object_callback(obj,button_cb,cmd_run);
    fl_set_object_posthandler(obj, post_handler);

  fdui->grip_bt = obj = fl_add_lightbutton(FL_PUSH_BUTTON,20,665,50,30,"Grip");
    fl_set_object_callback(obj,button_cb,cmd_grip);
    fl_set_object_posthandler(obj, post_handler);

  fdui->speed_sl = obj = fl_add_valslider(FL_VERT_NICE_SLIDER,215,570,25,85,"Speed");
    fl_set_object_boxtype(obj,FL_FRAME_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT);
    fl_set_object_callback(obj,slider_cb,cmd_speed);
    fl_set_slider_precision(obj, 1);
    fl_set_slider_bounds(obj, 5.0, 1.0);
    fl_set_slider_value(obj, 1.8);
    fl_set_object_posthandler(obj, post_handler);

  for (int i = 0; i<4; i++)
    {
     fdui->filter_ch[i] = obj = fl_add_choice(FL_NORMAL_CHOICE,300+(i*45),140,35,30,"");
       fl_set_object_boxtype(obj,FL_UP_BOX);
//       fl_set_object_color(obj,FL_PALEGREEN,FL_BLACK);
//       fl_set_object_lcol(obj,FL_RIGHT_BCOL);
       fl_set_object_lalign(obj,FL_ALIGN_RIGHT);
   //    fl_set_object_callback(obj,menu_cb,2);
       fl_addto_choice(obj,"none|clip|fft|low|high|avg");
       fl_set_choice(obj,1);   
       fl_set_object_posthandler(obj, post_handler);
       obj->bw = 1;
    }

  fdui->control_ch = obj = fl_add_choice(FL_NORMAL_CHOICE,95,355,55,30,"Controller");
    fl_set_object_color(obj,FL_DARKCYAN,FL_BLACK);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_callback(obj,choice_cb,cmd_control);
//    fl_addto_choice(obj,"neuronal|gripper|follow|Kompaß|Homeo");
    fl_set_choice(obj,3);   
    fl_set_object_posthandler(obj, post_handler);
//    fl_set_object_boxtype(obj,FL_FLAT_BOX);


//  fdui->algo_text = obj = fl_add_text(FL_NORMAL_TEXT,155,340,75,20,"s");
  fdui->algo_bt = obj = fl_add_button(FL_MENU_BUTTON,155,355,75,30,"Algorithm"); 
    fl_set_object_callback(obj,create_pup,cmd_algo);
    obj->bw = 1;
	
  fdui->view_bt = obj = fl_add_button(FL_MENU_BUTTON,235,355,55,30,"View");
    fl_set_object_callback(obj,create_pup,cmd_view);
    obj->bw = 1;  

/*
  fdui->mode_ch = obj = fl_add_choice(FL_NORMAL_CHOICE,155,355,55,30,"Mode");
    fl_set_object_color(obj,FL_DARKCYAN,FL_BLACK);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_callback(obj,choice_cb,cmd_mode);
//    fl_addto_choice(obj,"real|piped|traj.");
    fl_set_choice(obj,1);   
    fl_set_object_posthandler(obj, post_handler);


  fdui->robos_ch = obj = fl_add_choice(FL_NORMAL_CHOICE,215,355,55,30,"Robots");
    fl_set_object_color(obj,FL_DARKCYAN,FL_BLACK);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_callback(obj,choice_cb,cmd_robots);
    for (int i=0; i<4; i++)
      {
       sprintf(st,"%d",i+1); 
       fl_addto_choice(obj,st);
      } 
    fl_set_choice(obj,2);   
    fl_set_object_posthandler(obj, post_handler);

  fdui->select_ch = obj = fl_add_choice(FL_NORMAL_CHOICE,275,355,55,30,"Select");
    fl_set_object_color(obj,FL_DARKCYAN,FL_BLACK);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_callback(obj,choice_cb,cmd_select);
    for (int i=0; i<2; i++)
      {
       sprintf(st,"%d",i+1); 
       fl_addto_choice(obj,st);
      } 
    fl_set_choice(obj,1);   
    fl_set_object_posthandler(obj, post_handler);
*/

  fdui->device_in = obj = fl_add_input(FL_NORMAL_INPUT,335,355,75,30,"Device");
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_callback(obj,input_cb,cmd_device);
    obj->bw = 1;	

/*
  fdui->gamma_bt = obj = fl_add_checkbutton(FL_PUSH_BUTTON,275,605,70,20,"Gamma");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,button_cb,cmd_gamma);

  fdui->addline_bt = obj = fl_add_checkbutton(FL_PUSH_BUTTON,275,630,70,20,"Addline");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,button_cb,cmd_addline);

  fdui->slBorder_bt = obj = fl_add_checkbutton(FL_PUSH_BUTTON,275,655,70,20,"slBorder");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
//    fl_set_object_callback(obj,button_cb,cmd_gamma);

  fdui->klevel_sl = obj = fl_add_valslider(FL_VERT_NICE_SLIDER,265,425,35,155,"K_level");
    fl_set_object_boxtype(obj,FL_FLAT_BOX);
    fl_set_object_color(obj,FL_COL1,FL_DARKGOLD);
    fl_set_object_callback(obj,slider_cb,cmd_klevel);
    fl_set_slider_bounds(obj, 5000, 500000.0);
    fl_set_slider_value(obj, 10000.00);
    fl_set_slider_step(obj, 500.0);

  fdui->epsilon_sl = obj = fl_add_valslider(FL_VERT_NICE_SLIDER,300,425,35,155,"epsilon");
    fl_set_object_boxtype(obj,FL_FLAT_BOX);
    fl_set_object_color(obj,FL_COL1,FL_YELLOW);
    fl_set_object_callback(obj,slider_cb,cmd_epsilon);
    fl_set_slider_precision(obj, 4);
    fl_set_slider_bounds(obj, 0.10, 0.01);
    fl_set_slider_value(obj, 0.01);
//    fl_set_slider_step( obj, 0.0001);

  fdui->ny_sl = obj = fl_add_valslider(FL_VERT_NICE_SLIDER,335,425,35,155,"ny");
    fl_set_object_boxtype(obj,FL_FLAT_BOX);
    fl_set_object_color(obj,FL_COL1,FL_BLUE);
    fl_set_object_callback(obj,slider_cb,cmd_ny);
    fl_set_slider_value(obj, 0.01);
    fl_set_slider_bounds(obj, 0.2, 0.01);

  fdui->infoTH_sl = obj = fl_add_valslider(FL_VERT_NICE_SLIDER,370,425,35,155,"info_TH");
    fl_set_object_boxtype(obj,FL_FLAT_BOX);
    fl_set_object_color(obj,FL_COL1,FL_PALEGREEN);
    fl_set_object_callback(obj,slider_cb,cmd_infoTH);
    fl_set_slider_bounds(obj, 20.0, 1.0);
*/

  for (int i=0; i<8; i++)
    {
     fdui->ired_sl[i] = obj = fl_add_slider(FL_VERT_FILL_SLIDER,445+(i*10),340,15,110,"");
       fl_set_object_boxtype(obj,FL_FLAT_BOX);
       fl_set_object_color(obj,FL_BLACK,FL_DARKORANGE);
       fl_set_slider_bounds(obj,1.0,0.0);
       fl_set_object_callback(obj,slider_cb,cmd_iredsl);
//       fl_deactivate_object(obj);	

     fdui->ambl_sl[i] = obj = fl_add_slider(FL_VERT_FILL_SLIDER,540+(i*10),340,15,110,"");
       fl_set_object_boxtype(obj,FL_FLAT_BOX);
       fl_set_object_color(obj,FL_BLACK,FL_YELLOW);
       fl_set_slider_bounds(obj,1.0,0.0);
       fl_set_object_callback(obj,slider_cb,cmd_amblsl);
//       fl_deactivate_object(obj);	
    }	  

  for (int i=0; i<64; i++)
    {
     fdui->lcd_sl[i] = obj = fl_add_slider(FL_VERT_FILL_SLIDER,20+(i*9),20,10,110,"");
       fl_set_object_boxtype(obj,FL_FLAT_BOX);
       fl_set_object_color(obj,FL_BLACK,FL_WHITE);
       fl_set_object_callback(obj,slider_cb,0);
       fl_set_slider_bounds(obj,1.0,0.0);
       fl_deactivate_object(obj);	
       obj->bw = 0;	
    }

  fdui->filter_plot = obj = fl_add_xyplot(FL_FILL_XYPLOT,20,190,555,120,"");
    fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN);
    fl_set_xyplot_xtics(obj, -1, -1);                                               
    fl_set_xyplot_ytics(obj, -1, -1);                                               
    fl_set_xyplot_linewidth(obj, 0, 2);
    fl_set_xyplot_ybounds(obj,0.0,1.05);
    fl_set_xyplot_ygrid(obj, 4);

  fdui->iris_sl = obj = fl_add_valslider(FL_VERT_FILL_SLIDER,610,35,30,235,"Iris");
    fl_set_object_boxtype(obj,FL_FLAT_BOX);
    fl_set_object_color(obj,FL_BLACK,FL_LEFT_BCOL);
    fl_set_object_lcolor(obj,FL_YELLOW);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_slider_bounds(obj, 1.00, 0.00);
    fl_set_object_posthandler(obj, post_handler);
    fl_deactivate_object(obj);	



  fdui->exit_bt = obj = fl_add_button(FL_NORMAL_BUTTON,20,355,60,30,"Exit");
    fl_set_object_callback(obj,button_cb,-1);

  fdui->grip_sl = obj = fl_add_slider(FL_HOR_SLIDER,445,480,180,25,"Gripper");
    fl_set_object_boxtype(obj,FL_FRAME_BOX);
    fl_set_object_color(obj,FL_COL1,FL_DEEPPINK);
    fl_set_object_lsize(obj,FL_DEFAULT_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM_LEFT);
//    fl_set_object_callback(obj,slider_cb,0);
//    fl_set_slider_precision(obj, 3);
//    fl_set_slider_bounds(obj, 0.000, 255.000);
//    fl_set_slider_value(obj, 20.000);
    fl_set_slider_value(obj, 0.50);
    fl_deactivate_object(obj);	

  fdui->contact_bt = obj = fl_add_roundbutton(FL_PUSH_BUTTON,450,520,30,30,"Contact");
    fl_set_object_color(obj,FL_TOP_BCOL,FL_YELLOW);
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT);
    fl_deactivate_object(obj);	

  fdui->resistor_in = obj = fl_add_input(FL_NORMAL_INPUT,550,515,70,30,"Resistor");
    fl_set_object_color(obj,FL_DARKCYAN,FL_MCOL);
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
    fl_deactivate_object(obj);	
    obj->bw = 1;

  obj = fl_add_text(FL_NORMAL_TEXT,195,135,40,40,"@2-->");
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);

  fdui->world_pos = obj = fl_add_positioner(FL_NORMAL_POSITIONER,440,565,140,135,"Pos");
    fl_set_object_boxtype(obj,FL_FRAME_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_callback(obj,pos_cb,0);

  fdui->alpha_dl = obj = fl_add_dial(FL_LINE_DIAL,585,570,55,55,"");
    fl_set_object_color(obj,FL_DARKCYAN,FL_TOP_BCOL);
    fl_set_dial_bounds(obj, 0, 6.28319);
    fl_set_dial_value(obj, 3.14159264);
    fl_set_dial_step(obj, 0.0174533);
    fl_set_dial_direction(obj, FL_DIAL_CCW);
    fl_set_dial_return(obj, FL_RETURN_CHANGED);
    fl_deactivate_object(obj);	

  fdui->aspect_dl = obj = fl_add_dial(FL_LINE_DIAL,585,640,55,55,"");
    fl_set_object_color(obj,FL_TOMATO,FL_YELLOW);
    fl_set_dial_bounds(obj, 0, 6.28319);
    fl_set_dial_value(obj, 3.14159264);
    fl_set_dial_step(obj, 0.0174533);
    fl_set_dial_direction(obj, FL_DIAL_CCW);
    fl_set_dial_return(obj, FL_RETURN_CHANGED);
    fl_deactivate_object(obj);	



  obj = fl_add_text(FL_NORMAL_TEXT,455,450,65,20,"Proximity");
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  obj = fl_add_text(FL_NORMAL_TEXT,550,450,65,20,"Ambient");
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);


  obj = fl_add_text(FL_NORMAL_TEXT,270,420,70,20,"send delay:");
  fdui->send_delay = obj = fl_add_text(FL_NORMAL_TEXT,340,420,70,20,"s");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);

  obj = fl_add_text(FL_NORMAL_TEXT,270,440,70,20,"recv. delay:");
  fdui->receive_delay = obj = fl_add_text(FL_NORMAL_TEXT,340,440,70,20,"r");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);

  obj = fl_add_text(FL_NORMAL_TEXT,270,460,70,20,"update period:");
  fdui->update = obj = fl_add_text(FL_NORMAL_TEXT,340,460,70,20,"u");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);

  obj = fl_add_text(FL_NORMAL_TEXT,270,480,70,20,"unfairness:");
  fdui->unfair = obj = fl_add_text(FL_NORMAL_TEXT,340,480,70,20,"f");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);

  obj = fl_add_text(FL_NORMAL_TEXT,270,500,70,20,"saving costs:");
  fdui->save_costs = obj = fl_add_text(FL_NORMAL_TEXT,340,500,70,20,"c");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);

  obj = fl_add_text(FL_NORMAL_TEXT,270,520,70,20,"update sleep:");
  fdui->upsleep = obj = fl_add_text(FL_NORMAL_TEXT,340,520,70,20,"l");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);

  obj = fl_add_text(FL_NORMAL_TEXT,270,540,70,20,"phase shift:");
  fdui->upphase = obj = fl_add_text(FL_NORMAL_TEXT,340,540,70,20,"p");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);

  obj = fl_add_text(FL_NORMAL_TEXT,270,560,70,20,"total turn:");
  fdui->total_turn = obj = fl_add_text(FL_NORMAL_TEXT,340,560,70,20,"t");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);

  obj = fl_add_text(FL_NORMAL_TEXT,270,580,70,20,"delta_s_avg:");
  fdui->delta_s_avg = obj = fl_add_text(FL_NORMAL_TEXT,340,580,70,20,"d");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);

/*  obj = fl_add_text(FL_NORMAL_TEXT,550,450,65,20,"Ambient");
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  obj = fl_add_text(FL_NORMAL_TEXT,550,450,65,20,"Ambient");
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  obj = fl_add_text(FL_NORMAL_TEXT,550,450,65,20,"Ambient");
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
*/
  fl_end_form();

  fdui->panel->fdui = fdui;

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








/**/
/**/
/**/
/**/
/**/
/**/
/**/
/**/
/*****  End Of File  ****************************/
