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 » CreateContext

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,NULL);
/* other stuff */
CloseWindow(myWindow);
}
}
FreeGadgets(glist);

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:

The Silents

CSL
DC
KEF
TSL

Comments:

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