home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / add-on / include / form.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-19  |  2.7 KB  |  79 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ident    "@(#)libetitam:form.h    1.1"
  12. #ifndef _FORM
  13. #define _FORM
  14.  
  15. #include "menu.h"
  16. #include "track.h"
  17. #include "sys/window.h"
  18.  
  19. #define F_LRMARGIN    (M_LRMARGIN)    /* left/right margin        */
  20. #define F_TBMARGIN    (M_TBMARGIN)    /* top/bottom margin        */
  21. #define F_MAXWIDTH    (M_MAXWIDTH)    /* maximum width        */
  22. #define F_MAXHEIGHT    (M_MAXHEIGHT)    /* maximum height        */
  23.  
  24. #define F_BORDFLAGS    (BORDHELP|BORDCANCEL)
  25.  
  26. #define F_BEGIN        0x1        /* begin a menu            */
  27. #define F_END        0x2        /* end (delete) the menu    */
  28. #define F_INPUT        0x4        /* accept input            */
  29. #define F_POPUP        (F_BEGIN|F_END|F_INPUT)
  30.  
  31.                     /* form flags            */
  32. #define F_WINSON    0x1        /* use son placement algorithm    */
  33. #define F_WINNEW    0x2        /* use new placement algorithm    */
  34. #define F_USEWIN    0x4        /* use supplied window        */
  35. #define F_NOMOVE    0x10        /* to turn off move icon    */
  36. #define F_NOHELP    0x20        /* to turn off help icon    */
  37. #define F_RDONLY    0x40        /* read only form, no inputs    */
  38.  
  39.                     /* field flags            */
  40. #define F_CLEARIT    0x1        /* clear entry on first edit op    */
  41. #define F_MONLY        0x2        /* force menu choices if menu    */
  42.  
  43. #define FERR_OK        0        /* no error            */
  44. #define FERR_TOOBIG    -1        /* too many items in menu    */
  45. #define FERR_ARGS    -2        /* catch all for bad args    */
  46. #define FERR_NOWIN    -3        /* can't create a window    */
  47. #define FERR_SYS    -4        /* system error (signal)    */
  48. #define FERR_GETSTAT    -5        /* error in 'stat'ing old win    */
  49. #define FERR_SETSTAT    -6        /* error in 'stat'ing old win    */
  50. #define FERR_NOMEM    -7        /* if malloc failed        */
  51. #define FERR_BIG    -8        /* error window too big        */
  52. #define FERR_WRITE    -9        /* if a write fails        */
  53.  
  54. typedef struct
  55. {
  56.     char        *fl_name;    /* field name            */
  57.     char        fl_row;        /* field row            */
  58.     char        fl_ncol;    /* name column            */
  59.     char        fl_fcol;    /* field column            */
  60.     char        fl_len;        /* field length            */
  61.     char        fl_flags;    /* field flags            */
  62.     char        *fl_value;    /* field value (initial/final)    */
  63.     menu_t        *fl_menu;    /* optional menu pointer    */
  64.     char        *fl_prompt;    /* field prompt            */
  65. } field_t;
  66.  
  67. typedef struct
  68. {
  69.     char        *f_label;    /* form label            */
  70.     char        *f_name;    /* form name            */
  71.     char        f_flags;    /* form flags            */
  72.     int        f_win;        /* form window            */
  73.     track_t        *f_track;    /* form track list        */
  74.     field_t        *f_fields;    /* fields            */
  75.     field_t        *f_curfl;    /* current field        */
  76. } form_t;
  77.  
  78. #endif /* _FORM */
  79.