rap@dana.UUCP (Rob Peck) (11/12/87)
Is there a known (and officially supported, I guess) way of producing an icon, from within a program, and having Workbench know that it now exists and should display it? I wanted to avoid forcing the user to close a workbench window, then reopen it just so that Workbench would see and render the icon. What I wanted to do, if it is possible, is to create my own custom windows on the workbench, (that is, just to attach something special to a standard Workbench drawer-window) wherein the images for all of the icons are managed by that customized window (and all in the same file for faster rendering .... multiple files using the same image only stored once and so on). A task could be created that would manage each of these customized windows, and be asleep waiting for a user of Workbench to drag a workbench icon into this Window. Workbench would render the icon itself the first time when the object and its icon was moved into the new directory. When the move was completed, the object.info file would effectively disappear, and be managed by this background task... the next time a refresh-window event would appear, this task could do the redraw of the icons. And, if the user wanted to move the icon, one could duplicate the functions of Workbench to pick up the icons by converting them to animation objects and then move them as Workbench would do. BUT ... how does a task tell Workbench (CAN it be done?) that "here is an object (or list of objects)" that I have just put down HERE. YOU do something with them! OR, if the .info file has indeed disappeared, does Workbench delete it from its internal knowledge of the Wbench universe and not render it any more (If my task moves the icon under user control, will Wbench still render the old copy in the old place, even if the .info file is gone?) I thought about sending through a set of phony mouse events, but even that would only be valid if somehow I could recreate the "real" icon files on the fly and hand them to Workbench - I guess there must be some Workbench lists of "these are the icons now (potentially) visible on the Workbench and in its windows, so any refresh events will redraw whatever we actually know about them". I would have to somehow change Workbench's idea of what its world looks like. I did not look too carefully at the Hackbench code, but since it is a replacement for Workbench rather than a co-resident icon handler, I don't think it covered this case. So if I want to hack at making icons appear more quickly, in the absence of a fast-file-system, does anyone know of a proper manner of passing such information to Workbench? (If the mouse cursor lands in a workbench Drawer window, by creating the .info files, MAYBE workbench would notice that the directory had been updated and add/subtract from the icons it owns and displays if the window receives a refresh event. BUT what if I drop the custom icons into the backdrop window of Workbench... where would I have to copy the .info files to in order to have Workbench recognize them as to-be-drawn? Aaarrrgghh!) Rob Peck ...ihnp4!hplabs!dana!rap