home *** CD-ROM | disk | FTP | other *** search
- What is in this package ?
-
- This posting contains a shared library for creating popup menus in all Atari-
- programs (not only GEM-Applications, but no accessories). It is based on the
- shared library framework of Preston L. Bannister. He had an excellant idea.
- Please read the original readme file from his distribution.
- There is no easy way to use AES-Calls in a library started at boot-time. So i
- choosed the accessory form for this library. The popup.acc does not provide a
- menu-entry. It can only be called from inside of other programs.
-
-
- What is a popup menu ?
-
- It is like an usual GEM-menu in the menu-bar except that it pops up wherever
- the mouse cursor is located when you call it. You can then select in the usual
- way by clicking with the left mouse button when the desired item is highlighted.
- Submenus are indicated by an arrow on the left side of the entry-text. If you
- select a submenu, it pops up at the current cursor location and the process of
- selection is repeated. You can also cancel the actual menu level by clicking
- the right mouse button. If you press the Help-key you'll get some help on the
- current entry (or popup menus in general, if no entry is selected).
-
-
- How can i use these menus ?
-
- You can use them inside your own programs. Perhaps you should first look at the
- example source poptest.c . Normally you create a popup-menu by calling the
- function DefineMenu("<menu-text>"), where <menu-text> is a list of entries, all
- seperated by the pipe-symbol `|'. For more advanced formats you should look at
- popup.h, the interface documentation for popup.acc . As return value of the
- function DoMenu(), which does the entire dialog, you get the number of the
- selected entry.
-
-
- How can i provide my own (help) functions ?
-
- The format-specification in DefineMenu() is used like the C-function printf().
- To specify a function to be called, when an entry is selected (the Help-key is
- pressed), you can use the format %f (%h) and provide the function-address as
- parameter to DefineMenu(). An example:
-
- beep()
- {
- putchar(7);
- }
-
- menu_selection()
- {
- menu my_menu;
-
- my_menu = DefineMenu(" hello world ! %f",beep);
- DoMenu(my_menu);
- FreeMenu(my_menu);
- }
-
- The function is called with three parameters:
- - the current GEM-handle of the virtual workstation of popup.acc
- - the default return value of this item
- - the string-entry of the current item
- If you don't use AES-calls anywhere else in your program, you can use the
- FormAlert()-function to display GEM-alerts on the screen (with the usual
- parameters of form_alert()). So you need not to link the whole GEM-stuff to
- your program.
-
- Any comments and suggestions are always welcome. Please mail to one of the
- addresses given in the popup.h file or when getting the generic-help message.
-
- Edgar Roeder
-