XML Cursor Editor with PNG output

In preparation for a move to Xojo and versions of my app for Carbon, Cocoa and Win32, I needed to manage a large set of cursors that are still OS 9 resource files.

I exported them from the existing project as XML Cursors, and extended Jeff Tullin’s RB XML Cursor Editor to export them as PNG’s suitable for Cocoa.

It seemed likely that there might be other late comers to Xojo with the same needs and Jeff kindly gave me permission to post the extended version for others to use. The project source is at:

http://repgrid.com/dropbox/CursorEditor.zip

Jeff’s cursor editor and save as xml are intact. In addition you can output a PNG version for Cocoa (the X,Y coordinates of hotspot are shown), and you can drag an XML cursor file to the editor window to open it.

I have also put my collection of XML cursors in the download as examples.

I use a large range of cursor to represent visually the available arrow types in my graphics editor and, since the users are able to develop their own arrow types ad lib, will now be able to generate customized cursors for them under Cocoa (and hopefully eventually for Windows when the cursor construction from a PNG is made available for WIN32 in Xojo).

In any event, hope this is useful to others as Jeff’s core code has been to me.

Best wishes to all for the New Year, b.

ps I am also using the code posted Will S on the Xojo Forum to generate Carbon/Win32 and Cocoa cursors transparently in a Module, e.g.:-

Protected Function Star()
static curs As MouseCursor
if curs<>nil then return curs
#if TargetCocoa then
curs=new MouseCursor(PStar,7,7) // PStar is a PNG image of the cursor
#else
curs=CStar // CStar is XML for the cursor
#endif
return curs
End function