Appendix A: System Routines — Windows
1189
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
WinReOpen
Declaration:
BOOL
WinReOpen
(WINDOW *
w
, const WIN_RECT *
wRegion
,
WORD
Flags
, . . . )
Category(ies):
Windows
Description:
Reopen an existing window to a new size. Not valid for WF_SAVE_SCR
(unless using just to call
WinOpen
). If the window is not in the “list of
windows” then just calls
WinOpen
. Otherwise, it updates the Client,
Window, Clip, and Port regions. If the new window is of the same size as
the old one, then the Port region (DUP_SCR) is not cleared.
Inputs:
w
— WINDOW struct of a previously opened window.
Outputs:
Returns TRUE if window reopened OK, FALSE if not (bad window or not
enough memory to enlarge DUP_SCR —
WinRemove
called then).
Assumptions:
None
Side Effects:
May cause heap compression.
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: WinOpen
Example:
This example opens a window with WF_DUP_SCR on one side of the
screen. It then reopens the same window next to that window and copies
the backup image to this new window position.
WINDOW win1;
if (WinOpen(&win1,MakeWinRect(0,20,50,70),WF_DUP_SCR|WF_TTY )) {
WinActivate(&win1);
WinClr(&win1);
WinStr(&win1,"ABCDEFGHIJKLMNOP");
/* Since the size of win1 did not change, this WinReOpen will succeed.
The backup image will not be cleared since the window size did not change. */
WinDeactivate(&win1);
WinReOpen(&win1,MakeWinRect(50,20,100,70),WF_DUP_SCR|WF_TTY);
WinActivate(&win1);
WinBackupToScr(&win1);
GKeyIn(NULL,0);
WinClose(&win1);
}