Annotation of 43BSDReno/contrib/isode-beta/others/quipu/uips/sd/widget.h, revision 1.1.1.1

1.1       root        1: /* widget.h - definition of the widget structure and assorted constants */
                      2: 
                      3: /*
                      4:  * $Header: /f/osi/others/quipu/uips/sd/RCS/widget.h,v 7.0 90/06/12 13:14:32 mrose Exp $
                      5:  */
                      6: 
                      7: /*
                      8:  * $Log:       widget.h,v $
                      9:  * Revision 7.0  90/06/12  13:14:32  mrose
                     10:  * *** empty log message ***
                     11:  * 
                     12:  * Revision 1.6  90/04/26  10:36:45  emsrdsm
                     13:  * *** empty log message ***
                     14:  * 
                     15:  * Revision 1.5  90/04/25  15:07:58  emsrdsm
                     16:  * i) lint'ed
                     17:  * 
                     18:  * Revision 1.4  90/04/20  17:58:19  emsrdsm
                     19:  * i) no more freeing
                     20:  * 
                     21:  * Revision 1.3  90/04/18  18:28:33  emsrdsm
                     22:  * fixed i) does not move to leaves
                     23:  *       ii) added default mechanism described using "typeDefaults" file.
                     24:  *      iii) added 'sorting' to attribute display
                     25:  * 
                     26:  * Revision 1.2  90/03/15  16:33:40  emsrdsm
                     27:  * y
                     28:  * 
                     29:  * Revision 1.1  90/03/09  17:41:20  emsrdsm
                     30:  * Initial revision
                     31:  * 
                     32:  * Revision 1.1  90/03/09  13:39:34  emsrdsm
                     33:  * Initial revision
                     34:  * 
                     35:  */
                     36: 
                     37: /*
                     38:  *                               NOTICE
                     39:  *
                     40:  *    Acquisition, use, and distribution of this module and related
                     41:  *    materials are subject to the restrictions of a license agreement.
                     42:  *    Consult the Preface in the User's Manual for the full terms of
                     43:  *    this agreement.
                     44:  *
                     45:  */
                     46: 
                     47: /*****************************************************************************/
                     48: /*This file has been modified;
                     49: /*Modifier:     Damanjit Mahl @ Brunel University, Uxbridge
                     50: /*Date:         October 31st, 1989.
                     51: /*****************************************************************************/
                     52: 
                     53: /*****************************************************************************/
                     54: /* File:       widget.h
                     55: /* Author:     Paul Sharpe @ GEC Research, Hirst Research Centre.
                     56: /* Date:       August 12, 1988.
                     57: /* Function:   Definition of the widget structure and assorted constants.
                     58: /*
                     59: /* DISCLAIMER:
                     60: /* This source file is deemed to be public domain: any person may use the
                     61: /* code in any way, on two simple provisos -
                     62: /*   1 - That this header remains in this file,
                     63: /*   2 - It is accepted that neither the author, nor the authors employees
                     64: /*       accept any responsibility for the use, abuse or misuse of the
                     65: /*       contained code.
                     66: /* No guarantee is made by the author to provide maintainance or up-grading
                     67: /* of this source. However, any adaptations made to this file will be viewed
                     68: /* at least with interest.
                     69: /*****************************************************************************/
                     70: 
                     71: /* These define the type of the widget involved */
                     72: #define FINISH         0
                     73: #define LABEL          1
                     74: #define COMMAND                2
                     75: #define TOGGLE         3
                     76: #define DIALOG         4
                     77: #define SCROLLBAR       5
                     78: #define DUMMY          6
                     79: 
                     80: /* These define functions that aren't really needed */
                     81: #define NULLFN         nullfn
                     82: #define TOGGLEFN       NULLFN
                     83: #define QUITFN         quitfn
                     84: 
                     85: /* These define the LABEL wdgt text justification */
                     86: #define CENTER         CENTRE
                     87: #define CENTRE         1
                     88: #define LEFT           2
                     89: #define RIGHT          4
                     90: 
                     91: /* Thisdefines an expanded widget box */
                     92: #define EXPAND         -1
                     93: 
                     94: /* This defines a widget position starting on a new line */
                     95: #define CRNL           -1
                     96: 
                     97: /* This is the default shown length of the dialog string */
                     98: #define DIALOGLEN      4
                     99: 
                    100: /* This defines the maximum number of levels of active widgets */
                    101: #define MAXACTIVE      10
                    102: #ifndef BUFLEN
                    103: #define BUFLEN         1024
                    104: #endif
                    105: 
                    106: int lowy;
                    107: 
                    108: /* This is the height of a widget box, in number of lines */
                    109: #define WDGTHGHT       3
                    110: 
                    111: typedef struct widget {
                    112:   char type;           /* Type of widget: see the above definitions */
                    113:   char *label;         /* text string label for the widget          */
                    114:   
                    115:   /* The former is used by LABEL and COMMAND widgets: the latter by COMMAND    */
                    116:   char callch;         /* Character to activate the COMMAND widget  */
                    117:   int          (*callfn)();    /* Function called by an activated COMMAND   */
                    118:   
                    119:   /* ALL widgets need these fields to be set */
                    120:   int          x,y;            /* Position of the top right of the window   */
                    121:   int          wdth, hght;     /* width and height of the widget window     */
                    122:   
                    123:   /* These are only used by the DIALOG type widgets                            */
                    124:   int          dstrlen;        /* Maximum length of the DIALOG widget str   */
                    125:   char *dstr;          /* Pointer to the DIALOG string to fill in   */
                    126:   
                    127:   /* These are only used by the TOGGLE type widgets                            */
                    128:   char tindx;          /* Index into the toggle values              */
                    129:   char **tvalues;      /* NULL-terminated array of TOGGLE strings   */
                    130:   
                    131:   WINDOW       *wndw;          /* The curses-widget window structure        */
                    132: } WIDGET;
                    133: 
                    134: WIDGET *currwidgets;
                    135: char typetoggled;
                    136: 
                    137: #ifndef WIDGETLIB
                    138: extern int     nullfn();
                    139: extern int     quitfn();
                    140: extern WIDGET  *getwidget();
                    141: #endif
                    142: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.