Hi all,
I've been working on implementing custom Cursors for FloatCanvas, and have come up with a few questions:
1) It looks like the cursor implementation is platform dependent:
Macs want 16X16 cursors
Windows wants 32X32 cursors
GTK takes whatever you give it (yea, GTK!)
I know they get auto-re-scaled, but that just doesn't look very good.
Also, the docs say:
"In MSW the cursor is resized to 32x32 if it was larger."
What if it's smaller? I don't have a Windows box to easily test on at the moment.
So far, I have not one line of platform dependent code in FloatCanvas. Am I going to have to write some now? If so, how can you tell which wxPlatform you are on? sys.platform is not really safe, as you can have both wxMac or wxGTK on 'darwin' and GTK runs on a lot more than 'linux', and in theory, you could have GTK on Windows (at least some day). How would I determine which wxPlatform I'm running?
2) How do I set the hotspot for a Cursor? It looks like I can do it if I load the cursor form a file, but not if I load it from a wx.Image. I start with a PNG, and use img2py to put it in a python file, then get the image from there. Is it possible to set the hotspot this way? It looks to me like there should be SetHotspot method to wxCursor, or a hotspot parameters to wxCursorFrom Image
3) There is an apparent bug in wxMac, so that when you set the cursor, it doesn' re-set itself when it leaves the Window. It doews if you pass over the right part of the window border, but not if you move off the side. This strikes me as something the syustem should be doing, but in any case, it's a problem. It's been recently reported on wx-users, but I haven't seen anyone comment on it yet.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception