DOC HOME
SITE MAP
MAN PAGES
GNU INFO
SEARCH
PRINT BOOK
Character user interface programming
Introduction to the Form and Menu Language Interpreter (FMLI)
What is FMLI?
Screen layout
Frames
Programming with FMLI
Frame definition files
Menu frames
Form frames
Text frames
Application level definition files
Initialization file
Commands file
Alias file
Terminal independence
Recovering after abnormal termination
Internationalization support
An example application
Writing an internationalized application
Using an FMLI application
Named keys and alternative keystroke sequences
Navigating in a menu
Selecting menu items
Navigating in a form
Editing and saving a form
Using a choices menu
Navigating in and editing a text frame
Navigating between frames
Executing commands
The command menu
The command line
Screen-labeled function keys
On-line help
Accessing the UNIX System
The Form and Menu Language
Syntax, rules, and conventions
Naming conventions for frame definition files
Comments
Case sensitivity
Type casts
File type casts
Type casts that change the time of descriptor evaluation
Special characters
Quoting mechanisms
Backquoted expressions
Expression operators
File redirection
Syntax errors
Variables
User-defined variables
Built-in variables
Variable evaluation
Descriptors
Descriptor evaluation
Descriptor types
Frame definition file descriptors
Menu descriptors
Form descriptors
Text frame descriptors
Application level file descriptors
Initialization file descriptors
Application SLK descriptors
Commands file descriptors
FMLI commands
FMLI commands: syntax and use
User access to FMLI commands
Built-in utilities
Overview of the built-in utilities
Conditional statements
Signal handling
Interrupt signal handling
Terminal display attributes
Using the alternate character set
Frame definition files
Menu frame descriptors
Frame descriptors for menus
Item descriptors for menus
Examples of menu definition files
Defining a simple menu
Creating multi-column and scrollable menus
Using the reread descriptor
Using the interrupt and oninterrupt descriptors
Providing supplementary information for menu items
Displaying an item message
Using the show descriptor
Creating a dynamic menu
Form frame descriptors
Frame descriptors for forms
Field descriptors
Automatic layout of form fields
Example form definition files
Saving user input to a form
Validating a form field
Example of validating a field value with the valid descriptor
Text frames
Text frame descriptors
The textframe command
Options for the textframe command
Example text frame definition files
Defining attributes of text frames
Defining a text frame with readfile and longline
Using text frame headers and terminal attributes
Defining a help frame for menu items or form fields
Using the textframe command as an alternative
Using co-processing utilities
Application level definition files
The initialization file
Introductory frame descriptors
Example definition of an introductory frame
Banner line descriptors
Example definitions of a banner line
Color attribute descriptors
Defining color for the banner line
General application descriptors
Screen-labeled function key descriptors
Example definitions of screen-labeled function keys
The commands file
Command descriptors
Example of adding an application-specific command
Example of disabling an existing FMLI command
The alias file
Examples of adding path aliases
fmli command syntax
The Extended Terminal Interface (ETI)
What Is ETI?
The ETI libraries
The ETI/terminfo connection
Other components of the screen management system
Basic ETI programming
What every ETI program needs
The header files
The routines initscr, refresh, endwin
Compiling an ETI program
Using the TAM transition library
Running an ETI program
More about initscr and lines and columns
More about refresh and windows
Pads
Simple input and output
Output
addch
addstr
printw
move
clear and erase
clrtoeol and clrtobot
Input
getch
getstr
scanw
Output attributes
attron, attrset, and attroff
standout and standend
Color manipulation
How the color feature works
Using the COLOR_PAIR(
n
) attribute
Changing the definitions of colors
Portability guidelines
Other macros and routines
start_color
init_pair
init_color
Bells, whistles, and flashing lights: beep and flash
Input options
echo and noecho
cbreak and nocbreak
ETI windows
Output and input
The routines wnoutrefresh and doupdate
New windows
newwin
subwin
ETI low-level interface (curses) to high-level functions
ETI panels
Compiling and linking panel programs
Creating panels
Elementary panel window operations
Fetching pointers to panel windows
Changing panel windows
Moving panel windows on the screen
Moving panels to the top or bottom of the deck
Updating panels on the screen
Making panels invisible
Hiding panels
Checking if panels are hidden
Reinstating panels
Fetching panels above or below given panels
Setting and fetching the panel user pointer
Deleting panels
ETI menus
Compiling and linking menu programs
Overview: writing menu programs in ETI
Some important menu terminology
What a menu application program does
A sample menu program
Creating and freeing menu items
Two kinds of menus: single- or multi-valued
Manipulating an item's select value in a multi-valued menu
Manipulating item attributes
Fetching item names and descriptions
Setting item options
Checking an item's visibility
Changing the current default values for item attributes
Setting the item user pointer
Creating and freeing menus
Manipulating menu attributes
Fetching and changing menu items
Counting the number of menu items
Changing the current default values for menu attributes
Displaying menus
Determining the dimensions of menus
Specifying the menu format
Changing your menu's mark string
Querying the menu dimensions
Associating windows and subwindows with menus
Fetching and changing a menu's display attributes
Posting and unposting menus
Menu driver processing
Defining the key virtualization correspondence
ETI menu requests
Item navigation requests
Directional item navigation requests
Menu scrolling requests
Multi-valued menu selection request
Pattern buffer requests
Application-defined commands
Calling the menu driver
Establishing item and menu initialization and termination routines
Function set_menu_init
Function set_item_init
Function set_item_term
Function set_menu_term
Fetching and changing the current item
Fetching and changing the top row
Positioning the menu cursor
Changing and fetching the pattern buffer
Manipulating the menu user pointer
Setting and fetching menu options
ETI forms
Compiling and linking form programs
Overview: writing form programs in ETI
Some important form terminology
What a typical form application program does
A sample form application program
Creating and freeing fields
Manipulating field attributes
Obtaining field size and location information
Dynamically growable fields
Moving a field
Changing the current default values for field attributes
Setting the field type to ensure validation
TYPE_ALPHA
TYPE_ALNUM
TYPE_ENUM
TYPE_INTEGER
TYPE_NUMERIC
TYPE_REGEXP
Justifying data in a field
Setting the field foreground, background, and pad character
Some helpful features of fields
Setting and reading field buffers
Setting and reading the field status
Setting and fetching the field user pointer
Manipulating field options
Creating and freeing forms
Manipulating form attributes
Changing and fetching the fields on an existing form
Counting the number of fields
Querying the presence of offscreen data
Changing ETI form default attributes
Displaying forms
Determining the dimensions of forms
Scaling the form
Associating windows and subwindows with a form
Posting and unposting forms
Form driver processing
Defining the virtual key mapping
ETI form requests
Page navigation requests
Inter-field navigation requests on the current page
Intra-field navigation requests
Field editing requests
Scrolling requests
Field validation requests
Choice requests
Application-defined commands
Calling the form driver
Establishing field and form initialization and termination routines
Function set_form_init
Function set_field_init
Function set_field_term
Function set_form_term
Manipulating the current field
Changing the form page
Positioning the form cursor
Setting and fetching the form user pointer
Setting and fetching form options
Creating and manipulating programmer-defined field types
Building a field type from two other field types
Creating a field type with validation functions
Freeing programmer-defined field types
Supporting programmer-defined field types
Argument support for field types
Supporting next and previous choice functions
Other ETI routines
Routines for drawing lines and other graphics
Routines for using soft labels
Working with more than one terminal
terminfo programming
Organization of this topic
What is terminfo?
Working with terminfo routines
What every terminfo program needs
Compiling and running a terminfo program
An example terminfo program
Working with the terminfo database
Writing terminal descriptions
1. Name the terminal
2. Learn about the capabilities
3. Specify capabilities
4. Compile the description
5. Test the description
Comparing or printing terminfo descriptions
Converting a termcap description to a terminfo description
Programming tips and known problems
Internationalization support
Building trusted FMLI applications
Access to external executables
Interruptible commands
Variables
Frequency of evaluation type casts
Co-processing
Validation of form fields
Scenario 1
Scenario 2
Commands
Co-processing functions
Forms
Menus
Text
Backquoted expressions
Color
Message line
Syntax
Miscellaneous
Known problems with messages
Known problems with screen labels for function keys
Known problems with forms
Known problems with text frames
Known problems with commands
Known problems with built-in utilities
regex
readfile
Co-processing utilities
if-then-else
fmlcut
Known problems with descriptors
Known problems with the interrupt facility
Miscellaneous known problems
Keyboard and mouse support
Named keys and alternative keystroke sequences
Automatic function key downloading
Mouse support
TAM transition library
Compiling and running TAM applications under ETI
Tips for polishing TAM application programs running under ETI
How the TAM transition library works
Translations from TAM calls to ETI calls
The TAM transition keyboard subsystem
ETI program examples
The editor program
The highlight program
The scatter program
The show program
The two program
The window program
The colors program