/* Demo showing all different types of symbols */

#include "forms.h"


FL_FORM *form;

FL_OBJECT
        *readyobj;


void create_form_form(void)
{
  FL_OBJECT *obj;
  form = fl_bgn_form(FL_NO_BOX,470,320);
  readyobj = obj = fl_add_button(FL_HIDDEN_BUTTON,0,0,470,320,"");
  obj = fl_add_box(FL_UP_BOX,0,0,470,320,"");
    fl_set_object_color(obj,FL_SLATEBLUE,FL_COL1);
  obj = fl_add_box(FL_BORDER_BOX,290,130,70,70," @arrow");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_BORDER_BOX,20,30,70,70," @line");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_BORDER_BOX,110,30,70,70," @circle");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_BORDER_BOX,200,30,70,70," @square");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_NO_BOX,200,30,70,70,"@square");
    fl_set_object_lcol(obj,FL_BLUE);
  obj = fl_add_box(FL_BORDER_BOX,290,30,70,70," @DnLine"); 
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_NO_BOX,290,30,70,70,"@DnLine");
  obj = fl_add_box(FL_BORDER_BOX,380,30,70,70," @UpLine"); 
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_NO_BOX,380,30,70,70,"@UpLine");

  obj = fl_add_box(FL_BORDER_BOX,20,130,70,70," @->");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_BORDER_BOX,110,130,70,70," @>");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_BORDER_BOX,290,230,70,70," @<->");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_BORDER_BOX,200,130,70,70," @>>");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_BORDER_BOX,20,230,70,70," @<-");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_BORDER_BOX,110,230,70,70," @<");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_BORDER_BOX,200,230,70,70," @<<");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_NO_BOX,20,230,70,70,"@<-");
    fl_set_object_lcol(obj,FL_GREEN);
  obj = fl_add_box(FL_NO_BOX,20,130,70,70,"@->");
    fl_set_object_lcol(obj,FL_MAGENTA);
  obj = fl_add_box(FL_NO_BOX,20,30,70,70,"@line");
    fl_set_object_lcol(obj,FL_BLUE);
  obj = fl_add_box(FL_NO_BOX,110,30,70,70,"@circle");
    fl_set_object_lcol(obj,FL_BLUE);
  obj = fl_add_box(FL_NO_BOX,110,130,70,70,"@>");
    fl_set_object_lcol(obj,FL_MAGENTA);
  obj = fl_add_box(FL_NO_BOX,110,230,70,70,"@<");
    fl_set_object_lcol(obj,FL_GREEN);
  obj = fl_add_box(FL_NO_BOX,200,230,70,70,"@<<");
    fl_set_object_lcol(obj,FL_GREEN);
  obj = fl_add_box(FL_NO_BOX,200,130,70,70,"@>>");
    fl_set_object_lcol(obj,FL_MAGENTA);
  obj = fl_add_box(FL_NO_BOX,290,230,70,70,"@<->");
    fl_set_object_lcol(obj,FL_GREEN);
  obj = fl_add_box(FL_NO_BOX,290,130,70,70,"@arrow");
    fl_set_object_lcol(obj,FL_MAGENTA);
#if 0
  readyobj = obj = fl_add_button(FL_RETURN_BUTTON,340,20,110,30,"Ready");
    fl_set_object_color(obj,FL_INDIANRED,FL_INDIANRED);
#endif
  obj = fl_add_box(FL_BORDER_BOX,380,230,70,70," @returnarrow");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_NO_BOX,380,230,70,70,"@returnarrow");
    fl_set_object_lcol(obj,FL_GREEN);
  obj = fl_add_box(FL_BORDER_BOX,380,130,70,70," @plus");
    fl_set_object_lalign(obj,FL_ALIGN_BOTTOM);
  obj = fl_add_box(FL_NO_BOX,380,130,70,70,"@plus");
    fl_set_object_lcol(obj,FL_MAGENTA);
  fl_end_form();
}

/*---------------------------------------*/

void create_the_forms(void)
{
  create_form_form();
}

/*=================== MAIN PROGRAM ====================*/

int
main(int argc, char *argv[])
{
  FL_OBJECT *obj;

  fl_initialize(argv[0], "FormDemo", 0, 0 ,&argc, argv);
  create_the_forms();
  fl_show_form(form,FL_PLACE_CENTER,FL_NOBORDER,NULL);
  do obj = fl_do_forms(); while (obj!=readyobj);
  fl_hide_form(form);
  return 0;
}
