ÿ@SUBJECT:TSEditor 2.00 Macros (1/3) N
[Date: 2 April 1995]
[Time: 2:56pm]
This post is part of an occasional release of useful macros. All
the normal four-space indentations of the following macros have been
shortened to two-space indentations to fit within fidonet message
width limits.
The following two macros are very simple, but are nonetheless
quite useful and fun. They toggle or set the current video mode as
shown in the code. I use these macros incessantly while coding, to
switch rapidly and easily between close and landscape views of larger
routines. These macros require a VGA card, and are meant to be burned
into tse.ui. They are written the way they are to allow attachment of
a special routine at the end of the first macro to do [something] after
changing the current video mode. I use such a routine in my customized
tse.ui to update special global variables intended to be written to an
enhanced statusline. The second of the two macros is an adaptation of
and replacement for the original video mode menu that came with the
default tse.ui user interface configuration file.
/* --------------------------88------------------------- */
constant togglevariable = 2048
proc mToggleOrSetCurrVideoMode(integer videomode)
if (videomode == togglevariable)
case Query(CurrVideoMode)
when (_25_LINES_) videomode = _28_LINES_
when (_28_LINES_) videomode = _43_LINES_
when (_43_LINES_) videomode = _50_LINES_
when (_50_LINES_) videomode = _25_LINES_
endcase
endif
Set(CurrVideoMode, videomode)
//iPutSpecialRoutineHereIfDesired()
end
menu CurrVideoModeMenu()
title = "Video Mode"
history = Query(CurrVideoMode)
nokeys
"{&25} lines", mToggleOrSetCurrVideoMode(_25_LINES_), CloseAllBefore
"{2&8} lines", mToggleOrSetCurrVideoMode(_28_LINES_), CloseAllBefore
"{&43} lines", mToggleOrSetCurrVideoMode(_43_LINES_), CloseAllBefore
"{5&0} lines", mToggleOrSetCurrVideoMode(_50_LINES_), CloseAllBefore
end
mToggleOrSetCurrVideoMode(togglevariable)
CurrVideoModeMenu()
mToggleOrSetCurrVideoMode(_25_LINES_)
mToggleOrSetCurrVideoMode(_28_LINES_)
mToggleOrSetCurrVideoMode(_43_LINES_)
mToggleOrSetCurrVideoMode(_50_LINES_)
/* --------------------------88------------------------- */
--- FidoPCB v1.4 [ff151/a]
---------------
* Origin: SemWare Support BBS * 404-641-8968 * (1:133/314)
|