[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need function to mvwin and resize in one step
From: |
Thomas Dickey |
Subject: |
Re: Need function to mvwin and resize in one step |
Date: |
Wed, 15 Mar 2006 18:07:39 -0500 (EST) |
On Tue, 14 Mar 2006, David Whetstone wrote:
Greetings,
If I have a window in the lower-left of the terminal, and I resize the
terminal such that the window's origin is outside the bounds of the terminal,
and the window's size is larger than the terminal, there is no way to
move/resize the window back into the visible area. Both mvwin() and
wresize() check if the window will exceed the boundaries of the terminal and
die if so.
wresize() checks if a subwindow fits into the parent window.
A regular window should work.
A function that combines moving and resizing in one step would be a welcome
addition, but in the mean-time, is there any way around my dilemma other than
deleting the window and creating a new one?
You should be able to construct a function using the existing library
units that would do this. To be completely general, it would have to
check whether the window to be resized is a subwindow or a regular
window (there's no function for that - just the _SUBWIN flag). The
functions getmaxyx(), etc., provide a caller with the window's size.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net