Ejemplo n.º 1
0
FD_dialattrib *
create_form_dialattrib( void )
{
    FL_OBJECT *obj;
    FD_dialattrib *fdui = ( FD_dialattrib * ) fl_malloc( sizeof *fdui );

    int old_bw = fl_get_border_width( );
    fl_set_border_width( -1 );

    fdui->vdata = fdui->cdata = NULL;
    fdui->ldata = 0;

    fdui->dialattrib = fl_bgn_form( FL_NO_BOX, 540, 280 );

    fdui->background = obj = fl_add_box( FL_FLAT_BOX, 0, 0, 540, 280, "" );

    fdui->returnsetting = obj = fl_add_menu( FL_PULLDOWN_MENU, 305, 90, 138, 24, "Return Setting" );
    fl_set_object_boxtype( obj, FL_UP_BOX );
    fl_set_object_callback( obj, dial_returnsetting_change, 0 );

    fdui->minval = obj = fl_add_input( FL_FLOAT_INPUT, 195, 45, 92, 24, "Dial Min" );
    fl_set_object_lsize( obj, FL_NORMAL_SIZE );
    fl_set_object_callback( obj, dial_minmax_change, 0 );

    fdui->maxval = obj = fl_add_input( FL_FLOAT_INPUT, 195, 77, 92, 24, "DialMax" );
    fl_set_object_lsize( obj, FL_NORMAL_SIZE );
    fl_set_object_callback( obj, dial_minmax_change, 0 );

    fdui->initialval = obj = fl_add_input( FL_FLOAT_INPUT, 195, 109, 92, 24, "Initial Value" );
    fl_set_object_lsize( obj, FL_NORMAL_SIZE );
    fl_set_object_callback( obj, dial_initialvalue_change, 0 );

    fdui->step = obj = fl_add_input( FL_FLOAT_INPUT, 195, 141, 92, 24, "Dial Step" );
    fl_set_object_lsize( obj, FL_NORMAL_SIZE );
    fl_set_object_callback( obj, dial_stepchange_cb, 0 );

    fdui->thetai = obj = fl_add_input( FL_FLOAT_INPUT, 195, 173, 92, 24, "Min. Angle" );
    fl_set_object_lsize( obj, FL_NORMAL_SIZE );
    fl_set_object_callback( obj, dial_thetachange_cb, 0 );

    fdui->thetaf = obj = fl_add_input( FL_FLOAT_INPUT, 195, 205, 92, 24, "Max. Angle" );
    fl_set_object_lsize( obj, FL_NORMAL_SIZE );
    fl_set_object_callback( obj, dial_thetachange_cb, 1 );

    fdui->dir = obj = fl_add_choice( FL_NORMAL_CHOICE2, 306, 155, 134, 25, "Direction" );
    fl_set_object_lalign( obj, FL_ALIGN_TOP );
    fl_set_object_callback( obj, dir_cb, 0 );

    obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 30, 15, 480, 240, "Dial Attributes" );
    fl_set_object_lcolor( obj, FL_DARKVIOLET );
    fl_set_object_lsize( obj, FL_MEDIUM_SIZE );
    fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE + FL_EMBOSSED_STYLE );

    fl_end_form( );

    fdui->dialattrib->fdui = fdui;
    fl_set_border_width( old_bw );

    return fdui;
}
Ejemplo n.º 2
0
void create_form_clock(void)
{
   FL_OBJECT *obj;

   if (fclock)
       return;

   fclock = fl_bgn_form(FL_NO_BOX,500,350);
   obj = fl_add_box(FL_UP_BOX,0,0,500,350,"");

   obj = fl_add_clock(FL_DIGITAL_CLOCK,185,20,150,35,"");
   fl_set_object_boxtype(obj,FL_ROUNDED_BOX); 
   fl_set_object_color(obj,FL_COL1,FL_BLACK);
   fl_set_object_lsize(obj,FL_MEDIUM_SIZE);
   fl_set_object_lstyle(obj,FL_BOLD_STYLE);

   obj = fl_add_clock(FL_ANALOG_CLOCK,30,70,220,200,"");
   fl_set_object_boxtype(obj,FL_UP_BOX);

   obj = fl_add_clock(FL_ANALOG_CLOCK,260,70,220,200,"");
   fl_set_object_boxtype(obj,FL_OVAL3D_UPBOX);
   obj = fl_add_button(FL_NORMAL_BUTTON,375,300,110,35,"Exit");
   fl_set_object_callback(obj, exit_cb, 0);
   fl_end_form();

   fl_scale_form(fclock, 0.7, 0.7);
}
Ejemplo n.º 3
0
static FD_input *
create_input( const char * str1,
              const char * defstr )
{
    FD_input *fdui = fl_calloc( 1, sizeof *fdui );
    int oldy = fli_inverted_y;
    int oldu = fl_get_coordunit( );

    fli_inverted_y = 0;
    fl_set_coordunit( FL_COORD_PIXEL );

    fdui->form = fl_bgn_form( FL_FLAT_BOX, 460, 130 );

    fdui->input = fl_add_input( FL_NORMAL_INPUT, 30, 50, 400, 30, str1 );
    fl_set_input( fdui->input, defstr );

    fdui->but = fl_add_button( FL_RETURN_BUTTON, 185, 94, 90, 27, "OK" );
    fli_parse_goodies_label( fdui->but, FLOKLabel );

    fl_set_form_hotobject( fdui->form, fdui->but );

    fl_end_form( );

    fli_handle_goodie_font( fdui->but, fdui->input );

    fl_register_raw_callback( fdui->form, FL_ALL_EVENT,
                              fli_goodies_preemptive );
    fl_set_form_atclose( fdui->form, fl_goodies_atclose, fdui->but );

    fli_inverted_y = oldy;
    fl_set_coordunit( oldu );

    return fdui;
}
Ejemplo n.º 4
0
void g3d_create_steering_form(void)
{int i;
 double s;

  s = P3D_NB_LOCAL_PLANNER*20.0 + 20;

  BUTTON_TAB_OBJ = (FL_OBJECT  **) malloc(P3D_NB_LOCAL_PLANNER*sizeof(FL_OBJECT  *));

  STEERING_FORM = fl_bgn_form(FL_UP_BOX,200.0,s+30);

  obj1 = fl_add_frame(FL_ENGRAVED_FRAME,10,15,180,s,""); 
  obj2 = fl_add_box(FL_FLAT_BOX,55,10,90,10,"Steering methods");

  GROUP = fl_bgn_group();

  for(i=0;i<P3D_NB_LOCAL_PLANNER;i++){
    BUTTON_TAB_OBJ[i] = fl_add_checkbutton(FL_RADIO_BUTTON,45,25+i*20.0,55,25,p3d_local_getname_planner((p3d_localpath_type) i));
    fl_set_object_color(BUTTON_TAB_OBJ[i],FL_MCOL,FL_GREEN);
    fl_set_call_back(BUTTON_TAB_OBJ[i],CB_button_tab_obj,i);
  }

  fl_set_button(BUTTON_TAB_OBJ[p3d_local_get_planner()],1);

  //GROUP = 
  fl_end_group();

  fl_end_form();
}
Ejemplo n.º 5
0
FD_landmin *create_form_landmin(void)
{
  FL_OBJECT *obj;
  FD_landmin *fdui = (FD_landmin *) fl_calloc(1, sizeof(*fdui));

  fdui->landmin = fl_bgn_form(FL_NO_BOX, 330, 280);
  obj = fl_add_box(FL_UP_BOX,0,0,330,280,"");
  obj = fl_add_text(FL_NORMAL_TEXT,10,10,70,30,"Connect to :");
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  obj = fl_add_text(FL_NORMAL_TEXT,10,50,90,30,"Disconect from:");
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  obj = fl_add_button(FL_NORMAL_BUTTON,60,250,220,20,"Quit");
    fl_set_object_callback(obj,cb_land_quitb,0);
  obj = fl_add_clock(FL_DIGITAL_CLOCK,140,225,70,20,"");
    fl_set_object_color(obj,FL_INACTIVE,FL_CYAN);
  fdui->host_listOB = obj = fl_add_browser(FL_NORMAL_BROWSER,40,100,270,120,"Connected to:");
    fl_set_object_color(obj,FL_WHITE,FL_YELLOW);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_callback(obj,cb_landseld_hst,0);
  fdui->landnhOB = obj = fl_add_choice(FL_NORMAL_CHOICE2,110,10,200,30,"");
    fl_set_object_callback(obj,cb_land_nh,0);
   fl_set_choice_entries(obj, fdchoice_0);
   fl_set_choice(obj,1);
  fdui->landdhOB = obj = fl_add_choice(FL_NORMAL_CHOICE2,110,50,200,30,"");
    fl_set_object_callback(obj,cb_land_dh,0);
   fl_set_choice_entries(obj, fdchoice_1);
   fl_set_choice(obj,1);
  fl_end_form();

  fdui->landmin->fdui = fdui;

  return fdui;
}
Ejemplo n.º 6
0
/* -------------------- MAIN FORM CREATION GROUP --------------------- */
void g3d_create_grasp_planning_form(void)
{
  GRASP_PLANNING_FORM = fl_bgn_form(FL_UP_BOX, 220, 580);

  g3d_create_grasp_planning_group();
  fl_end_form();
}
FD_sensing_form *create_form_sensing_form(void)
{
  FL_OBJECT *obj;
  FD_sensing_form *fdui = (FD_sensing_form *) fl_calloc(1, sizeof(*fdui));

  fdui->sensing_form = fl_bgn_form(FL_NO_BOX, 620, 600);
  obj = fl_add_box(FL_UP_BOX,0,0,620,600,"");
  fdui->spec_SN1 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,50,500,100,"spectrum_plot_SN1");
  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  fdui->spec_SN2 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,180,500,100,"spectrum_plot_SN2");
  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  fdui->spec_SN3 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,310,500,100,"spectrum_plot_SN3");
  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  fdui->Secondary_Network_frequencies = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,460,500,100,"Secondary_Network_frequencies");
  fl_set_object_color(obj,FL_BLACK,FL_GREEN);
  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  fl_end_form();

  fdui->sensing_form->fdui = fdui;

  return fdui;
}
Ejemplo n.º 8
0
static void
create_it( void )
{
    FL_OBJECT *text;

    if ( tip )
        return;

    tip              = fl_calloc( 1, sizeof *tip );
    tip->fntstyle    = FL_NORMAL_STYLE;
    tip->fntsize     = FL_DEFAULT_SIZE;
    tip->boxtype     = FL_BORDER_BOX;
    tip->lalign      = fl_to_inside_lalign( FL_ALIGN_LEFT );
    tip->textcolor   = FL_BLACK;
    tip->background  = FL_YELLOW;

    tip->tooltipper  = fl_bgn_form( FL_NO_BOX, 5, 5 );

    tip->text = text = fl_add_box( tip->boxtype, 0, 0, 5, 5, "" );
    fl_set_object_bw( text, -1 );
    fl_set_object_lstyle( text, tip->fntstyle );
    fl_set_object_lsize( text, tip->fntsize );
    fl_set_object_lcolor( text, tip->textcolor );
    fl_set_object_lalign( text, tip->lalign );
    fl_set_object_color( text, tip->background, tip->background );

    fl_end_form( );
}
Ejemplo n.º 9
0
FD_config_dialog *
create_form_config_dialog( void )
{
    FL_OBJECT *obj;
    FD_config_dialog *fdui = fl_malloc( sizeof *fdui );

    fdui->vdata = fdui->cdata = NULL;
    fdui->ldata = 0;

    fdui->config_dialog = fl_bgn_form( FL_NO_BOX, 410, 120 );

    obj = fl_add_box( FL_UP_BOX, 0, 0, 410, 120, "" );

    fdui->cancel_btn = obj = fl_add_button( FL_NORMAL_BUTTON, 80, 75, 100, 30, "Cancel" );
    fl_set_object_lalign( obj, FL_ALIGN_CENTER );
    fl_set_object_callback( obj, get_dir_callback, -1 );

    fdui->ok_btn = obj = fl_add_button( FL_RETURN_BUTTON, 225, 75, 100, 30, "OK" );
    fl_set_object_lalign( obj, FL_ALIGN_CENTER );
    fl_set_object_callback( obj, get_dir_callback, 0 );

    fdui->dir_input = obj = fl_add_input( FL_NORMAL_INPUT, 80, 30, 300, 30, "Directory" );
    fl_set_object_return( obj, FL_RETURN_END_CHANGED );

    fl_end_form( );

    fdui->config_dialog->fdui = fdui;

    return fdui;
}
Ejemplo n.º 10
0
static void
create_colorform( void )
{
    int i, j;

    if ( cs->colorform )
        return;

    cs->colorform = fl_bgn_form( FL_UP_BOX, 240, 220 );

    for ( i = 0; i < 8; i++ )
        for ( j = 0; j < 8; j++ )
        {
            cs->col[ 8 * i + j ] = fl_add_button( FL_NORMAL_BUTTON, 40 + j * 20,
                                                  10 + i * 20, 20, 20, "" );
            fl_set_object_boxtype( cs->col[ 8 * i + j ], FL_BORDER_BOX );
            fl_set_object_lcolor( cs->col[ 8 * i + j ], 7 );
        }

    cs->prev = fl_add_button( FL_NORMAL_BUTTON, 10, 10, 30, 160, "@4" );
    cs->next = fl_add_button( FL_NORMAL_BUTTON, 200, 10, 30, 160, "@6" );
    cs->cancel = fl_add_button( FL_NORMAL_BUTTON, 80, 180, 140, 30, "Cancel" );
    cs->cindex = fl_add_text( FL_NORMAL_TEXT, 5, 180, 70, 30, "Cancel" );
    fl_set_object_lsize( cs->cindex,FL_TINY_SIZE );
    fl_end_form( );
}
Ejemplo n.º 11
0
void create_form_HelpForm(void)
{
  FL_OBJECT *obj;

  if (HelpForm)
     return;

  HelpForm = fl_bgn_form(FL_NO_BOX,530,340);
  obj = fl_add_box(FL_UP_BOX,0,0,530,340,"");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  HelpBrowser = obj = fl_add_browser(FL_NORMAL_BROWSER,10,35,510,275,"");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  obj = fl_add_text(FL_NORMAL_TEXT,10,10,435,20,"Not Knot: The Software   Interactive Hyperbolic Flythrough");
    fl_set_object_boxtype(obj,FL_NO_BOX);
    fl_set_object_color(obj,FL_COL1,FL_COL1);
    fl_set_object_lcolor(obj,FL_BLUE);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
  Done = obj = fl_add_button(FL_NORMAL_BUTTON,455,10,60,20,"Done");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,DoneProc,0);

  DiagramGroup = fl_bgn_group();
  EucDiag = obj = fl_add_button(FL_RADIO_BUTTON,95,310,140,25,"Euclidean Diagram");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,DiagProc,EUC);
  HypDiag = obj = fl_add_button(FL_RADIO_BUTTON,305,310,150,25,"Hyperbolic Diagram");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,DiagProc,HYP);
  fl_end_group();

  fl_end_form();

}
Ejemplo n.º 12
0
void create_form_MainForm()
{
  FL_OBJECT *obj;
  MainForm = fl_bgn_form(FL_NO_BOX,280.0,180.0);
  obj = fl_add_box(FL_UP_BOX,0.0,0.0,280.0,180.0,"");
  QuitButton = obj = fl_add_button(FL_NORMAL_BUTTON,200.0,70.0,60.0,40.0,"Quit");
    fl_set_object_lsize(obj,FL_LARGE_FONT);
    fl_set_call_back(obj,QuitProc,0);
  DrawButton = obj = fl_add_button(FL_NORMAL_BUTTON,20.0,70.0,150.0,40.0,"New Line");
    fl_set_object_lsize(obj,FL_LARGE_FONT);
    fl_set_call_back(obj,DrawButtonProc,0);
  UndoButton = obj = fl_add_button(FL_NORMAL_BUTTON,20.0,20.0,90.0,40.0,"Undo");
    fl_set_object_lsize(obj,FL_LARGE_FONT);
    fl_set_call_back(obj,UndoButtonProc,0);
  VertexButton = obj = fl_add_lightbutton(FL_PUSH_BUTTON,130.0,20.0,130.0,40.0,"Vertices Only");
    fl_set_call_back(obj,VertexButtonProc,0);
  obj = fl_add_text(FL_NORMAL_TEXT,0.0,110.0,280.0,50.0,"Click RIGHT mouse button on an\n object to draw lines.");
    fl_set_object_lcol(obj,4);
    fl_set_object_align(obj,FL_ALIGN_CENTER);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
  obj = fl_add_text(FL_NORMAL_TEXT,0.0,150.0,280.0,30.0,"GRAFFITI");
    fl_set_object_align(obj,FL_ALIGN_CENTER);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
  fl_end_form();
}
Ejemplo n.º 13
0
static PyObject *
form_end_group(formobject *f, PyObject *args)
{
	fl_addto_form(f-> ob_form);
	fl_end_group();
	fl_end_form();
	Py_INCREF(Py_None);
	return Py_None;
}
Ejemplo n.º 14
0
void create_form_ClipPanel(void)
{
  FL_OBJECT *obj;

  if (ClipPanel)
     return;

  ClipPanel = fl_bgn_form(FL_NO_BOX,200,320);
  obj = fl_add_box(FL_UP_BOX,0,0,200,320,"");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  SliceButton = obj = fl_add_button(FL_NORMAL_BUTTON,70,220,50,30,"Slice!");
    fl_set_object_lcolor(obj,FL_RED);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
  obj = fl_add_text(FL_NORMAL_TEXT,20,195,140,20,"ax + by + cz = d");
    fl_set_object_boxtype(obj,FL_NO_BOX);
    fl_set_object_color(obj,FL_COL1,FL_COL1);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  ExitButton = obj = fl_add_button(FL_NORMAL_BUTTON,145,5,50,30,"Exit");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  InfoButton = obj = fl_add_button(FL_NORMAL_BUTTON,10,220,50,30,"Info");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  obj = fl_add_text(FL_NORMAL_TEXT,50,10,90,30,"Ginsu!");
    fl_set_object_boxtype(obj,FL_NO_BOX);
    fl_set_object_color(obj,FL_COL1,FL_COL1);
    fl_set_object_lcolor(obj,FL_BLUE);
    fl_set_object_lsize(obj,FL_LARGE_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_ENGRAVED_STYLE);
  TargInput = obj = fl_add_input(FL_NORMAL_INPUT,10,260,175,30,"TARGET CLIP OBJECT");
    fl_set_object_color(obj,FL_INDIANRED,FL_PALEGREEN);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
  Ainput = obj = fl_add_input(FL_NORMAL_INPUT,10,40,165,30,"a");
    fl_set_object_color(obj,FL_BOTTOM_BCOL,FL_MAGENTA);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT);
  Binput = obj = fl_add_input(FL_NORMAL_INPUT,10,80,165,30,"b");
    fl_set_object_color(obj,FL_BOTTOM_BCOL,FL_MAGENTA);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT);
  Cinput = obj = fl_add_input(FL_NORMAL_INPUT,10,120,165,30,"c");
    fl_set_object_color(obj,FL_BOTTOM_BCOL,FL_MAGENTA);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT);
  Dinput = obj = fl_add_input(FL_NORMAL_INPUT,10,160,165,30,"d");
    fl_set_object_color(obj,FL_BOTTOM_BCOL,FL_MAGENTA);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT);
  EditButton = obj = fl_add_button(FL_PUSH_BUTTON,130,220,50,30,"Edit");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  fl_end_form();

}
Ejemplo n.º 15
0
void anim_reactive_collision_interface(AnimProb * AnimProbPt) {

  int NofCoef;

  NofCoef = XYZ_ANIM.animation[0]->nof_coef;
  ZANIM = AnimProbPt;
  
  if (ARCI != NULL) {
    fl_hide_form(ARCI);
    fl_free_form(ARCI);
    ARCI = NULL;
  }
  
  ARCI = fl_bgn_form(FL_UP_BOX, 200, 370);

  ARCI_REAC_TIME = fl_add_valslider (FL_HOR_SLIDER, 10, 10, 180, 20, "Reaction Time");
  fl_set_slider_bounds (ARCI_REAC_TIME, 0, 3);
  fl_set_slider_value  (ARCI_REAC_TIME, 1);
  fl_set_slider_step   (ARCI_REAC_TIME, 0.1);

  ARCI_CONST_BLOCKS =  fl_add_button(FL_NORMAL_BUTTON, 10, 50, 180, 20, "Constitute Blocks");
  fl_set_object_callback(ARCI_CONST_BLOCKS, anim_arci_cb, 10);
  
  ARCI_NOF_BLOCK = fl_add_text(FL_NORMAL_TEXT, 10, 80, 180, 20, "");
  anim_udpate_nof_blocks();

  ARCI_NOF_ATTEMPTS = fl_add_valslider (FL_HOR_SLIDER, 10, 110, 180, 20, "Number of Attempt for Solving Collisions");
  fl_set_slider_bounds (ARCI_NOF_ATTEMPTS, 0, 1000);
  fl_set_slider_value  (ARCI_NOF_ATTEMPTS, 100);
  fl_set_slider_step   (ARCI_NOF_ATTEMPTS, 10);

  ARCI_SOLVE_COL = fl_add_button(FL_NORMAL_BUTTON, 10, 150, 180, 20, "Solve Blocks");
  fl_set_object_callback(ARCI_SOLVE_COL, anim_arci_cb, 11);

  ARCI_SOLVED = fl_add_text(FL_NORMAL_TEXT, 10, 180, 180, 20, "");
  anim_udpate_solved();

  ARCI_SHOW_SOL = fl_add_button(FL_NORMAL_BUTTON, 10, 210, 180, 20, "Show Solution(s)");
  fl_set_object_callback(ARCI_SHOW_SOL, anim_arci_cb, 12);
      
  ARCI_OPTIM = fl_add_button(FL_NORMAL_BUTTON, 10, 240, 180, 20, "Optimize Solution(s)");
  fl_set_object_callback(ARCI_OPTIM, anim_arci_cb, 13);

  ARCI_OPTIMIZED = fl_add_text(FL_NORMAL_TEXT, 10, 270, 180, 20, "");
  anim_udpate_optimized();

  ARCI_SHOW_OPTIM = fl_add_button(FL_NORMAL_BUTTON, 10, 300, 180, 20, "Show Optimized Solution(s)");
  fl_set_object_callback(ARCI_SHOW_OPTIM, anim_arci_cb, 14);

  ARCI_CLOSE = fl_add_button(FL_NORMAL_BUTTON, 10, 330, 180, 20, "Close");
  fl_set_object_callback(ARCI_CLOSE, anim_arci_cb, 15);
  
  fl_end_form();
  fl_show_form (ARCI, FL_PLACE_SIZE, FL_FULLBORDER, "Reactive collisions");
}
Ejemplo n.º 16
0
void create_form_MainForm(void)
{
  FL_OBJECT *obj;

  if (MainForm)
     return;

  MainForm = fl_bgn_form(FL_NO_BOX,300,240);
  obj = fl_add_box(FL_UP_BOX,0,0,300,240,"");
    fl_set_object_lsize(obj,11);
  obj = fl_add_text(FL_NORMAL_TEXT,10,10,280,40,"Tack Down");
    fl_set_object_boxtype(obj,FL_NO_BOX);
    fl_set_object_color(obj,FL_COL1,FL_COL1);
    fl_set_object_lcolor(obj,FL_RED);
    fl_set_object_lsize(obj,FL_LARGE_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_NORMAL_STYLE+FL_ENGRAVED_STYLE);
  obj = fl_add_text(FL_NORMAL_TEXT,10,40,280,30,"Click button to fix target object in its current");
    fl_set_object_boxtype(obj,FL_NO_BOX);
    fl_set_object_color(obj,FL_COL1,FL_COL1);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  TransButton = obj = fl_add_lightbutton(FL_NORMAL_BUTTON,10,150,130,40,"Tack Down");
    fl_set_object_color(obj,39,FL_YELLOW);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
    fl_set_object_callback(obj,TransButtonProc,0);
  obj = fl_add_button(FL_NORMAL_BUTTON,160,150,130,40,"Quit");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
    fl_set_object_callback(obj,QuitButtonProc,0);
  obj = fl_add_text(FL_NORMAL_TEXT,10,60,280,30,"location in the selected coordinate system");
    fl_set_object_boxtype(obj,FL_NO_BOX);
    fl_set_object_color(obj,FL_COL1,FL_COL1);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  worldButton = obj = fl_add_button(FL_RADIO_BUTTON,0,200,150,40,"World Coordinates");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  obj = fl_add_button(FL_RADIO_BUTTON,150,200,150,40,"Universe Coordinates");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  obj = fl_add_text(FL_NORMAL_TEXT,10,90,280,30,"For best results, make sure normalization");
    fl_set_object_boxtype(obj,FL_NO_BOX);
    fl_set_object_color(obj,FL_COL1,FL_COL1);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  obj = fl_add_text(FL_NORMAL_TEXT,10,110,280,30,"is off and the target object is not the world.");
    fl_set_object_boxtype(obj,FL_NO_BOX);
    fl_set_object_color(obj,FL_COL1,FL_COL1);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  fl_end_form();

}
Ejemplo n.º 17
0
void create_form_FooForm(void)
{
  FL_OBJECT *obj;

  if (FooForm)
     return;

  FooForm = fl_bgn_form(FL_NO_BOX,500,610);
  obj = fl_add_box(FL_UP_BOX,0,0,500,610,"");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  fl_end_form();

}
Ejemplo n.º 18
0
FD_chart_window *create_form_chart_window(void)
{
  FL_OBJECT *obj;
  FD_chart_window *fdui = (FD_chart_window *) fl_calloc(1, sizeof(*fdui));

  fdui->chart_window = fl_bgn_form(FL_NO_BOX, 570, 480);
  obj = fl_add_box(FL_UP_BOX,0,0,570,480,"Population Statistics");
    fl_set_object_lsize(obj,FL_MEDIUM_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_TOP|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
  fdui->max_mass = obj = fl_add_chart(FL_BAR_CHART,10,40,140,120,"Bug Maximum Masses");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->plant_eff = obj = fl_add_chart(FL_BAR_CHART,150,40,140,120,"Bug Plant Efficiency");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->attack = obj = fl_add_chart(FL_BAR_CHART,290,40,140,120,"Bug Attack Capability");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->color1 = obj = fl_add_chart(FL_BAR_CHART,430,40,130,120,"Bug Color 1");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->color2 = obj = fl_add_chart(FL_BAR_CHART,10,180,140,130,"Bug Color 2");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->breeding_age = obj = fl_add_chart(FL_BAR_CHART,150,180,140,130,"Bug Minimum Breeding Age");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->breeding_energy = obj = fl_add_chart(FL_BAR_CHART,290,180,140,130,"Bug Minimum Breeding Energy");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->population = obj = fl_add_chart(FL_LINE_CHART,430,180,130,130,"Global Population");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->energy = obj = fl_add_chart(FL_BAR_CHART,10,330,140,130,"Bug Energy");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->mass = obj = fl_add_chart(FL_BAR_CHART,150,330,140,130,"Bug Mass");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON,460,370,80,30,"OK");
  fdui->metabolism = obj = fl_add_chart(FL_BAR_CHART,290,330,140,130,"Bug Metabolism");
    fl_set_object_boxtype(obj,FL_SHADOW_BOX);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
  fl_end_form();

  fdui->chart_window->fdui = fdui;

  return fdui;
}
Ejemplo n.º 19
0
int
main( int    argc,
      char * argv[ ] )
{
    FL_FORM *form;
    FL_OBJECT *obj;

    fl_initialize( &argc, argv, "FormDemo", 0, 0 );

    form = fl_bgn_form( FL_UP_BOX, 360, 140);

    obj = fl_add_button( FL_TOUCH_BUTTON, 50, 30, 40, 30, "@<<" );
    fl_set_object_boxtype( obj, FL_FRAME_BOX );
    fl_set_object_color( obj, FL_COL1, FL_INDIANRED );
    fl_set_object_callback( obj, show_val, -5 );
    fl_set_button_shortcut( obj, "1", 0 );

    obj = fl_add_button( FL_TOUCH_BUTTON, 90, 30, 40, 30, "@<" );
    fl_set_object_boxtype( obj, FL_FRAME_BOX );
    fl_set_object_color( obj, FL_COL1, FL_INDIANRED );
    fl_set_object_callback( obj,  show_val, -1 );
    fl_set_button_shortcut( obj, "2",  0 );

    valobj = obj = fl_add_box( FL_BORDER_BOX, 130, 30, 100, 30, "" );
    fl_set_object_color( obj, FL_LEFT_BCOL, FL_LEFT_BCOL );

    obj = fl_add_button( FL_TOUCH_BUTTON, 230, 30, 40, 30, "@>" );
    fl_set_object_boxtype( obj, FL_FRAME_BOX );
    fl_set_object_color( obj, FL_COL1, FL_INDIANRED );
    fl_set_object_callback( obj, show_val, 1 );
    fl_set_button_shortcut( obj, "3", 0 );

    obj = fl_add_button( FL_TOUCH_BUTTON, 270, 30, 40, 30, "@>>" );
    fl_set_object_boxtype( obj, FL_FRAME_BOX );
    fl_set_object_callback( obj, show_val, 5 );
    fl_set_object_color( obj, FL_COL1, FL_INDIANRED );
    fl_set_button_shortcut( obj, "4", 0 );

    fl_add_button( FL_NORMAL_BUTTON, 220, 90, 100, 30, "Exit" );

    fl_end_form( );

    fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "Touch Buttons" );

    fl_do_forms( );
    fl_finish( );

    return 0;
}
Ejemplo n.º 20
0
void create_form_PickInfoForm()
{
  FL_OBJECT *obj;
  PickInfoForm = fl_bgn_form(FL_NO_BOX,295.0,165.0);
  obj = fl_add_box(FL_UP_BOX,0.0,0.0,295.0,165.0,"");
  obj = fl_add_text(FL_NORMAL_TEXT,15.0,135.0,255.0,15.0,"The cursor is not pointing at an object.");
  DoneButton = obj = fl_add_button(FL_NORMAL_BUTTON,220.0,10.0,60.0,40.0,"OK");
    fl_set_object_lsize(obj,FL_LARGE_FONT);
    fl_set_call_back(obj,DoneButtonProc,0);
  obj = fl_add_text(FL_NORMAL_TEXT,5.0,115.0,280.0,15.0,"Click the right mouse button on any object");
  obj = fl_add_text(FL_NORMAL_TEXT,10.0,95.0,270.0,15.0,"in the geomview window to draw.  If you");
  obj = fl_add_text(FL_NORMAL_TEXT,5.0,75.0,270.0,15.0,"have no objects to draw on, you may load");
  obj = fl_add_text(FL_NORMAL_TEXT,20.0,55.0,240.0,15.0,"one with the geomview Load button.");
  fl_end_form();
}
Ejemplo n.º 21
0
void g3d_create_path_deformation_form(void){
  g3d_create_form(&PATH_DEFORM_FORM,320,320,FL_UP_BOX);
  g3d_create_retract_frame();
  g3d_create_gvis_checkb();
  g3d_create_frame(&SPACE1,FL_NO_FRAME,100,30.0,"",(void**)&PATH_DEFORM_FORM,1);
  g3d_create_nbretract_input();
  g3d_create_ndraw_counter();
  g3d_create_dof1_counter();
  g3d_create_dof2_counter();
  g3d_create_node_frame();
  g3d_create_vis_graph_frame();

  fl_end_form();
  fl_set_form_icon(PATH_DEFORM_FORM, GetApplicationIcon(), 0);
  fl_set_form_atclose(PATH_DEFORM_FORM, CB_pathDeformForm_OnClose, NULL);
}
Ejemplo n.º 22
0
static PyObject *
form_bgn_group(formobject *f, PyObject *args)
{
	FL_OBJECT *obj;

	fl_addto_form(f-> ob_form);
	obj = fl_bgn_group();
	fl_end_form();

	if (obj == NULL) {
		PyErr_NoMemory();
		return NULL;
	}

	return newgenericobject (obj, (PyMethodDef *) NULL);
}
FD_Secondary_Network_frequencies *create_form_Secondary_Network_frequencies(void)
{
  FL_OBJECT *obj;
  FD_Secondary_Network_frequencies *fdui = (FD_Secondary_Network_frequencies *) fl_calloc(1, sizeof(*fdui));

  fdui->Secondary_Network_frequencies = fl_bgn_form(FL_NO_BOX, 620, 200);
  obj = fl_add_box(FL_UP_BOX,0,0,620,200,"");
  fdui->Selected_frequencies = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,50,500,100,"Selected_frequencies");
  fl_set_object_color(obj,FL_BLACK,FL_GREEN);
  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  fl_end_form();

  fdui->Secondary_Network_frequencies->fdui = fdui;

  return fdui;
}
FD_sens_sensor *create_form_sens_sensor(void)
{
  FL_OBJECT *obj;
  FD_sens_sensor *fdui = (FD_sens_sensor *) fl_calloc(1, sizeof(*fdui));

  fdui->sens_sensor = fl_bgn_form(FL_NO_BOX, 940, 280);
  obj = fl_add_box(FL_UP_BOX,0,0,940,280,"");
  fdui->local_sensing_results = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,30,30,880,210,"Local Sensing Results");
  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  fl_end_form();

  fdui->sens_sensor->fdui = fdui;

  return fdui;
}
Ejemplo n.º 25
0
FD_splash_frm *create_form_splash_frm(void)
{
  FL_OBJECT *obj;
  FD_splash_frm *fdui = (FD_splash_frm *) fl_calloc(1, sizeof(*fdui));

  fdui->splash_frm = fl_bgn_form(FL_NO_BOX, 390, 280);
  obj = fl_add_box(FL_FLAT_BOX,0,0,390,280,"");
  obj = fl_add_pixmap(FL_NORMAL_PIXMAP,40,20,310,100,"");
  obj = fl_add_text(FL_NORMAL_TEXT,70,150,80,30,"text");
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  fl_end_form();

  fdui->splash_frm->fdui = fdui;

  return fdui;
}
Ejemplo n.º 26
0
FD_unCeas *create_form_unCeas(void)
{
  FL_OBJECT *obj;
  FD_unCeas *fdui = (FD_unCeas *) fl_calloc(1, sizeof(*fdui));

  fdui->unCeas = fl_bgn_form(FL_NO_BOX, 140, 190);
  obj = fl_add_box(FL_UP_BOX,0,0,140,190,"");
  fdui->retOB = obj = fl_add_button(FL_NORMAL_BUTTON,15,150,110,30,"Return");
    fl_set_object_callback(obj,unc_ret_cb,0);
  obj = fl_add_clock(FL_ANALOG_CLOCK,5,10,130,130,"");
    fl_set_object_color(obj,FL_INACTIVE,FL_WHITE);
  fl_end_form();

  fdui->unCeas->fdui = fdui;

  return fdui;
}
Ejemplo n.º 27
0
static PyObject *
forms_make_form(PyObject *dummy, PyObject *args)
{
	int type;
	float w, h;
	FL_FORM *form;
	if (!PyArg_Parse(args, "(iff)", &type, &w, &h))
		return NULL;
	form = fl_bgn_form(type, w, h);
	if (form == NULL) {
		/* XXX Actually, cannot happen! */
		PyErr_NoMemory();
		return NULL;
	}
	fl_end_form();
	return newformobject(form);
}
Ejemplo n.º 28
0
FD_mainWindow *create_form_mainWindow(void)
{
  FL_OBJECT *obj;
  FD_mainWindow *fdui = (FD_mainWindow *) fl_calloc(1, sizeof(*fdui));

  fdui->mainWindow = fl_bgn_form(FL_NO_BOX, 550, 490);
  obj = fl_add_box(FL_UP_BOX,0,0,550,490,"");
  fdui->mainCanvas = obj = fl_add_canvas(FL_NORMAL_CANVAS,10,40,510,420,"");
    fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
  fdui->scroll_h = obj = fl_add_scrollbar(FL_HOR_THIN_SCROLLBAR,10,465,510,20,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_gravity(obj, FL_SouthWest, FL_SouthEast);
    fl_set_scrollbar_step(obj, 0.1);
    fl_set_scrollbar_increment(obj, 0.1, 0.1);
  fdui->scroll_v = obj = fl_add_scrollbar(FL_VERT_THIN_SCROLLBAR,525,40,20,420,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_gravity(obj, FL_NorthEast, FL_SouthEast);
    fl_set_scrollbar_step(obj, 0.1);
    fl_set_scrollbar_increment(obj, 0.1, 0.1);
  fdui->pause = obj = fl_add_button(FL_NORMAL_BUTTON,410,5,80,30,"Pause");
    fl_set_button_shortcut(obj,"Pp",1);
    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
  fdui->step = obj = fl_add_button(FL_NORMAL_BUTTON,320,5,80,30,"Step (spc)");
    fl_set_button_shortcut(obj," ",1);
    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
  fdui->add_food = obj = fl_add_button(FL_NORMAL_BUTTON,140,5,80,30,"More Food (+)");
    fl_set_button_shortcut(obj,"+",1);
    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
  fdui->remove_food = obj = fl_add_button(FL_NORMAL_BUTTON,230,5,80,30,"Less Food (-)");
    fl_set_button_shortcut(obj,"-",1);
    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
  fdui->file_menu = obj = fl_add_menu(FL_PULLDOWN_MENU,10,10,50,20,"File");
    fl_set_object_shortcut(obj,"Ff",1);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT);
    fl_set_menu_entries(obj, fdmenu_file_menu_1);
  fdui->other_menu = obj = fl_add_menu(FL_PULLDOWN_MENU,60,10,60,20,"Other");
    fl_set_object_shortcut(obj,"Oo",1);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT);
    fl_set_menu_entries(obj, fdmenu_other_menu_2);
  fl_end_form();

  fdui->mainWindow->fdui = fdui;

  return fdui;
}
Ejemplo n.º 29
0
FD_config_dialog *create_form_config_dialog(void)
{
  FL_OBJECT *obj;
  FD_config_dialog *fdui = (FD_config_dialog *) fl_calloc(1, sizeof(*fdui));

  fdui->config_dialog = fl_bgn_form(FL_NO_BOX, 410, 120);
  obj = fl_add_box(FL_UP_BOX,0,0,410,120,"");
  fdui->cancel_btn = obj = fl_add_button(FL_NORMAL_BUTTON,80,75,100,30,"Cancel");
    fl_set_object_callback(obj,get_dir_callback,-1);
  fdui->ok_btn = obj = fl_add_button(FL_RETURN_BUTTON,225,75,100,30,"OK");
    fl_set_object_callback(obj,get_dir_callback,0);
  fdui->dir_input = obj = fl_add_input(FL_NORMAL_INPUT,80,30,300,30,"Directory");
  fl_end_form();

  fdui->config_dialog->fdui = fdui;

  return fdui;
}
Ejemplo n.º 30
0
FD_newbut *
create_form_newbut( void )
{
    FL_OBJECT *obj;
    FD_newbut *fdui = calloc( 1, sizeof *fdui );

    fdui->newbut = fl_bgn_form( FL_NO_BOX, 310, 190 );

    fl_add_box( FL_UP_BOX, 0, 0, 310, 190, "" );
    fl_add_box( FL_FRAME_BOX, 40, 45, 100, 120, "" );

    obj = fl_add_text( FL_NORMAL_TEXT, 50, 155, 50, 20, "CrossB" );
    fl_set_object_boxtype( obj, FL_FLAT_BOX );
    fl_set_object_lstyle( obj, FL_BOLD_STYLE );

    obj = fl_add_crossbutton( FL_RADIO_BUTTON, 50, 115, 80, 30, "cross1" );
    fl_set_object_color( obj, FL_COL1, FL_RED );

    obj = fl_add_crossbutton( FL_RADIO_BUTTON, 50, 85, 80, 30, "Button" );
    fl_set_object_color( obj, FL_COL1, FL_GREEN );

    obj = fl_add_crossbutton( FL_RADIO_BUTTON, 50, 55, 80, 30, "Button" );
    fl_set_object_color( obj, FL_COL1, FL_BLUE );

    fl_add_box( FL_FRAME_BOX, 180, 45, 100, 120, "" );

    obj = fl_add_text( FL_NORMAL_TEXT, 190, 155, 50, 20, "CrossB" );
    fl_set_object_boxtype( obj, FL_FLAT_BOX );
    fl_set_object_lstyle( obj, FL_BOLD_STYLE );

    obj = fl_add_crossbutton( FL_PUSH_BUTTON, 190, 115, 80, 30, "Button" );
    fl_set_object_color( obj, FL_COL1, FL_RED );

    obj = fl_add_crossbutton( FL_PUSH_BUTTON, 190, 85, 90, 30, "Button" );
    fl_set_object_color( obj, FL_COL1, FL_GREEN );

    obj = fl_add_crossbutton( FL_PUSH_BUTTON, 190, 55, 80, 30, "Button" );
    fl_set_object_color( obj, FL_COL1, FL_BLUE );

    fdui->bexit = fl_add_button( FL_NORMAL_BUTTON, 125, 10, 65, 25, "Exit" );
    fl_end_form( );

    return fdui;
}