NAME CreateContext -- Create a place for GadTools context data. (V36) SYNOPSIS gad = CreateContext(glistpointer); D0 A0 struct Gadget *CreateContext(struct Gadget **); FUNCTION Creates a place for GadTools to store any context data it might need for your window. In reality, an unselectable invisible gadget is created, with room for the context data. This function also establishes the linkage from a glist type pointer to the individual gadget pointers. Call this function before any of the other gadget creation calls. INPUTS glistptr - Address of a pointer to a Gadget, which was previously set to NULL. When all the gadget creation is done, you may use that pointer as your NewWindow.FirstGadget, or in intuition.library/AddGList(), intuition.library/RefreshGList(), FreeGadgets(), etc. RESULT gad - Pointer to context gadget, or NULL if failure. EXAMPLE struct Gadget *gad; struct Gadget *glist = NULL; gad = CreateContext(&glist); /* Other creation calls go here */ if (gad) { myNewWindow.FirstGadget = glist; if ( myWindow = OpenWindow(&myNewWindow) ) { GT_RefreshWindow(win); /* other stuff */ CloseWindow(myWindow); } } FreeGadgets(glist); NOTES BUGS SEE ALSO