home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Gem List (fwd) from goemon
- Date: Sun, 10 Jul 1994 13:31:52 +1000
- From: Warwick Allison <warwick@cs.uq.oz.au>
- Precedence: bulk
-
- Ken Hollis:
- >Trust me, it's more difficult than what I posted, and it takes more time to
- >use. Why not just TRY my code out and see for yourself? Speed difference
- >is almost NIL.
-
- For one application, this is correct. But we're talking about standards
- here, and that means we have to think about every program doing this.
- Below, you suggets that only the top application will be allowed hot
- objects. With that restriction, I would agree that the 1x1-pixel track
- might be appropriate. And if the only hot object is editable objects,
- then this restriction too might be appropriate. But hot objects, and
- rectangle tracking in general, is a useful visual effect for all sorts of
- things (eg. changing mouse cursor to cross-hairs inside drawing object;
- highlighing exit objects as the mouse moves over them [al-la menu items]).
-
- >> Ken, I agree, that way is very easy to code. The problem is whether it
- >> is of sufficiently low cost to impose it as a standard for applications
- >> to follow.
- >
- >I don't quite understand what you mean by saying "low cost". It's just about
- >four lines of code that is easy to do. It takes almost no time, because,
- >it checks the object under the mouse.
-
- The cost I mean is the repeated calling of the application. Don't get me
- wrong, I see a very strong argument for your method (and I'm suprised you
- haven't mentioned it) - that objc_find is an extremely efficient algorithm
- compared to the rectangle clipping algorithm required for the alternative
- solution. You solution does not bust wait (as others suggest), but it does
- generate a LOT of events (especially on faster machines where the mouse is
- tracked more closely). The coding cost of your solution is extremely low,
- while the coding cost of the larger-rectangle solution is quite high.
-
- >The ONLY way you can find out which object is under the mouse is by using
- >objc_find. There is absolutely no other way to get rectangles under the
- >mouse without having to SAVE the physical dimensions of the rectangles,
- >storing those in an array, and checking the array every time the mouse
- >moves.
-
- Not really - you just generate the larger-rectangle from the object tree.
-
- >> But if all GEM libraries are the same, why would you change from one to
- >> another? GEM++ for example doesn't even use the Extended Object Types
- >> byte. It uses full parameterized object instantiations presribed in
- >> the code, allowing any number of different types of object from sliders
- >> to scrolling self-drawing objects.
- >
- >That's the problem. Not all GEM libraries are the same. Why not use
- >Extended Object Types?
-
- Because GEM++ can support thousands of different object types. It focusses
- on behavioural objects rather than visual objects (eg. there are no different
- types of visual radio buttons - just the std GEM ones), so there is no gain
- in the WYSIWYG of RSC editing.
-
- --
- Warwick
-