Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!kuhub.cc.ukans.edu!markv From: markv@kuhub.cc.ukans.edu Newsgroups: comp.sys.amiga.programmer Subject: Re: 2.0 Compatibility Message-ID: <1991May2.110934.30307@kuhub.cc.ukans.edu> Date: 2 May 91 11:09:34 CDT References: <4766@orbit.cts.com> <1991May1.213904.338@neon.Stanford.EDU> Organization: University of Kansas Academic Computing Services Lines: 86 > - the easiest way is probably to specify the ``default'' topaz.80 in every > possible field. Nice, but awfully tough to read in 640*480, much less future (ie: 2610 etc) 1000+ pixel modes. > - if you want to have a nice looking application, it is much better to deal > with the default fonts. There are two such fonts, a system font, and a screen > font. The system font is to be found in GfxBase->DefaultFont, the screen > font is to be found in the screen you want to open: screen->Font. The screen->Font can be just about anything under 2.0. As said, GfxBase can use give a proportional font. Note that even Commodore doesn't expect people to deal with completely irrational choices, like a 48 size prop font or such on a normal screen. Menu Layouts are easy with 2.0, Gadget spacing is a little tougher. I use a logical grid system and layout based on that, and with GadTools, I know my spaceing will be reasonable, buttons will contain their text. Its up to the user to pic a font that works okay with their screen size. In most cases, proportional really isn't a problem, when it is, then specify a fixed font. > (side-question to 2.0 developpers: is there a way to get notified when > preferences wants to change its fonts, so that you can do as the workbench, > close all your windows, wait for font change, and reopen them ?) Yes, open a file notification lock on the font prefs file in ENV:, then the file system will send you a message when it changes. > With that in mind, you can get nice looking text at the right size. If all else fails, explicity specify a standard font you know will work. Dont leave TextAttr fields NULL unless you CAN handle varying fonts. > Other compatibility problems: window borders and window title. The simplest > way I've found around this one is the following (since GZZ windows are > inefficient): > - open a window as though it had no borders. > - adjust all your gadget and display stuff to the window border. > - resize the window, simply: > Size(window, window->BorderRight + window->BorderLeft, window->BorderTop + > window->BorderBottom); This is a bit more of a problem. Most programmers (myself included) have been guilty of ignoring the BorderXXX fields, but they do matter and are correct in 2.0. One big gripe I have is that GadTools dont support GREL positioning. I can deal with the "window as a requester" issue, but the lack of relative support kills GadTools for things like dynamic sizable windows in editors, etc. > Another compatibility issue: colors. Use variables for the ``constant'' BLACK > and WHITE pen numbers (instead of hard-coding 1 and 2). If your IntuitionBase > version is greater or equal to 36 (not 37... commercial 3000 have 2.02, > which is 36.something), swap them. Even better is to use 1 and 2 on 1.3, and look at your Screen's DrawInfo with GetScreenDrawInfo() 2.0. That way you'll be fully compatible with any public screen (which you could end up on with the SHANGHAI flag). > Of course, this kind of thing is only a stopgap measure, 2.0 availability > for everybody would be much better. But with some extra-effort, much stuff, > can run under 1.3 and 2.0. Personally, the stuff I'm finishing will be 1.3 apps that have some 2.0 awareness to deal with color issues, fonts, etc. New stuff I'm writing will be 2.0 specific, since it isn't worth writing a GadTools compatible replacement etc just to maintain backwards compatibility for the transition period. Of course until Commodore actually releases 2.0 to the rest of the world, there is a small market indeed for the 2.0 apps. > -- > Marc (espie@flamingo.stanford.edu) -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark Gooderum Only... \ Good Cheer !!! Academic Computing Services /// \___________________________ University of Kansas /// /| __ _ Bix: mgooderum \\\ /// /__| |\/| | | _ /_\ makes it Bitnet: MARKV@UKANVAX \/\/ / | | | | |__| / \ possible... Internet: markv@kuhub.cc.ukans.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~