Reference MWAPI

This section shows how to create a gadget and modify its characteristics. The characteristics that make up a gadget are stored as values assigned to attribute nodes in ^$W. Example 5.1 shows the syntax of a gadget's attribute node as assigned to ^$W.
^$W(<span class="emphasis"><iwindow name</i></span>,"G",<span class="emphasis"><igadget name,gadget attribute)=value</i></span>
The window name subscript is the name of the gadget's parent. The window's name must be unique among all the other windows in the current process; its maximum allowable stringlength is thirty-one alphanumeric characters; its first character must be either an alphabetic character or a percent sign; and it must be enclosed in quotes or assigned as a variable.
The second subscript identifies the type of element being referenced. The character "G" is used to indicate that the node is for a gadget. Chapter 7 discusses key letters for other element types.
The gadget name subscript specifies the name of the gadget and must be unique among all the gadget names specified for the parent window. The name given to a gadget is the identifier used when it receives focus or when an event occurs for it. Like window names, gadget names must not exceed a maximum stringlength of thirty-one alphanumeric characters, the first character can be a percent, and the name must be enclosed in quotes or assigned as a variable.
The fourth subscript, gadget attribute, is the name of an attribute for describing a characteristic of the gadget,...