01.01.2013 Views

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

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FORM ( 3T ) ( AT&T UNIX PC only ) FORM ( 3T )<br />

NAME<br />

form - display and accept forms<br />

SYNOPSIS<br />

#include <br />

#include <br />

int fo rm( form, op)<br />

form_t *form;<br />

int op;<br />

DESCRIPTION<br />

This routine manipulates a form as determined by the operation<br />

code ( op ) . If the op arg is F _BEGIN, the form is initialized and<br />

displayed. If op is F _INPUT, user input is accepted. If op is<br />

F _END, the form is terminated and removed from the display.<br />

These functions may be combined in many ways. By specifying<br />

(F _BEGIN IF _INPUT IF _END), the caller creates a "pop-up"<br />

form which is initialized (displayed), used for input, then removed.<br />

Generally, (F _BEGIN IF _INPUT) is used for the first call,<br />

F _INPUT for each subsequent interaction, and F _END when the<br />

form is to be discarded.<br />

During the F _INPUT function, the user may point to fields with<br />

the mouse or with the keyboard (arrows, Prev, Next, Beg, Home,<br />

End, Tab). The user may may modify fields by typing and editing<br />

(Back Space, Dlete Char, Clear Line, Cancel) or by selecting a<br />

choice from a menu optionally associated with the field.<br />

The form structure has the following form:<br />

typedef struct<br />

{<br />

char<br />

char<br />

char<br />

int<br />

track_t<br />

field_t<br />

field_t<br />

} form_t;<br />

*f_label;<br />

*f_name;<br />

f_fl.ags;<br />

f_win;<br />

*f_track;<br />

*f_fields;<br />

*f_curfl;<br />

I* form label *I<br />

I* form name *I<br />

I* form flags *I<br />

I* form window *I<br />

I* tracking info *I<br />

I* fields *I<br />

I* current field *I<br />

F_label is the form label, displayed on the window label line of<br />

the form. If /_label is NULL, no label is displayed.<br />

F _name is the form name, or NULL if the form has no name.<br />

F _flags contains flags. The F _ WINNEW flag causes form to use<br />

the "new " algorithm to place the window. Basically, the new algorithm<br />

looks for relatively empty screen space to place the window.<br />

F_WINSON causes form to use the "son" algorithm which causes<br />

the new window to slightly overlap the current window. If neither<br />

F _ WINNEW nor F _WINSON is given, the "popup" algorithm is<br />

used. This causes the new window to appear near the middle of<br />

the current window, inside it if possible. F _NO MOVE is set if the<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!