/* A box with two buttons and a text. Simple boxes like this
   are very usefull for asking questions to the user.
   This demo shows the use of a default object.
*/

#include "forms.h"

int
main(int argc, char *argv[])
{
  FL_FORM *form;
  FL_OBJECT *yes, *no, *but, *def;

  fl_initialize(argv[0], "FormDemo", 0, 0 ,&argc, argv);
  form = fl_bgn_form(FL_UP_BOX,320.0,120.0);
    fl_add_box(FL_NO_BOX,160.0,80.0,0.0,0.0,"Do you want to Quit?");
    yes = fl_add_button(FL_NORMAL_BUTTON,40.0,20.0,80.0,30.0,"Yes");
    no  = fl_add_button(FL_NORMAL_BUTTON,200.0,20.0,80.0,30.0,"No");
    def  = fl_add_button(FL_HIDDEN_RET_BUTTON,0.0,0.0,0.0,0.0,"");
  fl_end_form();

  fl_show_form(form,FL_PLACE_MOUSE,FL_NOBORDER,NULL);
  do but = fl_do_forms(); while (but != yes && but != def);
  fl_hide_form(form);
  return 0;
}

