/*
 * Auto Payment Calculator V1.0.1beta
 * Copyright (C) 1997  Eric A. Griff
 *
 * An Auto Payment Calculator.
 *
 * *Portions of this code use xforms-0.86 which is copyrighted as
 *
 *    Copyright (C) 1996-1997 by T.C. Zhao and Mark Overmars. ALL RIGHTS 
 *      RESERVED
 *
 */

/* Form definition file generated with fdesign. */

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

FD_pymain *create_form_pymain(void)
{
  FL_OBJECT *obj;
  FD_pymain *fdui = (FD_pymain *) fl_calloc(1, sizeof(*fdui));

  fdui->pymain = fl_bgn_form(FL_NO_BOX, 320, 210);
  obj = fl_add_box(FL_UP_BOX,0,0,320,210,"");
    fl_set_object_color(obj,FL_SLATEBLUE,FL_COL1);
  obj = fl_add_text(FL_NORMAL_TEXT,20,10,170,30,"AutoPaymentCalc");
    fl_set_object_boxtype(obj,FL_FRAME_BOX);
    fl_set_object_color(obj,FL_SLATEBLUE,FL_MCOL);
    fl_set_object_lsize(obj,FL_MEDIUM_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE+FL_EMBOSSED_STYLE);
  obj = fl_add_button(FL_NORMAL_BUTTON,170,170,130,30,"Exit");
    fl_set_button_shortcut(obj,"#E",1);
    fl_set_object_color(obj,FL_SLATEBLUE,FL_BLUE);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
  obj = fl_add_button(FL_NORMAL_BUTTON,210,10,100,30,"About");
    fl_set_button_shortcut(obj,"#a",1);
    fl_set_object_color(obj,FL_SLATEBLUE,FL_BLUE);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
    fl_set_object_callback(obj,About,0);
  obj = fl_add_button(FL_RETURN_BUTTON,20,170,110,30,"Calculate");
    fl_set_button_shortcut(obj,"#C^M",1);
    fl_set_object_color(obj,FL_SLATEBLUE,FL_BLUE);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
    fl_set_object_callback(obj,Calculate_Call,0);
  fdui->amount = obj = fl_add_input(FL_FLOAT_INPUT,30,80,80,30,"Amount");
    fl_set_input_shortcut(obj,"#M",1);
    fl_set_object_return(obj,FL_RETURN_ALWAYS);
    fl_set_object_color(obj,FL_SLATEBLUE,FL_COL1);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
    fl_set_object_callback(obj,SetAmount,0);
  fdui->term = obj = fl_add_input(FL_INT_INPUT,120,80,70,30,"Term");
    fl_set_input_shortcut(obj,"#T",1);
    fl_set_object_return(obj,FL_RETURN_ALWAYS);
    fl_set_object_color(obj,FL_SLATEBLUE,FL_COL1);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
    fl_set_object_callback(obj,SetTerm,0);
  fdui->ResultW = obj = fl_add_text(FL_NORMAL_TEXT,50,120,200,20,"");
    fl_set_object_boxtype(obj,FL_NO_BOX);
    fl_set_object_color(obj,FL_SLATEBLUE,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_TIMESBOLDITALIC_STYLE);
  fdui->rate = obj = fl_add_input(FL_FLOAT_INPUT,210,80,70,30,"Rate");
    fl_set_input_shortcut(obj,"#R",1);
    fl_set_object_return(obj,FL_RETURN_ALWAYS);
    fl_set_object_color(obj,FL_SLATEBLUE,FL_COL1);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
    fl_set_object_callback(obj,SetRate,0);
  fdui->ResultM = obj = fl_add_text(FL_NORMAL_TEXT,50,140,200,20,"");
    fl_set_object_color(obj,FL_SLATEBLUE,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_TIMESBOLDITALIC_STYLE);
  fl_end_form();

  fdui->pymain->fdui = fdui;

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

FD_About_Box *create_form_About_Box(void)
{
  FL_OBJECT *obj;
  FD_About_Box *fdui = (FD_About_Box *) fl_calloc(1, sizeof(*fdui));

  fdui->About_Box = fl_bgn_form(FL_NO_BOX, 330, 290);
  obj = fl_add_box(FL_UP_BOX,0,0,330,290,"");
    fl_set_object_color(obj,FL_SLATEBLUE,FL_COL1);
  obj = fl_add_text(FL_NORMAL_TEXT,60,20,210,40,"AutoPaymentCalc");
    fl_set_object_boxtype(obj,FL_EMBOSSED_BOX);
    fl_set_object_color(obj,FL_SLATEBLUE,FL_BLUE);
    fl_set_object_lcolor(obj,FL_RED);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE+FL_EMBOSSED_STYLE);
  fdui->Version_Text = obj = fl_add_text(FL_NORMAL_TEXT,20,70,290,20,"Major ***  Minor ***  Release ***  OS ***");
    fl_set_object_color(obj,FL_SLATEBLUE,FL_MCOL);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
  fdui->Eric = obj = fl_add_pixmap(FL_NORMAL_PIXMAP,130,100,80,80,"");
  obj = fl_add_text(FL_NORMAL_TEXT,20,190,290,20,"Copyright (C) 1997 by:");
    fl_set_object_color(obj,FL_SLATEBLUE,FL_MCOL);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
  obj = fl_add_text(FL_NORMAL_TEXT,20,210,290,20,"Eric A. Griff  (eagriff@global2000.net)");
    fl_set_object_color(obj,FL_SLATEBLUE,FL_MCOL);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
  obj = fl_add_button(FL_RETURN_BUTTON,60,240,210,30,"OK");
    fl_set_object_color(obj,FL_SLATEBLUE,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE);
  fl_end_form();

  fdui->About_Box->fdui = fdui;

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

