AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
FORM(3T) (AT&T UNIX PC only ) FORM (3T) Move icon is not to be displayed on the border of the form. F _NOHELP is set if the Help icon is not to be displayed on the form border. F _win holds the window identifier associated with this form. It is allocated on an F _BEGIN call, used on subsequent calls, and �, deleted on an F _END call. F _track is a pointer to the mouse- \ tracking information required during form interaction. The space for this data is allocated on F _BEGIN and freed on F _END. F _fields points to the array of fields (see below). F _curfl points to the current field. The caller should point J_curfl to the default field. Form will modify J_curfl as the user moves the highlighting around in the form. The list of fields is terminated by a field whose fl_name is NULL. Each field in the array pointed to by /_fi elds and J_curcl has the following form: typedef struct { char char char char char char char menu_t char } field_t; *fl_name; fl_row; fl_ncol; fl_fcol; fl_len; fl_flags; *fl_value; *fl_menu; *fl_prompt; /* field name *I I* field row *I j* name column *I j* field column *I j* field length *I I* flags *I j* field values *I j* assoc. menu pointer *I j* field prompt *I Fl_name is the field name. Fl_row is the row number on which to display the field. Row (and column) numbers are form-relative with 0,0 being the upper-leftmost location in the form. The form name (!_name) is located above 0,0 so the user needn't allocate a row for it. Fl_ncol and flJc ol control where the field name (fl_ncol) and field value (flJcol) are displayed. Generally, flJc ol is greater than fl_ncol by at least the length of the field name. Fl_len is the length of the field. See fl_value, below. Fl_flags contains various flags which describe the field. F _CLEARIT specifies that any previous value for the field should be erased when the user tries to enter a new value. This is useful for fields where user editing makes little sense. F _MONL Y means that the only allowable input to this field is via the associated menu (see fl_menu, below). On call, jl_value contains the initial field value. On return, this string is modified to contain the user-supplied value. If no editing was performed by the user, the return value is the same as the call value. Note that the caller must supply a pointer to a character array at least jl_len + 1 bytes long. In addition, the caller should place a null byte after the end of the default value. For a 30 byte � 1 - 2-
FORM (3T) (AT&T UNIX PC only ) field, a default value might be of the form: "Default Value\0 " 1234567890123 45678901234567890 1 2 3 FORM(3T) Fl_menu points to an optional "associated menu." If the caller supplies a menu pointer, then the user may press the Cmd or Opts key on that field to invoke menu(3T) to parse the menu. The selected menu item's name (mi_name) is placed in the field's value (ft_value ). If the F _MONL Y flag is set for the field, then any attempt to edit the field's value will force the associated menu to pop-up. When a field has an associated menu, the SLECT and MARK keys step through the menu choices without displaying the menu. The optional message pointed to by ft_prompt is displayed on the prompt line whenever the field is selected. AB the user moves from field to field, the prompt changes. EXAMPLE The following program illustrates a typical use of form : #include #include #include #include #include mitem_t printitems[ ] = { }; "ASR-33", "Centronix", "Diablo #1", "Diablo #2", "Epson in lab", "Laser Printer", "File", 0, 0,0, 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,0 menu_t printmenu = { "Printers", 0, "Select a Printer from the list", 0, 1,0,0, M_SINGLE, {0}, 0,0,0,0,0, printitems, printitems, 0 }; mitem_t priitems[ ] = - 3-
- Page 793: ABS (3C) ABS (3C) NAME abs - return
- Page 797: ATOF ( 3C ) ATOF ( 3C ) NAME atof -
- Page 800 and 801: ·�
- Page 803: CLOCK( 3C ) CLOCK( 3C ) NAME clock
- Page 806 and 807: J ··- � . ..._ __ .·
- Page 809: CTERMID ( 3S ) CTERMID ( 3S ) NAME
- Page 812 and 813: CTIME (3C) CTIME(3C) The external l
- Page 815 and 816: CURSES ( 3 ) CURSES ( 3 ) NAME curs
- Page 817 and 818: CUSERID ( 3S ) CUSERID ( 3S ) NAME
- Page 819 and 820: DIAL (3C) DIAL(3C) NAME dial - esta
- Page 821 and 822: DRAND48 ( 3C ) DRAND48 ( 3C ) NAME
- Page 823 and 824: DRAND48 ( 3C ) DRAND48 ( 3C ) have
- Page 825: ECVT (3C) ECVT (3C) NAME ecvt, fcvt
- Page 829 and 830: EPRINTF ( 3T ) ( AT&T UNIX PC only
- Page 831 and 832: ERF (3M) ERF (3M) NAME erf1 erfc -
- Page 833: EXP ( 3M ) EXP ( 3M ) NAME exp, log
- Page 837: FERROR (3S) FERROR (3S) NAME ferror
- Page 841 and 842: FOPEN(3S) FOPEN (3S) NAME fopen, fr
- Page 843: FORM ( 3T ) ( AT&T UNIX PC only ) F
- Page 847 and 848: FORM (3T) }; (AT&T UNIX PC only ) F
- Page 849: FREAD ( 3S ) FREAD ( 3S ) NAME frea
- Page 853: FSEEK ( 3S ) FSEEK ( 3S ) NAME fsee
- Page 857 and 858: GAMMA ( 3M ) GAMMA ( 3M ) NAME gamm
- Page 859 and 860: GETC ( 3S ) GETC ( 3S ) NAME getc,
- Page 861: GETCWD ( 3C } GETCWD ( 3C ) NAME ge
- Page 865 and 866: GETGRENT ( 3C ) GETGRENT ( 3C ) NAM
- Page 867: GETLOGIN ( 3C ) GETLOGIN ( 3C ) NAM
- Page 870 and 871: GETOPT (3C) } SEE ALSO getopt(l). e
- Page 873 and 874: GETPENT (3) (AT&T UNIX PC only ) GE
- Page 875: GETPW ( 3C ) GETPW ( 3C ) NAME getp
- Page 878 and 879: GETPWENT ( 3C ) GETPWENT ( 3C ) par
- Page 881 and 882: GETUT ( 3C ) GETUT ( 3C ) NAME getu
- Page 883 and 884: HSEARCH ( 3C ) HSEARCH ( 3C ) NAME
- Page 885 and 886: HYPOT ( 3M ) HYPOT (3M) NAME hypot
- Page 887: L3TOL (3C) L3TOL (3C) NAME 13tol, l
- Page 890 and 891: (�
- Page 893: LDFHREAD ( 3X ) LDFHREAD ( 3X ) NAM
FORM(3T) (AT&T UNIX PC only ) FORM (3T)<br />
Move icon is not to be displayed on the border of the form.<br />
F _NOHELP is set if the Help icon is not to be displayed on the<br />
form border.<br />
F _win holds the window identifier associated with this form. It is<br />
allocated on an F _BEGIN call, used on subsequent calls, and �,<br />
deleted on an F _END call. F _track is a pointer to the mouse- \<br />
tracking information required during form interaction. The space<br />
for this data is allocated on F _BEGIN and freed on F _END.<br />
F _fields points to the array of fields (see below). F _curfl points to<br />
the current field. The caller should point J_curfl to the default<br />
field. Form will modify J_curfl as the user moves the highlighting<br />
around in the form. The list of fields is terminated by a field<br />
whose fl_name is NULL.<br />
Each field in the array pointed to by /_fi elds and J_curcl has the<br />
following form:<br />
typedef struct<br />
{<br />
char<br />
char<br />
char<br />
char<br />
char<br />
char<br />
char<br />
menu_t<br />
char<br />
} field_t;<br />
*fl_name;<br />
fl_row;<br />
fl_ncol;<br />
fl_fcol;<br />
fl_len;<br />
fl_flags;<br />
*fl_value;<br />
*fl_menu;<br />
*fl_prompt;<br />
/* field name *I<br />
I* field row *I<br />
j* name column *I<br />
j* field column *I<br />
j* field length *I<br />
I* flags *I<br />
j* field values *I<br />
j* assoc. menu pointer *I<br />
j* field prompt *I<br />
Fl_name is the field name. Fl_row is the row number on which to<br />
display the field. Row (and column) numbers are form-relative<br />
with 0,0 being the upper-leftmost location in the form. The form<br />
name (!_name) is located above 0,0 so the user needn't allocate a<br />
row for it.<br />
Fl_ncol and flJc ol control where the field name (fl_ncol) and<br />
field value (flJcol) are displayed. Generally, flJc ol is greater<br />
than fl_ncol by at least the length of the field name.<br />
Fl_len is the length of the field. See fl_value, below.<br />
Fl_flags contains various flags which describe the field.<br />
F _CLEARIT specifies that any previous value for the field should<br />
be erased when the user tries to enter a new value. This is useful<br />
for fields where user editing makes little sense. F _MONL Y means<br />
that the only allowable input to this field is via the associated<br />
menu (see fl_menu, below).<br />
On call, jl_value contains the initial field value. On return, this<br />
string is modified to contain the user-supplied value. If no editing<br />
was performed by the user, the return value is the same as the call<br />
value. Note that the caller must supply a pointer to a character<br />
array at least jl_len + 1 bytes long. In addition, the caller should<br />
place a null byte after the end of the default value. For a 30 byte<br />
�<br />
1<br />
- 2-