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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
module Fox
#
# Option Menu Button
#
# === Events
#
# The following messages are sent by FXOption to its target:
#
# +SEL_KEYPRESS+:: sent when a key goes down; the message data is an FXEvent instance.
# +SEL_KEYRELEASE+:: sent when a key goes up; the message data is an FXEvent instance.
# +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.
# +SEL_COMMAND+:: sent when this option is clicked; the message data is an FXEvent instance.
#
class FXOption < FXLabel
# Selection background color [FXColor]
attr_accessor :selBackColor
# Selection text color [FXColor]
attr_accessor :selTextColor
#
# Returns an initialized FXOption instance.
#
def initialize(p, text, ic=nil, target=nil, selector=0, opts=JUSTIFY_NORMAL|ICON_BEFORE_TEXT, x=0, y=0, width=0, height=0, padLeft=DEFAULT_PAD, padRight=DEFAULT_PAD, padTop=DEFAULT_PAD, padBottom=DEFAULT_PAD) # :yields: theOption
end
end
#
# Option Menu
#
# === Events
#
# The following messages are sent by FXOptionMenu to its target:
#
# +SEL_KEYPRESS+:: sent when a key goes down; the message data is an FXEvent instance.
# +SEL_KEYRELEASE+:: sent when a key goes up; the message data is an FXEvent instance.
# +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.
# +SEL_COMMAND+:: sent when this an option is selected; the message data is the option number.
#
class FXOptionMenu < FXLabel
# The current option, or +nil+ if none [FXOption]
attr_accessor :current
# The current option number, or -1 if none [Integer]
attr_accessor :currentNo
# The pane which will be popped up [FXPopup]
attr_accessor :menu
#
# Returns an initialized FXOptionMenu instance.
#
def initialize(p, pup=nil, opts=JUSTIFY_NORMAL|ICON_BEFORE_TEXT, x=0, y=0, width=0, height=0, padLeft=DEFAULT_PAD, padRight=DEFAULT_PAD, padTop=DEFAULT_PAD, padBottom=DEFAULT_PAD) # :yields: theOptionMenu
end
#
# Set the current option.
#
def setCurrent(win, notify=false); end
#
# Return a reference to the current option (an FXOption instance).
#
def getCurrent(); end
#
# Set the current option number.
#
def setCurrentNo(no, notify=false); end
#
# Get the current option number.
#
def getCurrentNo(); end
# Return +true+ if popped up
def popped?; end
end
end