/*  Xsqlmenu
 *  Copyright (C) 1996-2000 Kees Lemmens
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

/* Form definition file generated with fdesign. */

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

FD_Xsql *create_form_Xsql(void)
{
  FL_OBJECT *obj;
  FD_Xsql *fdui = (FD_Xsql *) fl_calloc(1, sizeof(*fdui));

  fdui->Xsql = fl_bgn_form(FL_NO_BOX, 435, 315);
  obj = fl_add_box(FL_UP_BOX,0,0,435,315,"");
  obj = fl_add_frame(FL_ENGRAVED_FRAME,10,230,415,75,"");
  obj = fl_add_frame(FL_ENGRAVED_FRAME,10,50,415,55,"");
  obj = fl_add_text(FL_NORMAL_TEXT,150,15,110,25,"Sql Menu");
    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_EMBOSSED_STYLE);
  obj = fl_add_text(FL_NORMAL_TEXT,275,15,150,20,"(C) 1997 Kees Lemmens");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
  fdui->XsqlMessages = obj = fl_add_browser(FL_NORMAL_BROWSER,10,125,415,100,"Messages");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);

  fdui->Buttons = fl_bgn_group();
  obj = fl_add_button(FL_NORMAL_BUTTON,125,55,80,20,"Search");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,XsqlSearch,(long)fdui);
  obj = fl_add_button(FL_NORMAL_BUTTON,325,55,80,20,"Insert");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,XsqlInsert,(long)fdui);
  obj = fl_add_button(FL_NORMAL_BUTTON,25,80,80,20,"Show All");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,XsqlShowAll,(long)fdui);
  obj = fl_add_button(FL_NORMAL_BUTTON,225,55,80,20,"Modify");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,XsqlModify,(long)fdui);
  obj = fl_add_button(FL_NORMAL_BUTTON,25,55,80,20,"Exit");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,XsqlExit,(long)fdui);
  obj = fl_add_button(FL_NORMAL_BUTTON,125,80,80,20,"Field Info");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,XsqlFieldInfo,(long)fdui);
  obj = fl_add_button(FL_NORMAL_BUTTON,225,80,80,20,"SQL Query");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,XsqlSQLQuery,(long)fdui);
  obj = fl_add_button(FL_NORMAL_BUTTON,325,80,80,20,"Info");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_callback(obj,XsqlInfo,(long)fdui);
  fl_end_group();


  fdui->Settings = fl_bgn_group();
  fdui->XsqlServer = obj = fl_add_input(FL_NORMAL_INPUT,20,265,120,25,"Sqlserver");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
    fl_set_object_callback(obj,XsqlSetNewServer,(long)fdui);
  fdui->XsqlTable = obj = fl_add_choice(FL_NORMAL_CHOICE2,290,250,120,25,"Select table");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
    fl_set_object_callback(obj,XsqlSetNewTable,(long)fdui);
  fdui->XsqlDatabase = obj = fl_add_choice(FL_NORMAL_CHOICE2,160,250,120,25,"Select database");
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_TOP);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE);
    fl_set_object_callback(obj,XsqlSetNewDatabase,(long)fdui);
  obj = fl_add_text(FL_NORMAL_TEXT,145,280,105,20,"Number of records :");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
  obj = fl_add_text(FL_NORMAL_TEXT,285,280,95,20,"Number of fields :");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
  fdui->XsqlRecordCount = obj = fl_add_box(FL_BORDER_BOX,250,280,30,20,"");
  fdui->XsqlFieldCount = obj = fl_add_box(FL_BORDER_BOX,380,280,30,20,"");
  fl_end_group();

  fdui->Logo = obj = fl_add_pixmap(FL_NORMAL_PIXMAP,10,10,90,35,"");
  fl_end_form();

  fdui->Xsql->fdui = fdui;

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

FD_Shower *create_form_Shower(void)
{
  FL_OBJECT *obj;
  FD_Shower *fdui = (FD_Shower *) fl_calloc(1, sizeof(*fdui));

  fdui->Shower = fl_bgn_form(FL_NO_BOX, 730, 320);
  obj = fl_add_box(FL_UP_BOX,0,0,730,320,"");
  obj = fl_add_frame(FL_ENGRAVED_FRAME,10,35,710,35,"");
    fl_set_object_gravity(obj, FL_North, FL_NoGravity);
    fl_set_object_resize(obj, FL_RESIZE_X);
  fdui->Title = obj = fl_add_text(FL_NORMAL_TEXT,110,10,400,20,"");
    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_NORMAL_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_gravity(obj, FL_North, FL_NoGravity);
    fl_set_object_resize(obj, FL_RESIZE_X);
  obj = fl_add_button(FL_NORMAL_BUTTON,20,40,80,25,"Close");
    fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
    fl_set_object_resize(obj, FL_RESIZE_NONE);
    fl_set_object_callback(obj,ShowerClose,(long)fdui);
  obj = fl_add_button(FL_NORMAL_BUTTON,115,40,80,25,"Print");
    fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
    fl_set_object_resize(obj, FL_RESIZE_NONE);
    fl_set_object_callback(obj,ShowerPrint,(long)fdui);
  fdui->FontSize = obj = fl_add_counter(FL_SIMPLE_COUNTER,600,40,90,25,"Set FontSize");
    fl_set_object_lalign(obj,FL_ALIGN_LEFT);
    fl_set_object_gravity(obj, FL_NorthEast, FL_NoGravity);
    fl_set_object_resize(obj, FL_RESIZE_NONE);
    fl_set_object_callback(obj,ShowerFontSize,(long)fdui);
  fdui->Browser = obj = fl_add_browser(FL_HOLD_BROWSER,10,75,710,235,"");
    fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
  obj = fl_add_text(FL_NORMAL_TEXT,570,10,150,20,"(C) 1996 Kees Lemmens");
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
    fl_set_object_gravity(obj, FL_NorthEast, FL_NoGravity);
    fl_set_object_resize(obj, FL_RESIZE_NONE);
  obj = fl_add_button(FL_NORMAL_BUTTON,210,40,80,25,"Write To File");
    fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
    fl_set_object_resize(obj, FL_RESIZE_NONE);
    fl_set_object_callback(obj,ShowerWriteFile,(long)fdui);
  fdui->Modify = obj = fl_add_button(FL_NORMAL_BUTTON,305,40,80,25,"Modify");
    fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
    fl_set_object_resize(obj, FL_RESIZE_NONE);
    fl_set_object_callback(obj,BrowserModifier,(long)fdui);
  fl_end_form();

  fdui->Shower->fdui = fdui;

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

