/*  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.
*/

/* K. Lemmens July 1996 */

/* Record defs : */

#define RECWIDTH   400
#define RECHEIGHT  100

#define MODBUT  1
#define SEABUT  2
#define INSBUT  4
#define DELBUT  8
#define NEXBUT 16
#define PREBUT 32
#define CHGBUT 32

#define HMARGIN     10
#define VMARGIN     10

#define TEXTOFFSET   5
#define VTEXTAREA   20

#define WBUTTON     70
#define HBUTTON     20

#define BUTTOFFSET  (TEXTOFFSET + VTEXTAREA + 5)
#define VBUTAREA    30
#define HBUTMARGIN  10
#define VBUTMARGIN  ((VBUTAREA - HBUTTON) / 2)

#define INPWIDTH   300
#define INPHEIGHT   25
#define VINPMARGIN  10
#define HINPOFFSET  (RECWIDTH - HMARGIN - INPWIDTH)
#define VINPOFFSET  (BUTTOFFSET + VBUTAREA + 20)

typedef struct 
{
   FL_FORM *Record;
   FL_OBJECT *Title;
   FL_OBJECT *Close;
   FL_OBJECT *Previous;
   FL_OBJECT *Next;
   FL_OBJECT **Inputs;
   void *vdata;
   long ldata;
}
FD_Record;

void RecordUpdate(FL_OBJECT *ob,long data);
void RecordDelete(FL_OBJECT *ob,long data);
void RecordInsert(FL_OBJECT *ob,long data);
void RecordSearch(FL_OBJECT *ob,long data);
void RecordChange(FL_OBJECT *ob,long data);
void RecordNext(FL_OBJECT *ob,long data);
void RecordPrevious(FL_OBJECT *ob,long data);

FD_Record *BuildRecordForm(Info_t *I,char *title,int mode);
void OpenRecordForModify(char *primkey,Info_t *I);
