Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module Fox
#
# 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
#
class FXCursor < FXId
# Width of cursor, in pixels (returns zero for stock cursors) [Integer]
attr_reader :width
# Height of cursor, in pixels (returns zero for stock cursors) [Integer]
attr_reader :height
# Hotspot x-coordinate (returns zero for stock cursors) [Integer]
attr_accessor :hotX
# Hotspot y-coordinate (returns zero for stock cursors) [Integer]
attr_accessor :hotY
#
# Make stock cursor, where _stockCursorId_ is one of the stock cursors
# (+CURSOR_ARROW+, +CURSOR_RARROW+, etc.)
#
def initialize(a, curid=CURSOR_ARROW) # :yields: theCursor
end
#
# Make cursor from _src_ and _msk_; cursor size should be 32x32 for portability!
#
def initialize(a, pix, width=32, height=32, hotX=-1, hotY=-1) # :yields: theCursor
end
#
# Make cursor from FXColor pixels; cursor size should be 32x32 for portability!
#
def initialize(a, pixels, width=32, height=32, hotX=-1, hotY=-1) # :yields: theCursor