a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 gadtools.library
  CreateContext
  CreateGadgetA
  CreateMenusA
  DrawBevelBoxA
  FreeGadgets
  FreeMenus
  FreeVisualInfo
  GT_BeginRefresh
  GT_EndRefresh
  GT_FilterIMsg
  GT_GetGadgetAttrsA
  GT_GetIMsg
  GT_PostFilterIMsg
  GT_RefreshWindow
  GT_ReplyIMsg
  GT_SetGadgetAttrsA
  GetVisualInfoA
  LayoutMenuItemsA
  LayoutMenusA
Include
GuruMeditation
Docs » Autodocs » gadtools.library » LayoutMenusA

NAME

	LayoutMenusA -- position all the menus and menu items. (V36)
LayoutMenus -- varargs stub for LayoutMenusA(). (V36)

SYNOPSIS

	success = LayoutMenusA(menu, vi, tagList)
D0 A0 A1 A2
BOOL LayoutMenusA(struct Menu *, APTR, struct TagItem *);
success = LayoutMenus(menu, vi, firsttag, ...)
BOOL LayoutMenus(struct Menu *, APTR, Tag, ...);

FUNCTION

	Lays out all the menus, menu items and sub-items in the supplied
menu according to the supplied visual information and tag parameters.
This routine attempts to columnize and/or shift the MenuItems in
the event that a menu would be too tall or too wide.

INPUTS

	menu - pointer to menu obtained from CreateMenusA().
vi - pointer returned by GetVisualInfoA().
tagList - pointer to an array of tags providing optional extra
parameters, or NULL.

TAGS

	GTMN_TextAttr (struct TextAttr *) - Text Attribute to use for
menu-items and sub-items. If not supplied, the screen's
font will be used. This font must be openable via OpenFont()
when this function is called. (V36)
GTMN_NewLookMenus (BOOL) - If you ask for WA_NewLookMenus for your
window, you should ask for this tag as well. This informs GadTools
to use the appropriate checkmark, Amiga-key, and colors. (V39)
GTMN_Checkmark (struct Image *) - If you are using a custom image for a
checkmark (WA_Checkmark), also pass it to GadTools, so it can lay
the menus out accordingly. (V39)
GTMN_AmigaKey (struct Image *) - If you are using a custom image for
the Amiga-key in menus (WA_AmigaKey), also pass it to GadTools, so
it can lay the menus out accordingly. (V39)
GTMN_FrontPen (ULONG) - This tag has existed for CreateMenus(), but now
LayoutMenusA() has it too. If a legitimate pen number is supplied,
it is used for coloring the menu items (in preference to
anything passed to CreateMenus()). If GTMN_NewLookMenus
has been specified, this tag defaults to using the
screen's BARDETAILPEN, else it defaults to "do nothing".
For visual consistency, we recommend you omit this tag in all
functions, and let the defaults be used. (V39)

RESULT

	success - TRUE if successful, FALSE otherwise (signifies that
the TextAttr wasn't openable).

NOTES

	When using this function, there is no need to also call
LayoutMenuItemsA().

BUGS

	If a menu ends up being wider than the whole screen, it will
run off the right-hand side.

SEE ALSO

CreateMenusA(), GetVisualInfoA()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Tristar & Red Sector Inc.

TRSI
TBL
TSL
RZR

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se