Article # 311, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
How to change mouse pointer over vis objects.
Q. I have a Vis object and I want the mouse to work as if it were a GenInteraction and show the crossed circle when the mouse passes outside the bounds of the vis object. It seems that I have to intercept the mouse events, check if the pointer is outside the vis object and then set the pointer image appropriately. Question: How can we access the optr to the standard mouse pointer bitmaps? Or is there an easier way to work with Vis objects similar to setting the Gen object modal? A. VisClass does not support the GenClass modal behavior, you will have to implement it yourself. Not only does the mouse pointer image have to change, but the Vis object has to grab the mouse, so that no one else gets any ptr messages while the Vis object is in the "modal" state. I don't think you can access the standard mouse pointer bitmaps. MSG_META_PTR is intercepted, and if the mouse is over our vis object, these MouseReturnFlags are returned MRF_SET_POINTER_IMAGE | MRF_PROCESSED along with the optr of the bitmap to use as the pointer image. When the mouse moves out of the bounds of the object, MRF_CLEAR_POINTER_IMAGE is returned.