Character User Interface (FMLI and ETI) - Table of Contents
Preface
What This Book is About
Contents of This Book
Introduction to FMLI
Introduction
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
An Example Application
Using an FMLI Application
Named Keys and Alternate Keystrokes
Navigation
Navigating Inside a Menu Frame
Selecting a Menu Item
Navigating in a Text Frame
Navigating Between Frames
Executing Commands
The Command Menu
The Command Line
The Screen Labeled Function Keys
On-Line Help
Accessing the UNIX System
The Form and Menu Language
Introduction
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 Types
Frame Definition File Descriptors
Menu Descriptors
Form Descriptors
Text Frame Descriptors
Application Level File Descriptors
Initialization File Descriptors
Application Descriptors for the Initialization File
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
Interrupt Signal Handling
Terminal Display Attributes
Using the Alternate Character Set
Frame Definition Files
Introduction
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
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 Frame Descriptors
Text Frame Descriptors
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
Other Useful Examples
Defining a Help Frame for Menu Items or Form Fields
Using Co-Processing Utilities
Application Level Definition Files
Introduction
The Initialization File
Introductory Frame Descriptors
Example Definition of an Introductory Frame
Banner Line Descriptors
Example Definitions of a Banner Line
Color Attribute Descriptors
Examples of Defining Color Attributes
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
Introduction to ETI
Overview
How this Guide is Organized
Conventions Used in This Document
What Is ETI?
The ETI Libraries
The ETI/terminfo Connection
Other Components of the Screen Management System
Basic ETI Programming
Introduction
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
Introduction
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 neocho()
cbreak() and nocbreak()
Windows
Introduction
Output and Input
The Routines wnoutrefresh() and doupdate()
New Windows
newwin()
NOTES
EXAMPLE
subwin()
NOTES
EXAMPLE
ETI Low-level Interface (curses) to High-level Functions
Panels
Introduction
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
Menus
Introduction
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
Forms
Introduction
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
Introduction
Routines for Drawing Lines and Other Graphics
Routines for Using Soft Labels
Working with More Than One Terminal
terminfo
Introduction
Organization of This Chapter
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
Name the Terminal
Learn About the Capabilities
Specify Capabilities
Basic Capabilities
Screen-oriented Capabilities
Keyboard-entered Capabilities
Parameter String Capabilities
Compile the Description
Test the Description
Comparing or Printing terminfo Descriptions
Converting a termcap Description to a terminfo Description
Programming Tips and Known Problems
Programming Tips
Automatic Function Key Downloading
Using the LOADPFK Environment Variable to Disable Downloading
Using a Shell Script to Restore Your Function Key Settings
Downloading FMLI Sequences More Efficiently
Validation of Form Fields
Inter-dependent Field Validation
Using Global Variables Across Frames
Commands
Co-processing Functions
Forms
Menus
Footnotes
Legend
Text
Backquoted Expressions
Color
Message Line
Syntax
Miscellaneous
Known Problems
Initialization
Screen Appearance
Message Line
Command Line
Screen Labels for Function Keys
Forms
Multi-page forms
Form Field Validation
Horizontally Scrollable Form Fields
Other Form Problems
Text Frames
Commands
Built-in Utilities
regex
readfile
Co-processing Utilities
if then else
Other Built-in Utility Problems
Descriptors
Interrupt Facility
Miscellaneous
Named Keys and Alternate Keystrokes
Table of Names Keys and Alternate Keystrokes
BACKSPACE
BACKTAB
BEG
CLEAR & CLEAR-LINE
CLEAR-EOL
COMMAND LINE
DEL & DELETE-CHAR
DELETE-LINE
DOWN-ARROW
END
HOME
HOME-DOWN
INSERT-CHAR
INSERT-LINE
LEFT-ARROW
MARK
NEXT
PAGE-DOWN
PAGE-UP
PREV
RESET
RETURN
RIGHT-ARROW
SCREEN LABELED KEYS
SCROLL-DOWN
SCROLL-UP
SPACEBAR
TAB
UP-ARROW
TAM Transition Library
Introduction
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
Program Examples
The editor Program
The highlight Program
The scatter Program
The show Program
The two Program
The window Program
The colors Program
Glossary