# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # CHOICE_WIDTH = 150 # CHOICE_HEIGHT = 200 # CHOICEDLG_STYLE = 536877141 # This class represents a dialog that shows a list of strings, and allows the user to select one. # Double-clicking on a list item is equivalent to single-clicking and then pressing OK. # === Styles # # This class supports the following styles: # # - {Wx::OK}: Show an OK button. # - {Wx::CANCEL}: Show a Cancel button. # - {Wx::GeometryCentre::CENTRE}: Centre the message. # # === # # Category: Common Dialogs # @see wxSingleChoiceDialog Overview # @see Wx::MultiChoiceDialog # # class SingleChoiceDialog < Dialog # Constructor, taking an array of {Wx::String} choices and optional client data. # Use {Wx::SingleChoiceDialog#show_modal} to show the dialog. # # <b>{Wx::Perl} Note:</b> Use an array reference for the choices parameter. # @param parent [Wx::Window] Parent window. # @param message [String] Message to show on the dialog. # @param caption [String] The dialog caption. # @param choices [Array<String>] An array of strings, or a string list, containing the choices. # @param clientData [void] An array of client data to be associated with the items. See {Wx::SingleChoiceDialog#get_selection_data}. # @param style [Integer] A dialog style (bitlist) containing flags chosen from standard dialog styles and the ones listed in the class documentation. The default value is equivalent to {Wx::DEFAULT_DIALOG_STYLE} | {Wx::RESIZE_BORDER} | {Wx::OK} | {Wx::CANCEL} | {Wx::GeometryCentre::CENTRE}. # @param pos [Array(Integer, Integer), Wx::Point] Dialog position. # @return [SingleChoiceDialog] def initialize(parent, message, caption, choices, clientData=nil, style=Wx::CHOICEDLG_STYLE, pos=Wx::DEFAULT_POSITION) end # Returns the index of selected item. # @return [Integer] def get_selection; end alias_method :selection, :get_selection # Returns the selected string. # @return [String] def get_string_selection; end alias_method :string_selection, :get_string_selection # Sets the index of the initially selected item. # @param selection [Integer] # @return [void] def set_selection(selection) end alias_method :selection=, :set_selection # Shows the dialog, returning either {Wx::StandardID::ID_OK} or {Wx::StandardID::ID_CANCEL}. # @return [Integer] def show_modal; end end # SingleChoiceDialog end