MenuBar V2.1
============

Written by Manfred Lippert
Email: mani@mani.de
Web:   http://www.mani.de/


What is MenuBar?
================

MenuBar extends MagiC with special functions that affect the menu bar.

MenuBar.prg belongs in the AUTO folder.

If you are already using A-MAN.PRG, then you don't need MenuBar.prg.


Installation
============

MenuBar from version 2.0 onwards only works together with "Trapper". 
Trapper is a tool that simplifies the development of system extensions.

MenuBar is best started from the AUTO folder. One must ensure that 
it is started after Trapper. Under MagiC one should use the file 
AUTOEXEC.BAT to establish the order of the AUTO folder programs (see 
the MagiC docs). The order can also be shown and changed in some boot 
managers.

Notes: MenuBar only works if during installation there is enough room 
in the cookie-jar for the MenuBar cookie. MenuBar does not itself 
extend the cookie-jar. If there is no more room in the cookie-jar, 
MenuBar from version 2.0 onwards displays a corresponding error message.

From MagiC 6 onwards one can set the size of the cookie-jar in the 
MAGX.INF. This is done, for instance, with the line

cookies=50

in the #[boot] section of the MAGX.INF file.


Freeware
========

MenuBar may be distributed freely - but only with this text and both 
unaltered.

Trapper is equally Freeware.


For programmers
===============

- One can recognise whether MenuBar is installed by the 'MbAr' cookie. 
  One should also test for the 'AmAN' cookie, as A-MAN.PRG offers the 
  same functionality as MenuBar.

- If MenuBar is installed, one can use menu_bar(-2/-3) to interrogate 
  the tree address of a menu bar in an application. menu_bar(-2) returns
  the High word and menu_bar(-3) the Low word.

Example:

OBJECT *get_menu(int apid)
{
	unsigned int hi = menu_bar((OBJECT *)apid, -2);
	unsigned int lo = menu_bar((OBJECT *)apid, -3);
	OBJECT *tree = (OBJECT *)(((unsigned long)hi << 16) | lo);
	return tree;
}

  Furthermore, MagiC itself already offers the possibility to 
  establish the application to which the current menu bar belongs 
  with menu_bar(-1).

- In addition, when MenuBar is installed one can interrogate the menu_id
  for an accessory. For this one calls menu_register(-1, "?\0\n"), where 
  n is the apid of the accesory in question.


History
=======

V2.1, 2.3.1999
--------------

- Serious bug remedied, now runs more leanly.

V2.0, 6.2.1999
--------------

- Conversion to Trapper
- Output of error messages with failed installation
- Otherwise fully compatible with Version 1.0

V1.0, July 1997
---------------

- First version


Have fun!
Manfred Lippert

------------------------------------
English translation Peter West, DDP

