Important: The information in this document is obsolete and should not be used for new development.
The Window State Data Record
The zoom box allows the user to alternate quickly between two window positions and sizes: the user state and the standard state. The Window Manager stores the user state and your application stores the standard state in the window state data record, whose handle appears in thedataHandle
field of the window record.The
WStateData
record data type defines the window state data record.
TYPE WStateDataPtr = ^WStateData; WStateDataHandle = ^WStateDataPtr; WStateData = RECORD userState: Rect; {size and location established by user} stdState: Rect; {size and location established by app} END;The
Field Description
userState
- A rectangle that describes the window size and location established by the user.
- The Window Manager initializes the user state to the size and location of the window when it is first displayed, and then updates the
userState
field whenever the user resizes a window. Although the user state specifies both the size and location of the window, the Window Manager updates the state data record only when the user resizes a window--not when the user merely moves a window.stdState
- The rectangle describing the window size and location that your application considers the most convenient, considering the function of the document, the screen space available, and the position of the window in its user state. If your application does not define a standard state, the Window Manager automatically sets the standard state to the entire gray region on the main screen, minus a three-pixel border on all sides. The user cannot change a window's standard state.
- Your application typically calculates and sets the standard state each time the user zooms to the standard state. In a word- processing application, for example, a standard state window might show a full page, if possible, or a page of full width and as much length as fits on the screen. If the user changes the page size through Page Setup, the application might adjust the standard state to reflect the new page size. (See Macintosh Human Interface Guidelines for a detailed description of how your application determines where to open and zoom windows.)
ZoomWindow
procedure changes the size of a window according to the values in the window state data record. The procedure changes the window to the user state when the user zooms "in" and to the standard state when the user zooms "out." For a detailed description of zooming windows, see "Zooming a Window" beginning on page 4-53. For descriptions of the routines you call when zooming windows, see "Zooming Windows" beginning on page 4-93.