Chapter 12. Windows in PsyScope
typedef struct { short verify; unsigned autoEdit:1; unsigned readOnly:1; unsigned hasLists:1; unsigned noAutoList:1; unsigned noPurgeSeg:1; unsigned notifyOnly:1; unsigned needTimeIconified:1; unsigned reserved:7; unsigned closeWithConfig:2; long a4; void (*UpdateProc)(WindowPtr); short (*EventProc)(WindowPtr, EventRecord *); TEHandle text; short (*CloseProc)(WindowPtr); short (*CommandHook)(char, WindowPtr, long); void (*NeedTimeProc)(WindowPtr); void (*PrepareForChange)(WindowPtr); void (*RestoreAfterChange)(WindowPtr); void (*ZoomProc)(WindowPtr, int, Point); short (*ModTitleProc)(WindowPtr, int); void (*ActivateProc)(WindowPtr, int); void (*EditProc)(WindowPtr, int, Ptr); long pasteType; long icon; long data; } WindowProcRec;The name of the
verify
field is an artifact. By default, it should be set to 42. If it is anything else, it is assumed to be a `DLOG' ID to be used with Balloon Help (not yet implemented); in this case, icon
must also be set so that a resource file ID is available.
The autoEdit
field specifies whether the menu handler should automatically take care of text-editing (cut and paste) for active text items in the dialog. The readOnly
flag specifies that no pasting should occur in the active item. The hasLists
field specifies whether the dialog uses lists through the PsyScope list utilities, for auto-editing purposes. pasteType
refers to the type of items that may be pasted into the currently active list (if it is a list, and not a text field). The noAutoList
flag specifies whether automatic menu enabling should be overriden if a list item is active. The notifyOnly
field specifies that the EditProc
should only be called to send an edit_Changed
message (see below). The value of any of these flags can change at any time.
The noPurgeSeg
field specifies that the code segment in which the CloseProc
exists should not be purged after the dialog is closed, but this applies only if a4
is 0.
If the closeWithConfig
flag is TRUE
, the window will be closed when the script is closed; if it is FALSE
, PrepareForChange
and RestoreAfterChange
will be called at the appropriate times.
If a4
is non-zero, the value of the A4 register will be set to this field's value before any of the window's callbacks are called. This is useful for asynchronous PSYX windows living in the A4 world (see "1.3.1.2 Stand-alone code resources").
The text
field should contain the handle to the currently active text record in the dialog, so that the caret can be blinked.
rsvd3
should be initialized to 0.
The data
field may be used for anything.
The other fields in the record are pointer to C functions, to be called by the Interface Manager at the appropriate times. None of the functions are required; set the pointer to NULL to default the function. Below is a list of when each proc is called and how each proc should behave. All of the functions take a WindowPtr argument, which will be the window for which the proc is being called (the one owning the record).
Generated with CERN WebMaker