Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / gadtools / layoutmenuitemsa.c
blobc64a3f56ec7010f7e9fb8ec2d296432e4462a55d
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "gadtools_intern.h"
10 /*********************************************************************
12 NAME */
13 #include <exec/types.h>
14 #include <proto/gadtools.h>
15 #include <intuition/intuition.h>
17 AROS_LH3(BOOL, LayoutMenuItemsA,
19 /* SYNOPSIS */
20 AROS_LHA(struct MenuItem *, menuitem, A0),
21 AROS_LHA(APTR, vi, A1),
22 AROS_LHA(struct TagItem *, tagList, A2),
24 /* LOCATION */
25 struct Library *, GadToolsBase, 10, GadTools)
27 /* FUNCTION
29 INPUTS
30 menuitem - Menu item to be layouted.
31 vi - Visual info to layout the menu item for.
32 tagList - Additional tags.
34 RESULT
35 FALSE, if an error occured.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 LayoutMenusA(), GetVisualInfoA()
46 INTERNALS
48 HISTORY
50 ***************************************************************************/
52 AROS_LIBFUNC_INIT
54 struct VisualInfo *vinfo = (struct VisualInfo *)vi;
55 struct MenuItem *item = menuitem;
57 /* First layout subitems */
59 while (NULL != item)
61 if (NULL != item->SubItem)
63 if (FALSE == layoutsubitems(item,
64 vinfo,
65 tagList,
66 GTB(GadToolsBase)))
67 return FALSE;
69 item = item->NextItem;
73 ** Process all menu items and subitems
75 if (FALSE == layoutmenuitems(menuitem,
76 vinfo,
77 tagList,
78 GTB(GadToolsBase)))
79 return FALSE;
82 return TRUE;
84 AROS_LIBFUNC_EXIT
86 } /* LayoutMenuItemsA */