home *** CD-ROM | disk | FTP | other *** search
- ----------------------------------------------------------------
- HP100LX WINDOWS ENVIRONMENT C-LIBRARY. vr2.1 Sept. 5,1994.
- ----------------------------------------------------------------
-
-
- This is a small C library for creating HP100LX applications
- with menus & windows which have the same look as the built-in
- ones. The reason I wrote this library is to be able to create
- regular (.COM / .EXE) programs that have the same environment
- as the built-in programs.
-
-
- What's new: FULLY AUTOMATIC MENU ENVIRONMENT.
- -----------
-
- This version has a powerfull function that takes complete
- control over the menu environment. This function, navigate()
- takes care of the complete menu system. The way it works, is
- you must call it periodically, and it will check if the menu
- or alt key is pressed. If it's not it returns a 0 (null). If
- the menu is pressed it will open the menu bar and wait for
- further control from the user. At the mean time it returns
- (0xff) to notify the rest of the program that the menu is
- activated. If a selection is made (pressing enter in an option
- of the menu) it will return the menu# and option# of that menu
- and close the active menu & menubar. So the only thing you
- must specify in your program is the text that goes into the
- menus. The rest is done automatically, even the sizing and
- position of the menus.
-
- See DEMO.C for more details on how to use this automatic environment.
- While running DEMO.COM press MENU to navigate through the menus
- and ENTER to select an option inside a menu.
-
- There are 10 files in this .ZIP package:
-
- HPCLIB.C File ready to be compiled for creating a stand
- alone library. Can not be included in a program.
-
- HPCLIB.MIX Power C pre-compiled library. *See note.
-
- HPCLIB.H Header file to be included in your programs.
-
- HPWENV.C Source file that can be included in your programs
- if you don't create a library with HPCLIB.C
-
- HPCLIB.DOC This 'read.me' file.
-
- HPCLIB.GDB All the functions of the HPGRAPH library are
- listed with examples in .GDB (HP100LX database)
- format for reference.
-
- FUNCTION.DOC Same as HPGRAPH.GDB but in ASCII format.
-
- DEMO.C Demo C-source file demonstrating the use of
- the functions. NOTE: If you create a stand
- alone library with the file HPCLIB.C, remove
- the #include "hpwenv.c" line #45 from the
- demo.c file.
-
- DEMO.EXE The compiled, executable interactive demo
- file that you must run to see what the
- library can do for you.
-
- DEMO2.EXE This is another demo showing you how to
- control the menu environment manually.
-
- * Note:
-
- For those interested, here's the compiler I used to create
- and compile the included programs with the HP100LX:
-
- --------------------------
- The Power C compiler, by:
- --------------------------
- MIX SOFTWARE INC.
- 1132 Commerce dr.
- Richardson, TX 75081
- U.S.A.
- Cost= $29.95 book incl.
- Phone: (214)783-6001
-
-
- The HPGRAPH.GDB file is a reference database of the HPGRAPH
- functions in GDB database format.
-
- The FUNCTION.DOC file is an ASCII reference of the HPGRAPH
- functions, and was created by the HP100LX smart-clip function.
- All the information about the functions is included in this
- file in alphabetical order.
-
-
- Using the functions:
- --------------------
-
- Creating a windows environment for your programs with this
- library is very easy. The only thing you have to define is
- the text that goes into the menus and the menu bar, and the
- rest is done automatically: Positioning & sizing of the menus,
- selection in the menubar and menus, saving screen contents
- and restoring them when closing menus & windows, etc...
-
-
- Here's a brief description:
-
-
- 1) To define the menus, all you have to do is write it in the
- following syntax:
-
- MENUITEMS ={
-
- /* menu1 */ {"Load F2","Save F10"},
- /* menu2 */ {"Edit F3","Insert F4","Delete F5"},
- /* menu3 */ {"Quit F8"},
- /* menu4 */ {"Help F1","About"}};
-
- In this example, we have 4 menus. Up to 8 menus may be defined,
- with 10 options maximum per menu. Menu2 here, has 3 options.
-
-
- *******
-
-
- 2) To define a menubar, use the following syntax:
-
- MENUBARMSG ="File Edit Search Quit Help ";
-
-
- The rest is done automatically. By using the navigate()
- function, the menu navigation takes care by itself. The
- navigate() function will return to you the following codes:
-
- 0x00: menu not active.
- 0xff: menu in navigation process by the user.
-
- 0x01-ef0: coded menu# and option# within the menu. The most
- significant bits (4-7) is the menu#, the least
- Significant bits (0-3) is the option#.
-
-
- By studying the demo.c file, you will be able to create a
- window & menu environment template in minutes for any of
- your programs. Creating windows is also very easy. Up to
- 8 windows can be opened at the same time, which is more than
- enough, considering that the built-in applications of the
- HP100LX don't open more than 3 windows at the same time.
- See DEMO.C for more details.
-
-
- About the library
- -----------------
-
- Most of the above files were written on a 2MB HP100LX. Some
- of the newer functions are written on a HP200LX.
-
- I could have included the .OBJ object code of the library,
- but the compiler I'm usnig compiles object files to
- .MIX which isn't compatible with Microsoft's .OBJ format.
- So I just included the .MIX object file.
-
- I had many complains about the way my compiler handles the
- ASM function. For the moment I haven't found another way
- to replace this function with something else. The reason
- I HAD to use this function is for only ONE routine that
- needed to pass arguments to the BP register. The INT86 and
- INT86X functions DO NOT support the BP register. If someone
- is able to find another way of writing that part of the
- code so it can be more standard, PLEASE let me know. It's
- too bad that many people can't use the library because of that.
- You may also find other functions that your compiler won't
- support in the exact same manner as the Power C compiler.
- In the future I might convert this library to a Microsoft
- or Borland compatible library.
-
-
- -----
-
-
- Future uploads will include Entry screens, and other functions.
- If you need any other information you can reach me at the HPHAND
- forum of CompuServe. I try to LOG on daily.
-
-
- My name: Harry Konstas
- CIS I.D. 72540,620
-
-
- Have fun!
-
-
- ________________________________________________________________
- Special Notes:
-
-
- 1) If your C compiler doesn't have the FP_SEG & FP_OFF macros
- defined, add the following to your program:
-
- #define FP_SEG(farptr) (*((unsigned *)&(farptr) + 1))
- #define FP_OFF(farptr) (*((unsigned *)&(farptr)))
-
- 2) Ofcourse, I can not be held responsible for any possible
- dataloss by the use of this library. I've taken care so
- there are no bugs in the code, but nothing's perfect. I
- wrote this library for my own use and I'm happy to share
- it with others. All the files that came in this ZIP
- package are freeware and not to be sold to anyone. Please
- distribute them free of charge.
-
-