home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-01-03 | 50.3 KB | 1,107 lines |
-
-
-
-
-
-
-
-
-
- Look & Feel 3.2 read.me
- Copyright (c) 1990, Oakland Group, Inc. All rights reserved.
-
-
-
-
-
-
-
-
-
- 1: INTRODUCTION
-
- Thank you for purchasing Look & Feel version 3.2.
-
- Please return your registration card so we can send you information of new
- versions and features. We automatically notify registered users of new
- versions.
-
- This file contains a description of the Look & Feel disk, recompiling
- instructions for various compilers, and a list of errors, omissions,
- updates to the Look & Feel manual, and instructions for converting Look &
- Feel version 2.1 .lnf files into Look & Feel version 3.2 .lnf files.
-
- Sections that describe new information for Look & Feel 3.2 begin with the
- phrase "NEW FOR 3.2:".
-
- If you wish, you can also purchase the source code of Look & Feel from us.
-
- 2: INSTALLATION
-
- DOS users: read the section below for installation. VMS, UNIX users:
- consult the installation documentation for your operating system
-
- 2.1: DOS
-
- We suggest that you create an "lnf" directory on your hard disk to install
- Look & Feel.
-
- To save space, most of the files on the Look & Feel distribution disks
- have been archived into the file "lnfarc.exe". To decompress the archive,
- type "lnfarc" on the command line, followed by the drive and directory in
- which you wish to place the files. For instance, the command
-
- lnfarc c:\lnf
-
-
- unpacks the archive and place its contents on your c: drive in the \lnf
- directory.
-
- Before you begin using Look & Feel, make a backup copy of the lnf.oak
- file. This file contains all Look & Feel's dialogue boxes and basic
- screens. If you destroy or alter it, you may be unable to perform any
- actions on your files.
-
- 3: DISK CONTENTS
-
- After installing the files from your distribution media, your Look & Feel
- directory should contain the following files:
-
- lnf.c source for Look & Feel's main, for recompilation and
- linking your own functions (see below)
-
- lnf.exe Look & Feel's executable file
-
- lnf.hlp Look & Feel's help file
-
- lnf.oak screen file with Look & Feel's screens
-
- lnfpack.c source code for the lnfpack utility
-
- piano.c code generated for screen "piano" in sample.lnf
-
- piano.tem a sample template file to accompany piano.c
-
- sample.lnf sample screens (including sample_screen from Chapter 2 of
- the manual)
-
- screen.c code generated for the example in Chapter 2 of the manual
-
- table.c symbol table for the example in the manual
-
- On a more obvious note, your disk also contains the file "read.me".
-
- Your distribution also contains platform specific library files, as
- specified below:
-
- 3.1: DOS
-
- The following library files are also in lnfarc.exe on the disk:
-
- m1llnf.lib Look & Feel's library file, for recompilation and linking
- under the Microsoft C 5.1 compiler (see below)
-
- m6llnf.lib Look & Feel's library file, for recompilation and linking
- under the Microsoft C 6.0 compiler (see below)
-
- t2llnf.lib Look & Feel's library file, for recompilation and linking
- under the Borland Turbo-C 2.0 compiler (see below)
-
- tpllnf.lib Look & Feel's library file, for recompilation and linking
- under the Borland Turbo-C++ 1.0 compiler (see below)
-
- 3.2: VMS
-
- The following file is also in [.LNF] directory as a result of the
- installation restoration of the tape saveset cslnf.bck:
-
- lnf.olb Look & Feel's library file, for recompilation and linking
- (see below)
-
- 3.3: SCO UNIX, Interactive 386/ix, and SPARC SunOS
-
- The following file is also in the lnf directory on your machine:
-
- liblnf.a Look & Feel's library file, for recompilation and linking
- (see below)
-
- 4: IF YOU OWN AN OLDER VERSION OF LOOK & FEEL...
-
- Conversion of .lnf files from versions previous to Look & Feel 3.1 to new
- .lnf files is simple. Import the screen from old .lnf file with the
- Disk-Import command. When you save the screen, Look & Feel places it in a
- new .lnf file. Sfiles from versions 3.1 are compatible with those for
- version 3.2; you can load them with the Disk-Load command.
-
- For your own convenience, you may wish to keep the old .lnf files in a
- different directory from that in which the new version and its files
- reside.
-
- 5: IF YOU ARE RUNNING LOOK & FEEL ON A UNIX SYSTEM...
-
- NEW FOR 3.2: Because of restrictions on key mappings under UNIX, you
- cannot use the accelerator keys as specified in the manual. Instead of
- pressing CTRL and a key simultaneously, press CTRL-X and then the
- particular key. For instance, to open a new screen, press CTRL-X and then
- "O", instead of CTRL-O. The unique key ("O", in this example) is always
- the same key as is named in the manual.
-
- 6: IF YOU ARE RUNNING LOOK & FEEL ON A VMS SYSTEM...
-
- The VMS version of Look & Feel is functionally identical to the DOS
- version with these exceptions:
-
- * Some Quick-Keys are simulated by a Meta key sequence:
-
- Quick Key Meta key Sequence Equivalent
-
- Control-M Control-X M
- Control-I Control-X I
- Control-Q Control-X Q
- Control-Home Control-X Find
- Control-End Control-X Select
-
-
- See the INSTALL.TXT file for a description of the Meta keys.
-
- * Only single lines are available for line-drawing, if your terminal
- supports the line-drawing characters.
-
- * The 43-line mode setting in the Tools-Global box has no effect.
-
- * The dialogue boxes of Disk-Load, Disk-Save, and Editor-Open behave
- slightly different. In the "File" field, only filename
- specifications are significant; relative path specifications are
- disregarded and not appended to the path specification of the
- "Dir" field.
-
- 6.1: LNF.EXE and screen files
-
- The VMS version of Look & Feel expects to find the LNF.OAK system screen
- file in one of two places. It first looks in the current default
- directory, then in the directory in which LNF.EXE resides.
-
- 6.2: Dialogue boxes
-
- Dialogue boxes may contain fields labeled "dir" and "file". Under DOS and
- UNIX Look & Feel, when you specify a relative path in the "file" field,
- Look & Feel attempts to join this to the entry in the "dir" field to form
- the complete path specification. Under VMS, Look & Feel ignores any path
- specification entered into the "file" field.
-
- 6.3: File saving and revision numbers
-
- The creation of files with incremental revision numbers occurs in a
- different manner for screen files than editor files.
-
- Screen files (.LNF files) saved to a file with a filename that already
- exists overwrite the current version of that file, unless you specify a
- particular revision number in the filename when saving the file.
-
- Editor window contents saved to a file with a filename that already
- exists create a new file with a revision number one greater than the
- current revision, unless you specify a particular revision number when
- saving the file.
-
- If you do specify a revision number in the filename when saving either a
- screen file or the contents of an editor window and that file revision
- exists, then the file overwritten. Finally, if you specify a filename or
- a filename with a particular revision number that does not yet exist, then
- a new file is created.
-
- 7: RECOMPILING AND LINKING FUNCTIONS
-
- To include custom field functions, border functions, and any other
- functions, you must make the appropriate changes to lnf.c and recompile
- it.
-
- 7.1: Changing lnf.c
-
- For information on linking new functions into Look & Feel, consult lnf.c.
-
- 7.2: Recompiling lnf.exe
-
- Recompiling Look & Feel has different requirements for the different
- compilers.
-
- 7.2.1: Microsoft 5.1
-
- Use the following command line arguments to compile under MS C 5.1:
-
- cl /c /DM5 /AL /Olt /Gs /FPc /I\cscape\include lnf.c
-
-
- Then use the following arguments when you link. Make sure you use the
- Microsoft large model libraries (m1llnf.lib, m1llnf.lib, m1lowl.lib).
- You MUST link to m1llnf.lib BEFORE the C-scape libraries.
-
- link /SE:500 /NOE lnf, , , m1llnf.lib \cscape\lib\m1lcscap.lib
- \cscape\lib\m1lowl.lib;
-
-
- 7.2.2: Turbo C 2.0
-
- For Turbo C 2.0, use the following command line arguments to compile:
-
- tcc -c -ml -I. -I\cscape\include lnf.c
-
-
- Then use the following arguments when you link. Make sure you use the
- Turbo-C large model libraries (t2llnf.lib, t2llnf.lib, t2lowl.lib). You
- MUST link to t2llnf.lib BEFORE the C-scape libraries.
-
- tlink \tc\lib\c0l lnf, , , \tc\lib\emu \tc\lib\mathl \tc\lib\cl
- t2llnf.lib \cscape\lib\t2lcscap.lib \cscape\lib\t2lowl.lib
-
-
- 7.2.3: Microsoft C 6.0
-
- Use the following command line arguments to compile under MS C 6.0:
-
- cl /c /AL /I\cscape\include lnf.c
-
-
- Then use the following arguments when you link. Make sure you use the
- Microsoft large model libraries (m6llnf.lib, m6llnf.lib, m6lowl.lib).
- You MUST link to m6llnf.lib BEFORE the C-scape libraries.
-
- link /SE:500 /ST:4096 /NOE lnf, , , m6llnf.lib
- \cscape\lib\m6lcscap.lib \cscape\lib\m6lowl.lib;
-
-
- 7.2.4: Turbo C++ 1.0
-
- For Turbo C++ 1.0, use the following command line arguments to compile:
-
- tcc -P -c -ml -I\cscape\include lnf.c
-
- Then use the following arguments when you link. Make sure you use the
- Turbo-C++ large model libraries (tpllnf.lib, tpllnf.lib, tplowl.lib). You
- MUST link to tpllnf.lib BEFORE the C-scape libraries.
-
- tlink \tc\lib\c0l lnf, lnf, , tpllnf.lib \cscape\lib\tplcscap
- \cscape\lib\tplowl \tc\lib\emu \tc\lib\mathl \tc\lib\cl
-
-
- 7.2.5: Interactive 386/ix, SCO UNIX, and SPARC SunOS
-
- As discussed in the C-scape for UNIX Installation Notes, Look & Feel is
- distributed on a tar formatted diskette for these three platforms; refer
- to that document for more information on installation.
-
- To rebuild Look & Feel, use the makefile in the lnf directory. You must
- customize the makefile for the system on which you are running. Use the
- instructions from the C-scape for UNIX Installation Notes concerning the
- OWL and C-scape makefiles.
-
- Once you have done this, compile and link Look & Feel by typing:
-
- make lnf
-
- 7.2.6: VMS C
-
- Use the MAKELNF.COM file provided on your distribution tape to recompile
- LNF.EXE.
-
-
- 8: ABOUT LNFPACK
-
- When you delete screens from an sfile, the space that they use is not
- automatically deleted. As you add new screens, Look & Feel uses this
- empty space. If you want to remove this empty space (for instance, for
- the sfiles that you wish to ship with a product), we have included the
- source code for the utility lnfpack, which does this. (Compile it as you
- would any other C-scape program.) When you run lnfpack on a file, it
- packs it and gives the packed version of the file the .pak suffix.
-
- For example, to pack the file screens.lnf, type
-
- lnfpack screens.lnf
-
- lnfpack then creates the file screens.pak. After creating the file, it
- prints the message "screens.pak created." to the display.
-
- 9: UPDATES TO THE MANUAL
-
- Since printing the manual, there have been several commands added to Look
- & Feel. Certain commands have been changed and are now more powerful.
- The structure of this chapter parallels that of the manual, and includes
- both new and changed commands.
-
- NEW FOR 3.2: IMPORTANT: If you are using Look & Feel on a UNIX system, you
- cannot use the accelerator keys as specified in the manual. Instead of
- pressing CTRL and a key simultaneously, press CTRL-X and then the
- particular key. For instance, to open a new screen, press CTRL-X and then
- O, instead of CTRL-O. The unique key ("O", in this example) is always the
- same key as is named in the manual.
-
- 9.1: General Changes
-
- This section discusses changes involving the main menu and status bar,
- mouse support, dialogue boxes, screen types and the help system. Its
- contents encompass changes to both "What is Look & Feel?" and "Inside Look
- & Feel."
-
- 9.1.1: The Main Menu
-
- There is an additional choice in the Main Menu, the Help choice. This
- choice allows you to call Look & Feel's help system with the mouse.
-
- 9.1.2: The Status Bar
-
- The status bar displays the current cursor position within the active
- screen. Note the uppermost row is row zero and the leftmost column is
- column zero.
-
- 9.1.3: Dialogue Boxes and LNFPATH
-
- In all dialogue boxes with a "Dir" field, the field only displays the
- working directory if you are performing an action on a screen whose
- directory is different from that of lnf.exe.
-
- NEW FOR 3.2: Look & Feel loads its dialogue boxes from the file lnf.oak
- using the environment variable LNFPATH. When you start Look & Feel
- running, Look & Feel gets a copy of lnf.oak from your computer. It first
- searches the directory in which you have lnf.exe, then searches according
- the path specified by LNFPATH, and then according to your PATH. (You can
- set LNFPATH like other environment variables, either in your autoexec.bat
- or at your operating system prompt.) If Look & Feel gets lnf.oak locally,
- the Config File field of the Global Settings box displays only the file
- name "lnf.oak"; if Look & Feel gets lnf.oak by searching LNFPATH or PATH,
- the path of the directory from which it gets lnf.oak appears in the Config
- File field. Note: Look & Feel also searches for and gets its copies of
- lnf.hlp in the same manner as it finds lnf.oak.
-
- 9.1.4: Mouse Support
-
- You can pop up the Field Edit box by double-clicking on a field or
- clicking on a field in the field list. The Screen Edit box pops up if you
- double-click on any other area in a screen. Clicking over the screen list
- removes the list and returns control to whatever screen you clicked on.
-
- You can remove any popup box by clicking outside of it.
-
- Fields in which the Space Bar toggles between choices also toggle with a
- mouse click.
-
- Look & Feel now has an additional mouse handler, sedmou_Framer. This
- handler is designed exclusively for use with Framer menuing system.
- Framers must have it to support the mouse.
-
- 9.1.5: Sleds
-
- In addition to seds, teds, framers, and slugs, Look & Feel supports the
- creation and use of the "sled" screen. A sled (Scrolling List EDitor)
- allows you to view and manipulate a list of data whose size you cannot
- predict.
-
- It has a small number of identical rows, each of which contains one or
- more fields and manages its own data in internal arrays called column
- arrays. The field variables point to successive elements in the column
- array. The sled automatically creates and maintains a column array for
- each of its field columns. It also governs mapping of field variables to
- the data of the column arrays.
-
- Because they are dynamically resizable, sleds are useful, for instance, as
- interfaces into databases, and can even be embedded in seds. To create a
- sled, select sled in the Type field of the Screen Open box. The basic
- sled is three fields wide; the field functions for its fields are
- string_funcs, pint_funcs, and cmoney_funcs. It has the border bd_prompt
- and the special function spc_Sled.
-
- To add a row to a running sled, press "+"; to delete a row, press "-".
-
- 9.1.6: The Help System
-
- You can use Look & Feel's help system with either the keyboard (as
- discussed in the manual) or with the mouse.
-
- To select a keyword with the mouse, click on it. Control then passes to
- the keyword's screen. You can move back to the screen from which the
- keyword was selected by choosing the "Previous Screen" keyword. You can
- enter the help index from any screen by selecting the "Index" keyword.
-
- To exit the help system, select the "Quit" keyword.
-
- 9.1.7: Keystroke Recording and Playback
-
- NEW FOR 3.2: Look & Feel now has the feature of keystroke recording and
- playback (as in the Look & Feel demo). The -r (or R) option starts it
- running in RECORD mode; the -p (or P) option starts it running in PLAYBACK
- mode.
-
- To specify the file that you would like to record or play, pass it to Look
- & Feel as an argument after you specify its mode. For example, to record
- the file "test.key", start Look & Feel running with the following:
-
- lnf -rtest.key
-
-
- To play this script, start Look & Feel running with:
-
- lnf -ptest.key
-
-
- 9.2: Disk Commands
-
- Disk-Code: The Code Generate box is different from that described in the
- manual. Instead of automatically generating code for the active screen,
- you can specify the screen for which you wish to generate code. (By
- default, the screen listed for generation is the active screen, but you
- can indicate a different one.) You can specify the directory from which
- the screen and template both originate. You can also specify the
- destination directory for the generated code. The Template File field
- uses the Plus key interface and checks for files with the ".tem" suffix.
-
- NEW FOR 3.2: Disk-Code: Selecting "Yes" in the ANSI field of the Code
- Generate box causes Look & Feel to create code that conforms to ANSI
- standard C; selecting "No" creates K&R-style code.
-
- Disk-Table: The Symbol Table Generate box is different from that
- described in the manual. Instead of automatically generating a symbol
- table for the active screen's sfile, you can select the sfile for which
- you wish to generate a symbol table. (By default, the sfile listed for
- generation is the active screen's sfile, but you can select a different
- one.) You can specify the directory from which the sfile and template
- both originate. You can also specify the destination directory for the
- generated symbol table. The Template File field uses the Plus key
- interface and checks for files with the ".tem" suffix.
-
- Disk-Import: The manual states that the "Import From" field has two
- choices, but, in fact, it has three: ASCII, DBD, and OLDLNF. The OLDLNF
- option allows you to import screens designed with version 2.1 of Look &
- Feel. See above, in Section 4.
-
- Disk-Save: You cannot include the "." (period) character in screen
- names. If you do this, Look & Feel truncates the name; for instance, the
- name "input.screen" becomes "input". This is because Look & Feel uses the
- period to indicate that a screen is nested. For instance, if you embed a
- text editor called "my_edit" in a data entry screen called "my_data", Look
- & Feel calls the text editor "my_data.my_edit".
-
- 9.3: Screen Commands
-
- Screen-Edit: The Screen Edit box has an additional field in its border
- features area. You can now give a border a "Top" feature, which brings
- the window to the foreground when you click the mouse on it. Look & Feel
- gives all its windows this feature in EDIT mode, but, in GO mode or when
- running, you can only top those windows whose borders have this feature
- enabled.
-
- Screen-Edit: There are several additional functions which allow you to
- customize your screens. The mouse handler "sedmou_Framer" is available
- for use with Framer menus. The special function "spc_Sled" is for use
- with sleds (Scrolling List EDitors). Two additional attributes are
- available for each screen: HiSel and HiReg. HiSel and HiReg define the
- colors of the highlighted character in a field when the field is selected
- and unselected, respectively. See the entry under field commands for more
- information on highlighted fields.
-
- Screen-Edit: The Screen Edit box's "name" field is not a protected
- field. If you wish to change the name of a screen, call the Screen Edit
- box and edit its name there.
-
- Screen-Wipe: This command allows you to clear all text and fields from
- the active screen. When you call this command, Look & Feel asks you if
- you wish to remove the screen's contents. If you choose to do this, the
- contents of the screens are removed permanently. Once you have wiped a
- screen, there is no way to restore its contents.
-
- Screen-Open: You can give a screen a name and an sfile when you open it.
- To see which screen names are in use in an sfile, you can use the Plus
- interface in the screen field of the Screen Open box. If you select a
- name in use, Look & Feel uses it. If you then save the screen, you will
- destroy the screen that had the name first. (NOTE: You cannot include the
- "." (period) character in screen names. If you do this, Look & Feel
- truncates the name; for instance, the name "input.screen" becomes
- "input". This is because Look & Feel uses the period to indicate that a
- screen is nested. For instance, if you embed a text editor called
- "my_edit" in a data entry screen called "my_data", Look & Feel calls the
- text editor "my_data.my_edit".)
-
- NEW FOR 3.2: Screen-Freshen: This command clears and redraws the screen,
- in the event that any "trash" appears on the screen, from line noise, OS
- messages, or other sources. This command is specifically designed for
- multi-tasking operating systems, such as UNIX, VMS, and QNX. This
- command's quick key is Ctrl-Z.
-
- 9.4: Field Commands
-
- Field-Edit: The manual states that the Field Edit box's Bobtype field
- displays the string "Bob-A," "Bob-E," "Ufunc," or "N/A". It has been
- changed to instead display the less arcane "Attach," "Embed," "Ufunc," or
- "*", for the non-bob case.
-
- NEW FOR 3.2: Field-Edit: Look & Feel now allows you to highlight a
- character in every field. Highlighted characters have their own
- attributes; in a menu, they serve as an identifier for the field during a
- search (instead of the first letter). To highlight a character, go to the
- spec field of the field edit box and press the Space Bar. This allows you
- to move across the spec with the arrow keys. When you are over the
- character you wish to highlight, press F5. Exit the field edit box and
- the character you selected is now colored with the screen's highlighted
- attributes. You can change these attributes in the Screen Edit box.
-
- NEW FOR 3.2: Field-Edit: To set the highlighted character for the
- selection items from a list_funcs list, place an "@" immediately before
- the character you wish to highlight. For instance, if your choices are
- blue, black, and brown, and you wish to highlight the "b" in "blue", the
- "l" in "black", and the "r" in "brown", the string in the second pointer
- of the Field Edit box should then be "@blue,b@lack,b@rown".
-
- Field-Edit: To move from editing one field to another while in the Field
- Edit box, press Ctrl-N. This passes control to the next field and places
- all the information about that field in the Field Edit box. Control
- remains in the same field in the box (i.e., Spec, Name, or wherever it
- is).
-
- Field-Global Edit: With this command, you alter all a screen's fields.
- You can give every field the same field function, variable type, field
- width, and protection mode. For instance, if you decide that all your
- fields should have a width of six, enter a six in the width field and then
- check off the field. If you do not check off a field, its value is not
- made global. You can unmark any fields which you have marked and you can
- also choose whether or not the screens bobs are affected. For more
- information on the parameters that you can set, consult Section 6.1 of the
- Look & Feel Manual.
-
- 9.5: Block Commands
-
- NEW FOR 3.2: You can now use the mouse to execute all Look & Feel block
- commands. To use a block command, click the mouse at one corner of the
- region you wish to manipulate and hold it down; next, drag it to the end
- of that region and release it. Look & Feel then places a popup on the
- display with a list of the block commands; click on the one you want and
- Look & Feel calls it. Note that in this interface, marking is always by
- column in regular screens and by row in editor windows.
-
- 9.6: Editor Commands
-
- Editor-Open: This command now has the quick key "F6".
-
- 9.7: Nesting Commands
-
- NEW FOR 3.2: Nesting-Attach: When you attach a screen to a field in
- another screen, the field in the parent screen should have bob_funcs as
- its field function.
-
- NEW FOR 3.2: Nesting-Attach: When you attach one screen to another, you
- have control of the child screen's position. (This is a change from Look
- & Feel 3.1, in which the child position was set automatically.)
-
- 9.8: Tools
-
- Tools-Global Settings: The Global Settings box has more options than
- listed in the manual. The "Sound" field turns your computer's sound on
- and off. The "Overwrite Prompt" field allows you to choose whether or not
- Look & Feel prompts you before you overwrite a screen or file. The
- "Monochrome" field allows you to toggle between a color display and a
- simulation of a monochrome display; this allows you to see how your color
- applications look on a monochrome monitor. The "43 Line Mode" field
- allows you to toggle between 25 and 43 line mode on EGA and VGA monitors;
- on other monitors, toggling this field does nothing.
-
- Tools-Character: Under DOS, if you place the right arrow character (hex
- 1a, dec 26) in a text file, the file is truncated at that character when
- it is next loaded. This is because the character is the DOS end of file
- character.
-
- 9.9: Help Commands
-
- Help-Help: This command calls Look & Feel's help system. See below for
- more information on the help system.
-
- Help-Quick Keys: This command displays a list Look & Feel's Quick Keys.
-
- 9.10: Field Functions
-
- Look & Feel offers several field functions which are not listed in the
- manual. These are click_funcs, nowrite_funcs, plong_funcs, radio_funcs,
- and togint_funcs.
-
- click_funcs boolean * Treats the field as a menu choice.
- Supports grid movement among fields.
- Pressing the first letter of a field or
- Enter selects that choice and exits the
- sed.
-
- nowrite_funcs char * Treats the field as a menu choice.
- Supports grid movement among fields.
- Identical to menu_funcs except it uses
- string_senter. The text of the menu
- choice is determined by the contents of
- the field's string variable. Hence, it
- can be changed at run-time but the user
- may not edit the field. Upon exit the
- value of the field is not written back to
- the variable.
-
- plong_funcs long * Positive integer function, identical to
- long_funcs except that it allows only
- positive values. Needs no space for a
- minus sign.
-
- togint_funcs int * Allows the user to cycle through a list of
- choices by pressing the space bar. The
- field's second data pointer contains
- choice definitions. Copies the number of
- the final choice into the field's
- variable.
-
- NEW FOR 3.2:
-
- radio_funcs boolean * Allows for the exclusive selection of one
- field from a group of fields, each of which
- has the same field name. Requires at least
- one writeable position.
-
- Look & Feel does not include select_funcs in its available field functions
- because it requires a structure for its variable. If you need a field to
- hold list of options, use toggle_funcs.
-
- 9.11: User Functions
-
- For pedagogical purposes, we have included a sample user function,
- lnf_Beep. This function sounds your computer's speaker at a tone. The
- idata value you select for field's user function determines the pitch of
- the tone. Refer to the "piano" screen in sample.lnf for a sample of its
- use. See lnf.c for the function's code.
-
- 10: ERRATA IN THE MANUAL
-
- Page Correction
-
- 6 Warning box directly above 1.3.3: The manual states that "all
- quick key sequences are keystroke mappings of calls to the main
- menu." Ctrl-G, which allows you to move to a selected line, does
- not have an equivalent menu choice.
-
- 7 Table: The table refers to FMARK mode, which does not exist.
- When marking a field, you enter FEDIT (FIELD EDIT) mode (which is
- discussed in Sections 6.1 and 6.2).
-
- 8 Third paragraph under Dialogue Boxes: You can pop up a list of
- choices not only by pressing "+", but by clicking the mouse.
-
- 9 Third paragraph: The manual says that the Type field in the
- Screen-Open box toggles among several choices. It actually uses
- the Plus key interface to pop up a list of choices.
-
- 11 Mouse box: There is a missing "is" between "which" and
- "equivalent" in the first sentence.
-
- 13 Last paragraph in Section 2.1: The manual says that the main
- editing area is obscured by the menu and status bar. In fact,
- the main editing area is only twenty-two lines tall (including
- its border) and resides between the menu and the status bar.
-
- 15 Step 1 in the procedure: The manual says that Field-Mark takes us
- into FIELD mode, but, in fact, we enter FEDIT mode.
-
- 15 Step 3 in the procedure: The manual says, "After writing the
- spec, press Enter." Before pressing Enter, move the cursor over
- the last character in the field with the Left arrow. This
- ensures that the spec has the proper width.
-
- 19 Step 1 in the procedure: The manual mentions the "phone" field,
- but should call it the "Phone" field.
-
- 19 Step 2 in the procedure: The manual refers to FIELD MARK mode,
- but, in fact, we enter FEDIT mode.
-
- 25 Screen shot: The screen shot mistakenly places a blank row
- between each field, while the instructions assume there is no
- space between the fields.
-
- 27 Procedure for code generation: The manual does not describe the
- Code Generation box as it is. See Section 6.2 of this document
- for a discussion of the Code Generation box. The code in
- screen.c includes test code and conforms to ANSI standards,
- though the manual does not mention this.
-
- 27 Screen shot: Same error as in screen shot on p. 25.
-
- 35 "A Ted from a Sed," paragraph 2: The special function that you
- must attach to the screen is spc_EmbedTed.
-
- 58 Warning in Section 5.1.8: The manual states "that shadow color
- determines the screen's color whether or not it is in a shadow."
- The shadow color determines the color of that section of the
- screen that is in the shadow. The rest of the screen has its
- usual colors.
-
- 76 Section 6.2 text: The manual states that Field-Mark (Ctrl-F)
- puts Look & Feel in MARK mode (which does not exist). Look &
- Feel, in fact, enters FEDIT mode.
-
- 91 First paragraph in Section 9.1: The manual says the Editor-Open
- command pops up the Screen Load box, but it actually pops up the
- Editor Load box.
-
- 108 Section 12.2: The manual does not mention the FSYM_CLASS
- delimiter, which indicates the start of the class function
- symbols. Consult the C-scape read.me for more information on
- this topic.
-
- 111 Data type of bob_funcs: Manual says that bob_funcs take NULL
- when they in fact take void.
-
- 112 Data type of framer_funcs: Manual says that framer_funcs take
- NULL when they in fact take void.
-
- 113 Data type of slug_funcs: Manual says that slug_funcs take NULL
- when they in fact take void.
-
- 116 Quick Keys, by Keystroke: The manual states that Ctrl-Z resets a
- dialogue box to default values. It actually clears and redraws
- the screen, to remove any "trash" that appears from line noise,
- OS messages, or other sources.
-
- 116 Quick Keys, by Keystroke: The manual contains no references to
- the "F6" key. F6 calls the Editor Load box.
-
- 117 Quick Keys, by Function: The manual states that Ctrl-Z resets a
- dialogue box to default values. It actually clears and redraws
- the screen, to remove any "trash" that appears from line noise,
- OS messages, or other sources.
-
- 118 Quick Keys, by Function: The manual contains no references to
- the "F6" key. F6 calls the Editor Load box.
-
- 11: COMMON QUESTIONS AND ANSWERS
-
- NEW FOR 3.2: Here we offer answers to questions that we have received from
- Look & Feel users.
-
- 11.1 How do I create a menuing system with Look & Feel?
-
- There are four basic steps to creating a menuing system from scratch:
-
- * design the entire menu;
-
- * create the main menu;
-
- * create each of the submenus; and
-
- * attach each of the submenus to the main menu.
-
- Before you begin building a menuing system, figure out how the entire
- structure works. For instance, let's suppose you have a main menu with
- four selections: two call submenus, one calls a user function, and the
- last returns a value. This means that you have to build the main menu and
- two submenus. You can set up fields that return values or call functions
- later.
-
- To create the main menu screen, start with a basic sed and lay out fields
- in it in whatever form you like. For a standard vertical slug, you must
- create a vertical menu: Fields should all have the same width and sit in
- successive rows. For a framer or a horizontal slug, you must create a
- horizontal menu: Fields should sit end-to-end in a single row. (You can
- also create a menu in which the fields are laid out some other way, though
- a framer menu does not work properly if its fields are laid out
- vertically.) Give these fields either slug_funcs or framer_funcs; the
- only functional difference between the two is that the main menu of a slug
- menu disappears when submenus are displayed, while a framer menu displays
- main and sub menus simultaneously. Once you have laid out all the fields
- and given them functions, resize the screen so it holds fields and no
- more. You now have a main menu and can proceed onward.
-
- Having created the main menu, you must now create the submenus. Begin by
- opening a basic sed. This will be the submenu for your first main menu
- selection. (When you open any new screen, make sure you give it a name[--]
- having several screens called "*" can be very confusing.) To create this
- submenu, use the same method as for the main menu. If your menuing system
- is a framer or vertical slug, this must be a vertical menu; if it is
- horizontal slug menu, this must be a horizontal menu. All the fields in
- this menu should have the same field function as those in the main menu.
- Now resize the screen to hold only the fields. Once this is finished, use
- the same procedure to create the second submenu.
-
- You should now place the menus where you want them to appear on the
- display. For a standard framer, the parent menu runs across the top of
- the display; the submenus should be immediately below the fields that call
- them. For a slug, the parent menu either runs across the top of the
- display (horizontal) or down the side (vertical); in either case, the
- submenus should cover the same section of the display as the parent. Look
- & Feel allows you to select whatever layout you want[--]these or something
- new.
-
- As you place the parent menu and submenus on the display, you may decide
- that the default border, bd_prompt, is not the best border for your
- menuing system. For instance, if you want your horizontal slug menu to
- resemble a Lotus menuing system, you can use the border, bd_123; bd_123 is
- a simple border that displays a prompt string immediately below its
- screen, without putting a box around the screen. If you want your border
- to display instructive prompts for your users, you must use a border that
- can hold prompts, such as bd_123, bd_mouse, bd_null, bd_prompt, or
- bd_std. Keep in mind the difference between a menu with a visible outline
- and an invisible one; each has its advantages.
-
- Once you are satisfied with the location and border of each menu, you can
- attach the submenus to the main menu. Returning to the particulars of the
- example, there are two submenus and the main menu. To attach the submenus
- to the main menu, pass control into the main menu, move to a field to
- which you want to attach a submenu, and call Look & Feel's Nesting-Attach
- command, Ctrl-W. Look & Feel then places a list of screen on the
- display. Go to the submenu you want to select and press Enter. At this
- point, Look & Feel places the Field Edit box on the display. Make sure
- that the field to which you are attaching the main menu already has
- framer_funcs or slug_funcs as its field function and press Enter. You
- have given the main menu field a submenu. Now repeat the process for the
- other field with a submenu.
-
- If you enter GO mode and select a choice with a submenu, the submenu now
- pops up.
-
- 11.2 When I generate code for a menuing system, it looks different then when I
- write code to create one according to instructions in the C-scape manual.
-
- Both framers and slugs are actually seds. As higher level objects,
- C-scape allows you to manipulate them with routines that are macros for
- sed_ functions. In fact, a framer and its pulldowns are a sed and some
- independent bobs. Though the terminology for menuing systems differs from
- that of bobs, the two are operationally identical--that's why Look &
- Feel's generated code for framers and slugs looks as if it's just for a
- sed with some bobs.
-
- If you are looking for frame_Open, slug_Go, or some other function, you
- will only find their sed_ equivalents. Though this is different from the
- paradigm described in the C-scape manual, it allows you greater ability to
- customize your work, since you can manipulate each menu individually, and
- not only as part of a larger structure.
-
- 11.3 After I have opened a basic framer or basic horizontal slug, the display
- becomes blank when I press Enter. Why is this?
-
- Basic framers and horizontal slugs have several traits in common: they are
- only one line tall, have no border, and have a background attribute of
- 0x07. If you press Enter, the single row of the basic screen is no longer
- displaying the menu choices--it's displaying the row beneath the menu
- choices. This row appears to be invisible because it's black and is
- sitting on top of the background sed, which is also black.
-
- To view the fields in the menuing system, press the UP key to move to the
- row that contains the fields. You can also give the screen a border,
- which clearly demarcates the difference between it and the background.
- Another option is change the menuing system's attributes in the Screen
- Edit box; by giving it a background attribute with a background color that
- is not black, the screen will always be visible on a black background.
-
- 11.4 How can I or should use the type field in Field Edit box?
-
- The type field in the Field Edit box holds the C variable type that the
- field uses. Normally, you do not need to edit this field or even pay
- attention to it. If you select a standard field function, Look & Feel
- automatically sets the type for the field. If you select a field function
- that is not linked in, the field's variable type is, by default, whatever
- type the field presently holds. Since, by default, fields have
- string_funcs as their field functions, the default type is char *. If you
- select, for instance, click_funcs and then enter a custom field function,
- the type is void, since click_funcs take a void.
-
- Look & Feel actually sets the variable for field by combining the type and
- the variable. For instance, if you select string_funcs as a field
- function (with char * as the type) and give the field the variable name,
- the field's variable is char *name. Look & Feel takes care of this on its
- own, so you usually need not even think about this; it only becomes
- important when your application involves arrays (see below).
-
- 11.5 How can I use arrays as variables in Look & Feel?
-
- To use an array of variables to hold the variables for a screen, you need
- to perform two actions:
-
- (1) pass the variables in question values along the array and
-
- (2) ensure that the variable types handle array entries properly.
-
- These changes are fairly simple, but vary according to variable types.
-
- For instance, if you wish to use an array of strings, you need only set
- the variables to array values, such as list[0], list[1], and list[2].
- Since an array of strings is an array of pointers to characters, you don't
- need to change the variable type and are finished.
-
- For any other kind of variable, you must change the variable's type. For
- instance, suppose you are creating an array of integers. First, set the
- variables to array members (as above). Next, change the variables' types
- so that instead of being pointers to ints (int *) they are simply ints
- (int). This is because when you select a field function that uses ints,
- Look & Feel automatically sets the variable type to int *; you need to
- change this to int, so that the code generated for the field will be int
- list[2], which is the third member of an array of ints. If you do not
- change the field's variable type, the generated code will be int *list[2],
- which is the third member of an array of pointers to ints.
-
- Remember that when Look & Feel generates code it simply concatenates the
- contents of the type and variable fields from the Field Edit box.
-
- Example:
-
- type: char *
-
- var: name
-
- code: char *name;
-
-
-
- type: int *
-
- var: x[3]
-
- code: int *x[3];
-
-
-
- type: int
-
- var: x[3]
-
- code: int x[3];
-
-
-
- If your needs indicate that you may need an array of mixed variable types,
- use a structure (next).
-
- 11.6 How can I use structures as variables in Look & Feel?
-
- Using elements of a structure to hold variables has three major steps.
- These are:
-
- (1) defining your variables to hold elements of a structure,
-
- (2) generating test code, and
-
- (3) defining the structure.
-
- Suppose you are designing a screen to hold product registration
- information, such as the product owner's name, phone number, and serial
- number. Let's call this screen "reg_screen". It has three fields; one
- with string_funcs and the other two with digit_funcs. When you create
- each field, you need to pass it the definition of an element of a
- structure (instead of the usual variable name). For instance, let's say
- that you want the structure to be a "reg_struct" (short for registration
- structure) called "my_struct". A sample variable might be:
-
- struct reg_struct my_struct->name
-
-
- This construction of a variable refers to the structure my_struct of type
- reg_struct. To use this variable, you enter it in the var field of the
- Field Edit box. The phone and serial number fields would hold the phone
- and serial elements, respectively.
-
- Example:
-
- type: char *
-
- var: struct reg_struct my_struct->name
-
-
- Having finished creating your screen, generate code for it that includes
- test code.
-
- The generated code will not work, however, as Look & Feel knows nothing
- about your new structure. You must fix the code by bringing it into Look
- & Feel's editor. Here, you have to define the structure type that you are
- using. This definition looks like this:
-
- struct reg_struct {
- char name[100];
- char phone[100];
- char serial[100];
- };
-
- This is a structure with three elements, each of which is an array of up
- to 100 characters. (Even though the fields probably aren't one hundred
- characters wide, making the structure's arrays one hundred characters wide
- ensures that there won't be a memory overwrite.) Place this definition
- immediately after the #includes in the test code.
-
- Within main, place a declaration of the particular structure that you wish
- to use. In this example, this declaration should be:
-
- struct struct_reg my_struct;
-
-
- Next, initialize the values of the variables in the structure:
-
- my_struct.name[0] = '\0';
- my_struct.phone[0] = '\0';
- my_struct.serial[0] = '\0';
-
-
- Also in main is a function that displays the registration screen, which,
- by default, has the same name as the screen within Look & Feel:
-
- reg_screen(&my_struct);
-
-
- Below main is the reg_screen function. With the alterations you have made
- to the code, you can now compile it and display an operational screen.
-
- If you want to continue manipulating the screen, delete the reg_screen
- function from the file and save everything you have done. After you are
- finished with any changes to the screen, generate code without generating
- test code and calling the file with definitions and declarations as a
- template file. This gives you code with a structure definition, variable
- initializations, and a routine to display the screen.
-
- 11.7 When I generate code or a symbol table, why does Look & Feel not always
- include the right header files?
-
- Look & Feel cannot check your screens to see which header files you need
- when you generate code or a symbol table. It automatically includes
- stdio.h, cscape.h, teddecl.h, msys.h and no other header files. If you
- want your generated file to call the appropriate header files, you must
- use a template file.
-
- A template file is a file that you create[--]it contains only the
- "include" lines for a .c file. A sample template file might look like
- this:
-
- #include <stdio.h>
- #include <string.h>
- #include <cscape.h>
- #include <teddecl.h>
- #include <sled.h>
- #include <msys.h>
-
-
- To ensure that your generated code has all the headers you need, create a
- template file that calls them. When you are in the Code Generate or the
- Symbol Table Generate box, go to the Template field and enter the name of
- the file with the headers in it. When Look & Feel generates the code, it
- automatically includes your template and calls the appropriate headers.
-
- 12: OAKLAND GROUP BBS
-
- NEW FOR 3.2: Our BBS supports color ANSI screens. Here is basic
- information to use it:
-
- BBS Phone Number: (206) 236-6485
-
- Baud Rates 1200 and 2400
-
- Line Protocol: 8 data bits
- 1 stop bit
- No parity
-
- Download Protocols: ASCII
- XMODEM
- XMODEM-CRC
- YMODEM
- YMODEM/BATCH
- ZMODEM
-
-
-
- We encourage all to use the bulletin board as a forum by which to share
- C-scape ideas, comments and code. If you have a problem and cannot solve
- it with the methods described above, call Oakland Group technical
- support. For more information on technical support and on our user groups
- on BIX and UUNET, see the pamphlet Oakland Group Support and Training,
- which is part of the C-scape package.
-