Download Amiga Intuition Reference Manual
Transcript
GADGET FUNCTIONS These are brief descriptions of the functions you can use to manipulate gadgets. For complete descriptions see Appendix A, "Intuition Function Calls." Adding and Removing Gadgets from Windows or Screens Use the following functions to add a gadget to or remove a gadget from the gadget list of a window. AddGadget(AddPtr, Gadget, Position) This function adds a gadget to the gadget list of a window. AddPtr is a pointer to the window. Gadget is a pointer to the gadget. Position is where the new gadget should go in the list. RemoveGadget(RemPtr, Gadget) This function removes a gadget from the gadget list of the specified window. RemPtr is a pointer to the window from which the gadget is to be removed. Gadget is a pointer to the gadget to be removed. Disabling or Enabling a Gadget The following functions disable or enable a gadget in a window, screen, or requester. OnGadget(Gadget,Ptr,Requester) This function enables the specified gadget. Gadget points to the gadget you want enabled. Ptr points to a Window structure. Requester points to a requester or is NULL. OffGadget(Gadget, Ptr, Requester) This function disables the specified gadget. 114 Gadgets