TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: All
from: Frank Adam
date: 1996-04-10 00:47:16
subject: [5/6] Formlib

>>> Part 5 of 6...

        regs.h.cl = 8;
        break;
  case SOLIDCURSOR  : regs.h.ch = 0;
        regs.h.cl = 7;
   }
 int86(0x10,®s,®s);
}

char fast_getx()
{
 union REGS regs;
 regs.h.ah = 0x03;
 regs.h.bh = 0;
 int86(0x10,®s,®s);
 return regs.h.dl;
}

char fast_gety()
{
 union REGS regs;
 regs.h.ah = 0x03;
 regs.h.bh = 0;
 int86(0x10,®s,®s);
 return regs.h.dh;
}

void fast_gotoxy (char x,char y)
{
 union REGS regs;
 regs.h.ah = 0x02;
 regs.h.bh = 0;
 regs.h.dh = y-1;
 regs.h.dl = x-1;
 int86(0x10,®s,®s);
}

/*
___--------------------------------------------------------------------
***********************************************************************
___--------------------------------------------------------------------
*/
/* form.h main header file for form.c */

#include 
#include 
#include "fastprnt.h"
#include "formkeys.h"

#define FSTRING  0
#define FNUMERIC 1
#define FDIGIT   2
#define FDATE    3
#define FTIME    4

#define END_FORM_INPUT 27
#define FORMFALSE  1
#define FORMTRUE   0
#define FORMNOMEM -1
#define FORMMAXFIELD 25 /* set maximum fields */

extern int Attrib;
struct form {
      int maxfields;
      int havedata;
      int helpx;
      int helpy;
      int helpattrib;
      int formattrib;
      int titattrib;
      int fieldattrib;
      int fieldtitattrib;
      int fieldx[FORMMAXFIELD];
      int fieldy[FORMMAXFIELD];
      int fieldlen[FORMMAXFIELD];
      int fieldtype[FORMMAXFIELD];
      char *formtitle;
      char *fieldtitles[FORMMAXFIELD];
      char *helptext[FORMMAXFIELD];
      char *data[FORMMAXFIELD];
      };

/*  Form setup
** form,title,titlefore,titleback,formfore,formback,numfields
*/
int init_form(form* &f_f,char*,int,int,int,int,int);

/*  Fields' setup
** form,fieldtitles,fldtitlefore,fldtitleback,fieldfore,fieldback,
** fieldx[],fieldy[],fieldlen[],fieldtype[]
*/
int init_form_fields(struct form* f_f,char*[],int,int,int,int,
        int[],int[],int[],int[]);

/*   Help setup
** form,helptext[],helpx,helpy,helpfore,helpback
*/
int init_form_help(struct form* f_f,char*[],int,int,int,int);

void form_show(struct form* f_f);
/* show the form :) */

int get_form_input(struct form* f_f,int);
/* the main input routine */

char * get_FORM_data(struct form* f_f,int);
/* get the forms' data */
/* Of course the data could be accesed directly but this is nicer :^) */

int formfree(struct form* f_f);
/* This should be called to realease memory when done using a form */

/* following functions would not normally be accessed directly */
void FORM_repos(form* f_f,int ,int ); /* cursor control */
void FORM_repaint(struct form* f_f,int,char*);  /* as it says */
void FORM_puthelp(form * f_f,int);              /* again */
int FORM_getkey();                              /* trivial ?:) */
int FORM_validkey(struct form* f_f,int,int); /* validates keypress*/
void FORM_showeditmode(int);  /* this puts an ins\ovr in the left top */

/*
___--------------------------------------------------------------------

 >>> Continued to next message...
___ Blue Wave/DOS v2.21

--- Maximus 3.01
* Origin: The Software Parlour (3:635/544)
SEEN-BY: 50/99 78/0 620/243 623/630 632/349 635/503 544 727 711/401 409 410
SEEN-BY: 711/413 430 808 809 932 934 712/515 713/888 714/906 800/1 7877/2809
@PATH: 635/544 50/99 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.