Class: Fox::FXChoiceBox
- Inherits:
-
FXDialogBox
- Object
- FXObject
- FXId
- FXDrawable
- FXWindow
- FXComposite
- FXShell
- FXTopWindow
- FXDialogBox
- Fox::FXChoiceBox
- Defined in:
- rdoc-sources/FXChoiceBox.rb
Overview
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,
Instance Attribute Summary
Attributes inherited from FXTopWindow
#decorations, #hSpacing, #icon, #miniIcon, #packingHints, #padBottom, #padLeft, #padRight, #padTop, #title, #vSpacing
Attributes inherited from FXWindow
#accelTable, #backColor, #defaultCursor, #dragCursor, #first, #focus, #key, #last, #layoutHints, #next, #numChildren, #owner, #parent, #prev, #root, #selector, #shell, #target, #x, #y
Attributes inherited from FXDrawable
Attributes inherited from FXId
Class Method Summary collapse
-
.ask(owner, opts, caption, text, icon, choices) ⇒ Object
Show a modal choice dialog.
Instance Method Summary collapse
-
#initialize(owner, caption, text, icon, choices, opts = 0, x = 0, y = 0, width = 0, height = 0) ⇒ FXChoiceBox
constructor
Construct choice box with given caption, icon, message text, and with choices from array of strings.
Methods inherited from FXDialogBox
Methods inherited from FXTopWindow
#close, #getWMBorders, #maximize, #maximized?, #minimize, #minimized?, #place, #restore, #show
Methods inherited from FXComposite
#maxChildHeight, #maxChildWidth
Methods inherited from FXWindow
#acceptDrop, #acquireClipboard, #acquireSelection, #active?, #addHotKey, after?, #after?, before?, #before?, #beginDrag, #canFocus?, #changeFocus, #childAtIndex, #childOf?, #children, #clearDragRectangle, #clearShape, colorType, colorTypeName, commonAncestor, #composeContext, #composite?, #contains?, #containsChild?, #create, #createComposeContext, #cursorPosition, #default?, #defaultHeight, #defaultWidth, deleteType, deleteTypeName, #destroy, #destroyComposeContext, #detach, #didAccept, #disable, #doesSaveUnder?, #dragging?, #dropDisable, #dropEnable, #dropEnabled?, #dropFinished, #dropTarget?, #each_child, #each_child_recursive, #enable, #enabled?, #endDrag, #forceRefresh, #getChildAt, #getDNDData, #getHeightForWidth, #getWidthForHeight, #grab, #grabKeyboard, #grabbed?, #grabbedKeyboard?, #handleDrag, #hasClipboard?, #hasFocus?, #hasSelection?, #height, #height=, #hide, imageType, #inFocusChain?, #indexOfChild, #initial?, #inquireDNDAction, #inquireDNDTypes, #killFocus, #layout, #linkAfter, #linkBefore, #lower, #move, octetType, octetTypeName, #offeredDNDType?, #position, #raiseWindow, #recalc, #releaseClipboard, #releaseSelection, #remHotKey, #removeChild, #repaint, #reparent, #resize, #scroll, #setCursorPosition, #setDNDData, #setDefault, #setDragRectangle, #setFocus, #setInitial, #setShape, #shell?, #show, #shown?, stringType, textType, textTypeName, #tr, #translateCoordinatesFrom, #translateCoordinatesTo, #underCursor?, #ungrab, #ungrabKeyboard, #update, urilistType, urilistTypeName, utf16Type, utf16TypeName, utf8Type, utf8TypeName, #visible=, #width, #width=
Methods included from Responder2
Methods inherited from FXDrawable
Methods inherited from FXId
#create, #created?, #destroy, #detach, #runOnUiThread
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(owner, caption, text, icon, choices, opts = 0, x = 0, y = 0, width = 0, height = 0) ⇒ FXChoiceBox
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 Fox::FXIcon
choices
-
Array of strings containing choices [Array]
opts
-
Dialog box options [Integer]
x
-
x-coordinate
y
-
y-coordinate
width
-
width
height
-
height
27 28 |
# File 'rdoc-sources/FXChoiceBox.rb', line 27 def initialize(owner, , text, icon, choices, opts=0, x=0, y=0, width=0, height=0) # :yields: theChoiceBox end |
Class Method Details
.ask(owner, opts, caption, text, icon, choices) ⇒ Object
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 Fox::FXIcon
choices
-
Array of strings containing choices [Array]
45 |
# File 'rdoc-sources/FXChoiceBox.rb', line 45 def FXChoiceBox.ask(owner, opts, , text, icon, choices); end |