DECforms Guide to Developing an Application

*HyperReader

CONTENTS

  Title Page

  Copyright Page

  Preface

  Part I    Getting Started

  1      Introduction
    1.1 DECforms Purpose
    1.2 DECforms Architecture
      1.2.1      The Form
      1.2.2      The Program
        1.2.2.1      Requests
        1.2.2.2      Calls to Escape Routines
        1.2.2.3      Phases in Processing Requests
    1.3 DECforms Utilities and Facilities
    1.4 Developing a DECforms Application
    1.5 What Comes Next

  2      Planning the Application
    2.1 The Paper Form
    2.2 Planning the Data to Capture
    2.3 Planning the Platforms and Layouts for the Application
    2.4 Planning the User Interface
      2.4.1      Planning Panel Size
      2.4.2      Planning Panel Relationships
      2.4.3      The Header Panel
        2.4.3.1      The Header Panel Data
        2.4.3.2      Operator Interaction with the Header Panel
      2.4.4      The Trips Panel
        2.4.4.1      Organizing the Trip Data
        2.4.4.2      Operator Interaction with the Trips Panel
        2.4.4.3      Understanding User-Defined Functions
        2.4.4.4      Functions for the Trips Panel
      2.4.5      Support for Printing
      2.4.6      Message and Help Panels
    2.5 Planning the Program Style
    2.6 What Comes Next

  3      Creating the Character-Cell Layout
    3.1 Creating the Form Using the Form Development Environment
    3.2 Modifying the Default Layout
    3.3 Creating Panels
    3.4 Modifying the Help Panel
    3.5 Choosing Panels
    3.6 Creating the Appearance of the First Panel
      3.6.1      Invoking the Panel Editor CCPED
      3.6.2      Specifying Text Display Attributes
      3.6.3      Creating a Graphic Literal
      3.6.4      Specifying Text Literals and Picture Fields for User Input
      3.6.5      Specifying a Text Literal and Text Field for User Input
      3.6.6      Specifying More Text Literals and a Picture Field
      3.6.7      Creating Informational Text on the Header Panel
      3.6.8      Modifying Text Display Attributes
      3.6.9      Creating a Rectangle Literal
    3.7 Creating the Appearance of the Second Panel
      3.7.1      Creating Background Text and Graphics
      3.7.2      Specifying a Group
      3.7.3      Specifying Picture Fields for the Group
      3.7.4      Completing the Form Data
      3.7.5      Specifying Picture Fields for the Totals
      3.7.6      Creating a Rectangle Literal for the TRIP Group
      3.7.7      Creating Text Literals and the Final Picture Field for the Totals
      3.7.8      Specifying Icons
    3.8 Creating the Appearance of the Help Panels
    3.9 Testing the Appearance of the Panels
    3.10 What Comes Next

  4      Adding Functions, Responses, Display Actions, and Validations to the IFDL File
    4.1 Understanding User-Defined Functions and Function Responses
    4.2 Creating User-Defined Functions and Function Responses
      4.2.1      Declaring the Functions in the Layout
      4.2.2      Where to Declare Function Responses
      4.2.3      Creating Function Responses at the Layout Level
      4.2.4      Creating Function Responses at the Panel Level
      4.2.5      Creating Function Responses at the Group Level
      4.2.6      Creating Function Responses at the Icon Level
    4.3 Creating Other Responses
      4.3.1      Summary of Responses and Response Steps
      4.3.2      Order of Functions and Responses
      4.3.3      Creating the Other Responses at the Layout Level
      4.3.4      Creating Responses at the Panel Level
      4.3.5      Creating Exit Responses at the Field Level
    4.4 Declaring a Built-In Function Response
    4.5 Creating Active Highlighting
    4.6 Validating Data
    4.7 What Comes Next

  5      Specifying Form Records and Program Data
    5.1 Comparing the Portable and OpenVMS APIs
    5.2 Understanding Form Record Descriptions
      5.2.1      Form Records
      5.2.2      Form Record Fields and Groups
    5.3 Forms_Record_Data Structure
    5.4 Creating the Form Record Descriptions
    5.5 Creating Header Information and Data Declarations for the Program
      5.5.1      Creating the Data Declarations and Header Information for the C Program
      5.5.2      Creating the Data Declarations and Header Information for the FORTRAN Program
    5.6 What Comes Next

  6      Completing the Application Program for the Character-Cell Layout
    6.1 Enabling the Form
      6.1.1      Creating the C ENABLE Request and Request Options Structure
      6.1.2      Creating the FORTRAN ENABLE Request and Request Options Structure
    6.2 Receiving the Form Data
      6.2.1      Creating the C RECEIVE Requests and Form Record Data Definitions
      6.2.2      Creating the FORTRAN RECEIVE Requests and Form Record Data Definitions
    6.3 Disabling the Form
      6.3.1      Creating the C DISABLE Request
      6.3.2      Creating the FORTRAN DISABLE Request
    6.4 Creating the Escape Routines
      6.4.1      Creating the Escape Routines for the C Program
      6.4.2      Creating the Escape Routines for the FORTRAN Program
    6.5 What Comes Next

  7      Building and Testing the Application for Character-Cell Devices
    7.1 Translating the Form and Extracting an Object File
    7.2 Building the Portable API Program
    7.3 Testing the Application
    7.4 What Comes Next

  8      Completing the Form for Other Layouts
    8.1 Converting the Character-Cell Layout for Window Devices
      8.1.1      Using the Layout Converter
      8.1.2      Editing the IFDL File for Window Devices
      8.1.3      Testing the Panel Appearance for Window Devices
      8.1.4      Changing the Panel Appearance Using MPED
    8.2 Creating the PRINTER Layout
      8.2.1      Editing the Window Layout to Create a PRINTER Layout
      8.2.2      Testing the PRINTER File
      8.2.3      What Comes Next

  9      Adapting, Building, and Testing the Application for the Pixel Layouts
    9.1 Capturing the Data for the PRINTER Layout
      9.1.1      Creating the C Requests for the Print Session
      9.1.2      Creating the FORTRAN Requests for the Print Session
    9.2 Building and Testing the Application for DECwindows
    9.3 Changing the Program for Microsoft Windows
      9.3.1      Changing the OpenVMS C Program for Microsoft Windows
      9.3.2      Creating the FORTRAN Program for Microsoft Windows
    9.4 Building and Testing the Application for Microsoft Windows
    9.5 What Comes Next

  Part II    More Guidelines and Examples

  10     Form Structure
    10.1 Form Elements
      10.1.1     Form Data
      10.1.2     Form Records
      10.1.3     Layouts
      10.1.4     Viewports
      10.1.5     Panels
    10.2 Responses
    10.3 Methods for Creating a Form
    10.4 How a Form Is Described in the IFDL
    10.5 IFDL Syntax Example

  11     Declaring, Displaying, and Tracking Data
    11.1 Specifying Form Data Types
      11.1.1     Text Data
      11.1.2     Atomic Data
      11.1.3     Date/Time Data
    11.2 Assigning Default Values to Form Data
    11.3 Altering the Display Attributes of Panel Fields
    11.4 Declaring and Displaying Groups and Arrays
      11.4.1     Grouping Data in a Form
      11.4.2     Displaying Data Stored in Form Data Groups
      11.4.3     Using Corresponding Subscripts in Panel Field Description Entries
      11.4.4     Activating Panel Groups for Input
      11.4.5     Specifying Navigation in a Panel Group
      11.4.6     Passing Group Data Between the Program and the Form
    11.5 Transferring Data Explicitly
    11.6 Determining What Changed During Operator Input
      11.6.1     Using Tracked Form Data Items
      11.6.2     Using Receive Shadow Records
      11.6.3     Using Send Shadow Records

  12     Controlling Form Processing
    12.1 Using IF Response Steps
    12.2 Using Control Text Responses
    12.3 Controlling the Activation List
      12.3.1     Using the ACTIVATE Response Step
      12.3.2     Controlling the Activation List During the Accept Phase
      12.3.3     Using Conditional Protection in Navigation
      12.3.4     Using the DEACTIVATE Response Step
    12.4 Writing Responses That Call Escape Routines
    12.5 Performing Arithmetic Operations
    12.6 Moving Between Panels
    12.7 Waiting for Operator Input
    12.8 Printing Panels
    12.9 Returning Control to the Application

  13     Designing the Operator Interface
    13.1 Using Viewports
    13.2 Creating Scrolled Regions
      13.2.1     Displaying Scrolled Data
      13.2.2     Setting Up the Operator's Control
    13.3 Defining Form Function Keys
      13.3.1     Binding Functions to Keys
      13.3.2     Writing Function Responses
      13.3.3     Disabling Built-In Function Key Bindings
    13.4 Using Situational Function Responses
      13.4.1     Situational Function Responses in Character-Cell Layouts
      13.4.2     Situational Function Responses in Window Layouts
    13.5 Modifying the Keypad Mode
    13.6 Signaling the Operator
    13.7 Validating Fields
    13.8 Sending Messages to the Operator
      13.8.1     Sending Messages from the Form
      13.8.2     Sending Messages from a Program or Escape Routine
    13.9 Providing Online Help
      13.9.1     Using Help Messages
      13.9.2     Providing Hints
      13.9.3     Using Help Panels
      13.9.4     Creating Levels of Help Panels
      13.9.5     Creating a Hierarchical Help Menu
      13.9.6     Using a Help Text File
    13.10 Simulating Menus and Dialog Boxes in Character-Cell Layouts

  14     Getting the Best Performance from Your Form
    14.1 General Optimizations
      14.1.1     Transferring Data
      14.1.2     Using Escape Routines
      14.1.3     WHEN Clause Performance
      14.1.4     Controlling the Activation List
      14.1.5     Preventing Unnecessary Validation
      14.1.6     Using Shareable Forms
      14.1.7     Using Multiple Sessions
      14.1.8     Performing Data Conversion
    14.2 Optimizations for Character-Cell Devices
      14.2.1     Using Terminal Hardware Scrolling
      14.2.2     Using Double-High and Double-Wide Attributes
      14.2.3     Optimizing Screen Clearing
      14.2.4     Improving Panel Display
      14.2.5     Formatting Input Pictures
    14.3 Optimizations for Window Devices

  15     Demonstration and Sample Forms and Applications
    15.1 Displaying the Demonstration Forms
    15.2 The Sample Application Files
    15.3 Data Declarations in the Introductory Sample Form and Application
    15.4 OpenVMS API Request Calls in the Introductory Sample Application
      15.4.1     ENABLE Request
      15.4.2     ACCOUNT Record SEND Request
      15.4.3     UPDATE Record TRANSCEIVE Request
      15.4.4     GET_CHECK Record RECEIVE Request
      15.4.5     GET_DEPOSIT Record RECEIVE Request
      15.4.6     DISABLE Requests
    15.5 Support for Printing in the Introductory Sample Application
      15.5.1     PRINT_PANEL Function and Function Response
      15.5.2     PRINT_CHECK Subroutine
      15.5.3     PRINTER Layout in the Introductory Sample Application
    15.6 Portable API Request Calls in the Advanced Sample Application
      15.6.1     ENABLE Request
      15.6.2     SEND Requests
      15.6.3     RECEIVE Requests
      15.6.4     TRANSCEIVE Request
      15.6.5     DISABLE Request
      15.6.6     RECEIVE and SEND Requests in an Operator Transaction
    15.7 Use of the FRAME declaration for Microsoft Windows Layouts

  A The Mileage Reimbursement Application
    A.1 IFDL Source:  mrf_form.ifdl
    A.2 C Application Source:  mrf_c.c
    A.3 FORTRAN Application Source for OpenVMS Systems:  mrf_for.for
    A.4 FORTRAN Application Definition File:  mrf_def.for
    A.5 FORTRAN Application Source for Microsoft Windows:  mrfw_for.for