Class: Fox::FXCursor

Inherits:
FXId show all
Defined in:
rdoc-sources/FXCursor.rb

Overview

Cursor class

Stock cursors

CURSOR_ARROW

Default left pointing arrow

CURSOR_RARROW

Right arrow

CURSOR_IBEAM

Text I-Beam

CURSOR_WATCH

Stopwatch or hourglass

CURSOR_CROSS

Crosshair

CURSOR_UPDOWN

Move up, down

CURSOR_LEFTRIGHT

Move left, right

CURSOR_MOVE

Move up, down, left, right

Cursor options

CURSOR_KEEP

Keep pixel data in client

CURSOR_OWNED

Pixel data is owned by cursor

Direct Known Subclasses

FXCURCursor, FXGIFCursor

Instance Attribute Summary collapse

Attributes inherited from FXId

#app, #userData, #xid

Instance Method Summary collapse

Methods inherited from FXId

#create, #created?, #destroy, #detach, #runOnUiThread

Methods inherited from FXObject

#bind, #handle, #load, #save, subclasses

Constructor Details

#initialize(a, pixels, width = 32, height = 32, hotX = -1,, hotY = -1)) ⇒ FXCursor

Make cursor from FXColor pixels; cursor size should be 32x32 for portability!



39
40
# File 'rdoc-sources/FXCursor.rb', line 39

def initialize(a, curid=CURSOR_ARROW) # :yields: theCursor
end

Instance Attribute Details

#heightObject (readonly)

Height of cursor, in pixels (returns zero for stock cursors) [Integer]



27
28
29
# File 'rdoc-sources/FXCursor.rb', line 27

def height
  @height
end

#hotXObject

Hotspot x-coordinate (returns zero for stock cursors) [Integer]



30
31
32
# File 'rdoc-sources/FXCursor.rb', line 30

def hotX
  @hotX
end

#hotYObject

Hotspot y-coordinate (returns zero for stock cursors) [Integer]



33
34
35
# File 'rdoc-sources/FXCursor.rb', line 33

def hotY
  @hotY
end

#widthObject (readonly)

Width of cursor, in pixels (returns zero for stock cursors) [Integer]



24
25
26
# File 'rdoc-sources/FXCursor.rb', line 24

def width
  @width
end

Instance Method Details

#color?Boolean

Return true if there is color in the cursor.

Returns:

  • (Boolean)


65
# File 'rdoc-sources/FXCursor.rb', line 65

def color?; end

#loadPixels(stream) ⇒ Object

Load pixel data only.



62
# File 'rdoc-sources/FXCursor.rb', line 62

def loadPixels(stream) ; end

#savePixels(stream) ⇒ Object

Save pixel data only.



57
# File 'rdoc-sources/FXCursor.rb', line 57

def savePixels(stream) ; end