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
#
# The Choice Box provides a dialog panel to select one item out of a list
# of choices. The choices are provided as a list of text strings.
# When the dialog closes, the index of the selected choice is returned,
# while a -1 is returned if the dialog was canceled,
#
class FXChoiceBox < FXDialogBox
#
# Construct choice box with given caption, icon, message text, and with choices from array of strings.
# If _owner_ is another FXWindow, the dialog box is created as a child of that window. If _owner_
# is an FXApp instance, it's created as a free-floating dialog box.
#
# ==== Parameters:
#
# +owner+:: Owner for this dialog box [FXWindow or FXApp]
# +caption+:: Caption for this dialog box [String]
# +text+:: Message text for this dialog box [String]
# +icon+:: Icon for this dialog box [FXIcon]
# +choices+:: Array of strings containing choices [Array]
# +opts+:: Dialog box options [Integer]
# +x+:: x-coordinate
# +y+:: y-coordinate
# +width+:: width
# +height+:: height
#
def initialize(owner, caption, text, icon, choices, opts=0, x=0, y=0, width=0, height=0) # :yields: theChoiceBox
end
#
# Show a modal choice dialog.
# Prompt the user using a dialog with given caption, icon,
# message text, and choices from array of strings.
# Returns -1 if the dialog box is cancelled, otherwise returns the index of the selected choice
#
# ==== Parameters:
#
# +owner+:: Owner for this dialog box [FXWindow or FXApp]
# +opts+:: Dialog box options [Integer]
# +caption+:: Caption for this dialog box [String]
# +text+:: Message text for this dialog box [String]
# +icon+:: Icon for this dialog box [FXIcon]
# +choices+:: Array of strings containing choices [Array]
#
def FXChoiceBox.ask(owner, opts, caption, text, icon, choices); end
end
end