Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!public!eeh From: eeh@public.BTR.COM (Eduardo E. Horvath eeh@btr.com) Newsgroups: comp.sys.amiga.programmer Subject: Re: ResEdit for the Amiga? YES!!, called PowerWindows! Message-ID: <3065@public.BTR.COM> Date: 14 Jun 91 03:35:55 GMT References: <30571@hydra.gatech.EDU> <829@tnc.UUCP> <1739@gufalet.let.rug.nl> <834@tnc.UUCP> Organization: BTR Public Access UNIX, MtnView CA. Contact: Customer Service cs@BTR.COM Lines: 48 In article <834@tnc.UUCP> m0154@tnc.UUCP (GUY GARNETT) writes: [lotsa stuff left out...] >A properly done resource editor would let you edit the resource file >(to change the colors or appearance of various objects, for example) >without affecting the program (as long as all the "resource headers" >were defined, and pointEd to appropriate structures, everything would >be fine).... Which brings us to another point: the current version of Intuition (1.3, the only one I have seen the Docs for) does not support static definition for a number of important layout features, specifically colors (you can specify which pen to use for rendering, but you can't muck around with the cmap) and filled shapes. Both of these rather important features of a user interface must be handled in code. If you want a filled red background in your window, you must set up a cmap entry with LoadRGB4() or something equivalent, then you must do a SetRaster() to that window with the appropriate pen. If that window is ever resized, or if you have Intuition objects within that window and have it set to SIMPLE_REFRESH, you must do another SetRaster() to refresh the background. These two features could, and should be handled by intuition. There is current support for statically defining poly-lines (borders) and bitmaps (images). Although a filled polygon could be defined through an image, a great deal of space is being used compared to the few bytes needed for a couple of coordinates. The colormap should also be handled in the Intuition NewScreen() call. Colors belong to a screen (O.K., Viewport, but Intuition doesn't deal with Viewports, and the Intuition equivalent of a Viewport is a screen) so the screen should be able to handle its own colormap. If these two things were added, I believe it would be enough to completely define the appearence of most Intuition-based applications. Such an application could store the entire user interface (the bits you see) as static data that could then be munged by a resource editor. Loading this UI would be zero overhead, after all it is linked in to the application. The resource file could be generated separately by a resource editor during testing, and eventually linked, permanently, to the application. Proper placement or tags would also allow post-linkage resource modification by a well designed resource editor. This would allow users to totally trash your application all by themselves! (8^) Next weeks topic: BOOPSI, How To Statically Define Your Application's UI, or Look Ma, I Lost My Gadgets!! -- ========================================================================= Eduardo Horvath eeh@btr.com ..!{decwrl,mips,fernwood}!btr!eeh "Trust me, I am cognizant of what I am doing." - Hammeroid