home *** CD-ROM | disk | FTP | other *** search
- gadutil.library/GU_LayoutGadgetsA gadutil.library/LayoutGadgetsA
-
- NAME
- GU_LayoutGadgetsA -- Formats an array of GadTools gadgets.
-
- SYNOPSIS
- gad_info = GU_LayoutGadgetsA(gad_list, gadgets, screen, taglist)
- D0,A0 A0 A1 A2 A3
-
- APTR GU_LayoutGadgetsA(struct Gadget **, struct LayoutGadget *,
- struct Screen *, struct TagItem *);
-
- FUNCTION
- Creates a laid-out gadget list from a LayoutGadget array, which
- describes each gadget you want to create. Gadgets you create can
- be any of the gadget kinds supported by GadTools, as well as any
- of the extended gadget kinds provided by GadUtil.
- The gadgets created by this routine, can easily be defined so that
- they adjust their sizes and positions to accomodate fonts of any
- size, and also adapt to different locale strings.
-
- INPUTS
- gad_list - a pointer to the gadget list pointer. This will be
- ready to pass to OpenWindowTagList() or AddGList().
-
- gadgets - an array of LayoutGadget structures. Each element in
- the array describes one of the gadgets that you will
- be creating. Each LayoutGadget structure in the array
- should be initialized as follows:
-
- lg_GadgetID - the ID for this gadget. An ID of -1
- terminates the array.
-
- lg_LayoutTags - tags that describes each gadget to
- create. These tags is used to calculate
- positions, sizes and other attributes
- of the created gadgets.
-
- lg_GadToolsTags - additional tags for GadTools gadgets.
- This would be the same set of tags that
- you might pass to CreateGadgetA() if
- you were using GadTools directly.
-
- lg_Gadget - the pointer to the Gadget structure created
- for this gadget will be placed here. You
- should initialize this field to NULL. The
- gadget structure created should be considered
- READ ONLY! This field will contain a pointer
- to a struct BBoxData, if the created gadget
- kind is a BEVELBOX_KIND.
-
- Assembly language programmers can use the macro GADGET:
-
- GADGET GadgetID, Gad_LayoutTags, Gad_GadToolsTags
-
- screen - a pointer to the screen that the gadgets will be created
- for. This is required, so that the layuot routines can
- get display info about the screen where the rendering
- will be done. Use LockPubScreen() to use a public screen,
- or OpenScreenTagList(), if you want to use your own screen.
-
- taglist - pointer to a taglist (see in a later release of this
- library for allowed tags, or click here to jump to the
- PRELIMINARY DOCS for this function).
-
- RESULT
- gad_info - a pointer to a private structure. You must keep this
- value and pass it to GU_FreeLayoutGadgets() later on
- in order to free up all resources used by your gadgets.
- This pointer is also used in a lot of other functions
- in this library.
-
- NOTES
- You must be careful with the taglist in the lg_LayoutTags field.
- Tags are processed sequentally in the order you give them in, and
- if a tag references another gadget (eg. the GL_TopRel tag), then
- processing of the current gadget halts while the referenced gadget
- is processed (if it has not already been processed). Problems can
- occur if this gadget refers back to the original gadget that
- referenced if, if it is referring to a field that has not yet been
- processed in that gadget.
-
- SEE ALSO
- GU_FreeLayoutGadgets(), GU_CreateGadgetA(), gadtools/CreateGadgetA()
-