Class: Fox::FXCursor
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
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Height of cursor, in pixels (returns zero for stock cursors) [Integer].
-
#hotX ⇒ Object
Hotspot x-coordinate (returns zero for stock cursors) [Integer].
-
#hotY ⇒ Object
Hotspot y-coordinate (returns zero for stock cursors) [Integer].
-
#width ⇒ Object
readonly
Width of cursor, in pixels (returns zero for stock cursors) [Integer].
Attributes inherited from FXId
Instance Method Summary collapse
-
#color? ⇒ Boolean
Return
true
if there is color in the cursor. -
#initialize(a, pixels, width = 32, height = 32, hotX = -1,, hotY = -1)) ⇒ FXCursor
constructor
Make cursor from FXColor pixels; cursor size should be 32x32 for portability!.
-
#loadPixels(stream) ⇒ Object
Load pixel data only.
-
#savePixels(stream) ⇒ Object
Save pixel data only.
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
#height ⇒ Object (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 |
#hotX ⇒ Object
Hotspot x-coordinate (returns zero for stock cursors) [Integer]
30 31 32 |
# File 'rdoc-sources/FXCursor.rb', line 30 def hotX @hotX end |
#hotY ⇒ Object
Hotspot y-coordinate (returns zero for stock cursors) [Integer]
33 34 35 |
# File 'rdoc-sources/FXCursor.rb', line 33 def hotY @hotY end |
#width ⇒ Object (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.
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 |