Sha256: 9761d24ac0207346e8ec85a06c780948f521772ce2595c8d8b5c2030f0185b0f

Contents?: true

Size: 1.88 KB

Versions: 94

Compression:

Stored size: 1.88 KB

Contents

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

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
fxruby-1.6.37-x86-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.37.rc1 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.37.rc1-x64-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.37.rc1-x86-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.36 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.36-x64-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.36-x86-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.35-x86-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.35-x64-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.35 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.34-x86-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.34-x64-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.34 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.33-x86-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.33-x64-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.33 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.32-x86-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.32-x64-mingw32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.32 rdoc-sources/FXChoiceBox.rb
fxruby-1.6.32.pre2-x64-mingw32 rdoc-sources/FXChoiceBox.rb