🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #14597

Re: How to print things on menu bar

#14597
From: dalea
Date: Mon, 26 Jan 1987 23:30
28 lines
1668 bytes
In article <938@uwmacc.UUCP> pwu@uwmacc.UUCP (Peter Wu) writes:
>How can I print things (e.g. numbers) on the menu bar...

(much deleted)

The simplest method that I know of is to 1) save the current port, 2) set
the port to Window Manager Port, 3) position the cursor near the top and
write using Quickdraw.  The Window Manager Port is the entire screen
(unless your program has changed it) and is addressed as any other GrafPort.

Once you have written to the location that corresponds to the menu bar,
reset the current port to the previously saved port (i.e. your window).

Oh yes, any routine that redraws the menu bar will wipe out what you've 
written to the bar so it will need to be redone.

As a debug routine, try printing and erasing a number in the bar for
entry and exits from a loop.  Sure shows up slow areas of code!
 


-- 
--
		Dale M. Arends  (Fujitsu America Inc., San Jose, Calif.)
		seismo!amdahl!fai!dalea  -or-  ihnp4!pesnta!fai!dalea

The opinions expressed herein do not necessarily reflect those of my employer.
They are entirely my own if they make sense and I disavow them if they don't.
Technical Details
Message-ID: <582@fai.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!ames!cit-vax!amdahl!fai!dalea
References: <938@uwmacc.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!ames!cit-vax!amdahl!fai!dalea
From: dalea@fai.UUCP
Newsgroups: comp.sys.mac
Subject: Re: How to print things on menu bar
Message-ID: <582@fai.UUCP>
Date: Mon, 26-Jan-87 18:30:08 EST
Article-I.D.: fai.582
Posted: Mon Jan 26 18:30:08 1987
Date-Received: Wed, 28-Jan-87 19:03:49 EST
References: <938@uwmacc.UUCP>
Reply-To: dalea@fai.UUCP (Dale M. Arends)
Organization: Fujitsu America, Inc.
Lines: 28
Keywords: menu bar