Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

set_field_opts(3) [netbsd man page]

FORMS(3)						   BSD Library Functions Manual 						  FORMS(3)

field_opts, field_opts_off, field_opts_on, set_field_opts -- form library LIBRARY
Curses Form Library (libform, -lform) SYNOPSIS
#include <form.h> Form_Options field_opts(FIELD *field); int field_opts_off(FIELD *field, Form_Options options); int field_opts_on(FIELD *field, Form_Options options); int set_field_opts(FIELD *field, Form_Options options); DESCRIPTION
The function field_opts() returns the current options settings for the given field. The field_opts_off() will turn the options given in options off for the given field, options not specified in options will remain unchanged. Conversely, the function field_opts_on() will turn on the options given in options for the specified field, again, any options not specified will remain unchanged. The options for a field may be set to a specific set of options by calling the set_field_opts() function. Options may only be changed if the field given is not the cur- rently active one. PARAMETERS
The following options are available for a field: O_VISIBLE The field is visible, hence is displayed when the form is posted. O_ACTIVE The field is active in the form, meaning that it can be visited during form processing. O_PUBLIC The contents of the field are echoed to the screen. O_EDIT The contents of the field can be modified O_WRAP The contents of the field are wrapped on a word boundary, if this option is off then the field will be wrapped on a character boundary. O_BLANK Blank the field on new data being entered if and only if the field cursor is at the left hand side of the field. O_AUTOSKIP Skip to the next field when the current field reaches its maximum size. O_NULLOK The field is allowed to contain no data O_STATIC The field is not dynamic, it has a fixed size. O_PASSOK An unmodified field is allowed. O_REFORMAT Retain the formatting of a field when the buffer is retrieved. If this option is not set then the buffer returned will be a sin- gle string with no line breaks. When this option is set newline characters will be inserted at the point where the string has been wrapped in a multiline field. This option is an extension to the forms library and must not be used in portable code. See the field_buffer(3) man page for how this option modifies the behaviour of field_buffer(). The following options are on by default for a field: O_VISIBLE, O_ACTIVE, O_PUBLIC, O_EDIT, O_WRAP, O_BLANK, O_AUTOSKIP, O_NULLOK, O_PASSOK, and O_STATIC. RETURN VALUES
Functions returning pointers will return NULL if an error is detected. The functions that return an int will return one of the following error values: E_OK The function was successful. E_CURRENT The field specified is the currently active one in the form. SEE ALSO
curses(3), forms(3) NOTES
The header <form.h> automatically includes both <curses.h> and <eti.h>. The option O_REFORMAT is a NetBSD extension and must not be used in portable code. BSD
November 24, 2004 BSD

Check Out this Related Man Page

form_field_opts(3CURSES)				     Curses Library Functions					  form_field_opts(3CURSES)

form_field_opts, set_field_opts, field_opts_on, field_opts_off, field_opts - forms field option routines SYNOPSIS
cc [ flag... ] file... -lform -lcurses [ library... ] #include <form.h> int set_field_opts(FIELD *field, OPTIONS opts); int set_field_opts(FIELD *field, OPTIONS opts); int field_opts_on(FIELD *field, OPTIONS opts); int field_opts_off(FIELD *field, OPTIONS opts); OPTIONS field_opts(FIELD *field); DESCRIPTION
set_field_opts() turns on the named options of field and turns off all remaining options. Options are boolean values that can be OR-ed together. field_opts_on() turns on the named options; no other options are changed. field_opts_off() turns off the named options; no other options are changed. field_opts() returns the options set for field. O_VISIBLE The field is displayed. O_ACTIVE The field is visited during processing. O_PUBLIC The field contents are displayed as data is entered. O_EDIT The field can be edited. O_WRAP Words not fitting on a line are wrapped to the next line. O_BLANK The whole field is cleared if a character is entered in the first position. O_AUTOSKIP Skip to the next field when the current field becomes full. O_NULLOK A blank field is considered valid. O_STATIC The field buffers are fixed in size. O_PASSOK Validate field only if modified by user. RETURN VALUES
set_field_opts, field_opts_on and field_opts_off return one of the following: E_OK The function returned successfully. E_SYSTEM_ERROR System error. E_CURRENT The field is the current field. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
curses(3CURSES), forms(3CURSES), attributes(5) NOTES
The header <form.h> automatically includes the headers <eti.h> and <curses.h>. SunOS 5.11 31 Dec 1996 form_field_opts(3CURSES)
Man Page