🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #10612

Re: Another "fix": this one to Intuition

#10612
From: Randell Jesup
Date: Fri, 16 Dec 1988 07:14
47 lines
2866 bytes
In article <2334@kalliope.rice.edu> phil@rice.edu (William LeFebvre) writes:
>Here's another thing I wish they'd fix when revamping stuff for 1.4.  I
>believe this is a problem with Intuition.  I wish that menus paid
>attention to the font's height.  I would like to run an interlaced
>workbench using topaz/11 for a default font, but when I do that the menus
>look all wrong.  It is clear that the code that builds the menu is still
>assuming that the font only has a height of 8.
>
>Is there a way around this, or am I right in assuming that this is a
>genuine bug/problem?

	Well, it's not a bug, but it is a problem with the general system
design.

	Intuition doesn't build menus, programs do.  They tell intuition
how high/wide each entry is, and the tell it what {text|image} to display.
For text, they can tell it a font, or (most common) leave it NULL, and it
will use the (screen or window)'s font.  So they say the menu entry is 8
pixels high, and leave font NULL, which doesn't produce pretty results if the
default font isn't 8 high.

	You CAN make a program work with this: when reving Notepad for 1.3,
I put some support for this into the font menus (only), since I was making them
work for most any number of fonts (max is 126 now, I think.)  A font requester
would be better, and we hope to have a standard one for 1.4.

	The way to make the program work is to look at the size of the font,
then calculate the height AND width of the menu items.  (Width should be
equal for all items in a column).  IntuiTextLength is good for width, make sure
font is filled in in the IntuiText structure.  Also, when doing this, you should
think about avoiding running over any of the boundaries of the screen (tends to
kill the system with memory corruption).  If they won't fit in one column, 
use two, etc.  If the menu hangs over the right edge of the screen, move it
left.  If the submenu hits the bottom, have it extend upwards as well as down.
You get the idea.

	With relatively small, static menus this is of less importance,
especially if you don't go anywhere near the edges (right OR bottom).

	Usage of fonts other than 8x8 or 8x9 is important, and you should try
to be ready for it.

	Food for thought...

-- 
You've heard of CATS? Well, I'm a member of DOGS: Developers Of Great Software.
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup
Technical Details
Message-ID: <5515@cbmvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!rutgers!cbmvax!jesup
References: <2334@kalliope.rice.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!rutgers!cbmvax!jesup
From: jesup@cbmvax.UUCP (Randell Jesup)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Another "fix":  this one to Intuition
Message-ID: <5515@cbmvax.UUCP>
Date: 16 Dec 88 07:14:04 GMT
References: <2334@kalliope.rice.edu>
Reply-To: jesup@cbmvax.UUCP (Randell Jesup)
Organization: Commodore Technology, West Chester, PA
Lines: 46