Article View: comp.sys.atari.st
Article #41507Re: Saving the menu bar
From: Steve Yelvington
Date: Sat, 03 Mar 1990 17:09
Date: Sat, 03 Mar 1990 17:09
29 lines
1938 bytes
1938 bytes
[In article <1886@clyde.concordia.ca>,
agostino@sherlock.cs.concordia.ca (DELIGIA agostino) writes ... ]
> Hi everyone! Could anyone explain to me how I can save the menu bar of some
> program from within an accessory which is to use the whole screen? It goes
> like this: I started writing an accessory prg and after coding the part which
> clears the screen, tried it. Everything went fine until I left the acc--the
> menu bar was gone. Then I remembered: I have to save the menu bar, but how?
A long time ago, Moshe Braner posted a skeleton program for converting a
TOS application to a desk accessory. In it, he saved the menu bar manually
by copying the first 1520 bytes of the physical screen to a safe place, then
copying it back when the ill-behaved desk accessory was ready to go back
to sleep. You find the physical screen by calling Physbase().
The DA also calls form_dial with the desktop's dimensions to cause the
screen manager to send redraw messages to any affected programs.
I've tried it and it works fine on my system. I believe it's the technique
he uses in the DA version of GNOME (GNOME's Not Ordinary Micro EMACS).
The 1520-byte figure is fine for low, medium and high resolution, but it's
not going to work on a Moniterm or Image Systems display. Anybody want to
take a crack at a function that returns the proper size for the cheater's
menubar buffer, based on GEM's notion of the screen size?
--
Steve Yelvington at the lake in Minnesota
UUCP path: ... umn-cs.cs.umn.edu!thelake!steve
Technical Details
Message-ID:
<A1496192099@thelake.mn.org>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!umn-d-ub!cs.umn.edu!thelake!steveReferences:
<1886@clyde.concordia.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!umn-d-ub!cs.umn.edu!thelake!steve From: steve@thelake.mn.org (Steve Yelvington) Newsgroups: comp.sys.atari.st Subject: Re: Saving the menu bar Message-ID: <A1496192099@thelake.mn.org> Date: 3 Mar 90 17:09:28 GMT References: <1886@clyde.concordia.ca> Lines: 29