/* This demo program uses the routines in the
   goodies section, that help you create easy
   forms in an even easier way.
*/

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

int
main(int argc, char *argv[])
{
  int choice;
  char str1[100],str2[100];


  fl_initialize(argv[0], "FormDemo", 0, 0 ,&argc, argv);
  fl_show_message("This is a test program",
		"for the goodies of the",
		"forms library");

  fl_show_alert("Alert", "Alert form can be used to inform",
                "recoverable errors", 0);

  if (fl_show_question("Do you want to quit?","",""))
      exit(0);

  strcpy(str1,fl_show_input("Give a string:",""));
  fl_show_message("You typed:","",str1);
  choice = fl_show_choice("Pick a choice","","",3,"One","Two","Three");
  switch(choice)
  {
    case 1: fl_show_message("You typed: One","",""); break;
    case 2: fl_show_message("You typed: Two","",""); break;
    case 3: fl_show_message("You typed: Three","",""); break;
    default: fl_show_message("An error occured!","",""); break;
  }
  strcpy(str2,fl_show_input("Give another string:",str1));
  fl_show_message("You typed:","",str2);
  fl_show_message("Good Bye","","");
  return 0;
}
