LPL Topics
Menus and Editors
23-52
Using the LI-6400
23
Figure 23-24 creates a window, and uses
to display the contents
of a CHAR array in that window as a menu with a menu bar. The user can
scroll through the contents, then exit using
escape
or
enter
.
The
-
and
¯
keys move the highlighted menu bar up and down. In general,
the cursor control keys defined for the standard menu function are given in
Table 5-2 on page 5-4.
What was selected?
Something very important is missing in Figure 23-24: there is no way to tell
what was selected. To do this, we must pass the
instead of a simple CHAR array, because
uses the Path status
registers to tell us where the cursor was when the user exits. We fix this prob-
lem in Figure 23-25 by making a Path to the menu items, then after
is finished (if the user pressed
enter
) we read in the selected line.
:CHAR
menuItems[] "This is item #1
This is item #2
and item #3
and 4
and 5
and 6\nand 7\nand 8\nand lastly, 9"
:FCT
Main
{
/* Make a window */
5 1 25 8 2 2 "My Menu"
WINDOW
/* Use a menu bar, and exit on esc or enter */
1 "" "\r" menuItems
STDMENU
DROP
/* Cleanup the display */
1 1
DISPWIDTH
DISPHEIGHT
0
WINDOW
CLEAR
}
Figure 23-24. Programming with
STDMENU
.
My Menu
¨
Find
¨
ReFind
¨
CANCEL
¨
SELECT
This is item #1
This is item #2
and item #3
and 4
and 5
and 6
Summary of Contents for LI-6400
Page 1: ...Using the LI 6400 Portable Photosynthesis System ...
Page 15: ...Part I The Basics ...
Page 16: ......
Page 174: ...Making Measurements Answers to Questions 4 56 Using the LI 6400 4 ...
Page 175: ...Part II Useful Details ...
Page 176: ......
Page 200: ...Standard Tools Power ON Hooks 5 24 Using the LI 6400 5 ...
Page 214: ...Real Time Data Real Time Graphics 6 14 Using the LI 6400 6 ...
Page 234: ...Environmental Control Light Control 7 20 Using the LI 6400 7 ...
Page 244: ...Light Sensor Considerations Gallium Arsenide Phosphide GaAsP Sensor 8 10 Using the LI 6400 8 ...
Page 288: ...Data Logging Making Your Own AutoPrograms 9 44 Using the LI 6400 9 ...
Page 289: ...Part III Working With Files ...
Page 290: ......
Page 312: ...The LPL File System Troubleshooting 10 22 Using the LI 6400 10 ...
Page 340: ...Downloading Files Using a Data Capture Program 11 28 Using the LI 6400 11 ...
Page 375: ...Part IV Configuration Issues ...
Page 376: ......
Page 420: ...Defining User Variables Old Style vs New Style 15 18 Using the LI 6400 15 ...
Page 454: ...Using an Energy Balance Further Reading 17 12 Using the LI 6400 17 ...
Page 455: ...Part V Maintenance Troubleshooting ...
Page 456: ......
Page 572: ...Troubleshooting Useful Information 20 46 Using the LI 6400 20 ...
Page 593: ...Part VI Programming ...
Page 594: ......
Page 622: ...Programming with LPL Compiler Directives 22 28 Using the LI 6400 22 ...
Page 846: ...Index I 16 Using the LI 6400 ...