Topic: Size of full-size window (1 of 2), Read 14 times
Conf: VEDIT Macro Language Support
From: Pauli Lindgren
Date: Thursday, July 03, 2008 04:48 AM

1. Is there a macro command to change a window to full-size window, as with menu command "View" -> "Full size"?

2. Is there a way to find out the size the document area (i.e. the size of full-size window) so that you could for example adjust a window to be half of the maximum height?
If you try to calculate it for example with
Screen_Lines*Font_Height
it gives too small value. In addition, it does not take account any reserved windows.

--
Pauli

 


Topic: Re: Size of full-size window (2 of 2), Read 17 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Thursday, July 24, 2008 05:32 PM

On 03.07.2008 10:49 in vedit-macro-language "Pauli Lindgren" wrote:
>
> 1. Is there a macro command to change a window to full-size window,
> as with menu command "View" -> "Full size"?
>
> 2. Is there a way to find out the size the document area (i.e. the size of full-size window)
> so that you could for example adjust a window to be half of the
maximum height?
> If you try to calculate it for example with
> Screen_Lines*Font_Height
> it gives too small value. In addition, it does not take account any reserved windows.

Years ago I tried it this way (in my winmax.vdm):


//
// WINMAX.VDM Christian Ziemski 13.07.1999
// 28.08.2000
//
// Maximizes all of VEDIT's windows to the size of the editing area
// (excluding reserved windows)
// Useful e.g. after a cascade or tile windows.
//

Num_Push(96,99) // save user registers
Win_Create(Win_Free(),0,0,0,0) // create fullsize temporary window //
maybe there is an
#98=Win_Width // measure it's size //
internal value for
#99=Win_Height //
the editing area???
Win_Delete(Win_Num) // and trash it again

#96=Win_Total // amount of current windows

for(#97=1 ; #97<=#96 ; #97++){ // check all windows
if(Win_Status(#97)>0){ // if attached to a buffer
Win_Move(#97,0,0,#98,#99) // resize it
}
}

// This version should be better, but doesn't work! But why not??
// #97=1
// do {
// Win_Switch(#97)
// if(Win_Status(#97)>0){ // if attached to a buffer
// Win_Move(#97,0,0,#98,#99) // resize it
// }
// #97=Win_Next
//} while(#97>1)

Num_Pop(96,99) // restore user registers



Christian