/*  GadTools layout toolkit
**
**  Copyright © 1993-1995 by Olaf `Olsen' Barthel
**  Freely distributable.
**
**  :ts=4
*/

#include "gtlayout_global.h"

#ifdef DO_MENUS

	/* LT_DisposeMenu(struct Menu *Menu):
	 *
	 *	Dispose of the menu we created below.
	 */

VOID LIBENT
LT_DisposeMenu(REG(a0) struct Menu *Menu)
{
	if(Menu)
	{
		struct RootMenu *Root = (struct RootMenu *)((ULONG)Menu - offsetof(struct RootMenu,Menu));

		FreeScreenDrawInfo(Root -> Screen,Root -> DrawInfo);

		CloseFont(Root -> Font);

		AsmDeletePool(Root -> Pool,SysBase);
	}
}

#endif	/* DO_MENUS */
