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
module Fox
#
# A Color Ring widget provides an intuitive way to specify a color.
# The outer ring of the widget is rotated to control the hue of the color
# being specified, while the inner triangle varies the color saturation
# and the brightness of the color. The color saturation axis of the
# triangle goes from a fully saturated "pure" color to "pastel" color;
# the brightness goes from black to a bright color.
#
# === Events
#
# The following messages are sent by FXColorRing to its target:
#
# +SEL_CHANGED+:: sent continuously while the user is dragging the spot around; the message data is a three-element array containing the hue, saturation and value values.
# +SEL_COMMAND+:: sent when the user releases the mouse button and "drops" the spot at its new location; the message data is a three-element array containing the hue, saturation and value values.
# +SEL_LEFTBUTTONPRESS+:: sent when the left mouse button goes down; the message data is an FXEvent instance.
# +SEL_LEFTBUTTONRELEASE+:: sent when the left mouse button goes up; the message data is an FXEvent instance.
#
class FXColorRing < FXFrame
# Hue [Float]
attr_accessor :hue
# Saturation [Float]
attr_accessor :sat
# Value [Float]
attr_accessor :val
# Width of hue ring in pixels [Integer]
attr_accessor :ringWidth
# Status line help text [String]
attr_accessor :helpText
# Tool tip message [String]
attr_accessor :tipText
#
# Return an initialized FXColorRing instance.
#
def initialize(p, target=nil, selector=0, opts=FRAME_NORMAL, x=0, y=0, width=0, height=0, padLeft=DEFAULT_PAD, padRight=DEFAULT_PAD, padTop=DEFAULT_PAD, padBottom=DEFAULT_PAD) # :yields: theColorRing
end
# Set the hue, saturation and value (all floating point values)
def setHueSatVal(h, s, v); end
end
end