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