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

#include "gtlayout_global.h"

#ifdef DO_MENUS

	/* AdjustMenuPosition(RootMenu *Root):
	 *
	 *	Calculate the effective positions of the menus
	 *	and submenus.
	 */

VOID __regargs
LTP_AdjustMenuPosition(RootMenu *Root)
{
	MenuNode *Menu;

	for(Menu = (MenuNode *)Root -> MenuList . mlh_Head ; Menu -> Node . mln_Succ ; Menu = (MenuNode *)Menu -> Node . mln_Succ)
		Menu -> Width = LTP_AdjustItemPosition(Menu -> Menu . FirstItem,Menu -> Menu . LeftEdge + 4,Root -> Screen -> BarHeight + 1);
}

#endif	/* DO_MENUS */
