[fxruby-users] FXCursor part deux

Gonzalo Garramuno ggarra at advancedsl.com.ar
Sat Aug 13 23:57:06 EDT 2005

Okay, I have FXCursor working only partially in my application.  Now... the issue is trying to use it with custom icons.
Currently, I am relying on FXGIFCursor.

The first question is regarding the second parameter of the constructor: "pix".  What is it supposed to be?
I passed an empty string and that seemed to work fine (and then later used loadPixels to actually load the gif data).

Something like:

#    pix = []
#    32.times { 32.times { pix << 255 << 255 << 255 << 255 } }
#    pix = pix.pack('c*')

      pix = ''
      @@cursor = FXGIFCursor.new(@window.getApp, pix)
      FXFileStream.open('icons/room.gif', FXStreamLoad) { |stream|

Now, albeit the cursor displays fine, the issue that I face is that I cannot set the hotspot for it.  The FXCursor class does not have any hotspot setters and, if I use any possitive number in the constructor for the hx and hy parameters, it segfaults like there is no tomorrow once I create the cursor.
Is the API broken or something is wrong on my side?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20050814/a0f94192/attachment.htm

More information about the fxruby-users mailing list