# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # Shows a dialog asking the user for numeric input. # The dialogs title is set to caption, it contains a (possibly) multiline message above the single line prompt and the zone for entering the number. # The number entered must be in the range min to max (both of which should be positive) and value is the initial value of it. If the user enters an invalid value, it is forced to fall into the specified range. If the user cancels the dialog, the function returns -1. If it is important to distinguish between cancelling the dialog and actually entering -1 in it, i.e. if -1 is a valid input value, this convenience function can't be used and {Wx::NumberEntryDialog} should be used directly instead. # Dialog is centered on its parent unless an explicit position is given in pos. # Include file: #include # @see Wx::NumberEntryDialog # @param message [String] # @param prompt [String] # @param caption [String] # @param value [Integer] # @param min [Integer] # @param max [Integer] # @param parent [Wx::Window] # @param pos [Array(Integer, Integer), Wx::Point] # @return [Integer] def self.get_number_from_user(message, prompt, caption, value, min=0, max=100, parent=nil, pos=Wx::DEFAULT_POSITION) end # This class represents a dialog that requests a numeric input from the user. # Currently it is implemented as a generic wxWidgets dialog under all platforms. # You can use a convenience {get_number_from_user} function instead of using this dialog. # === # # Category: Common Dialogs # @see wxNumberEntryDialog Overview # # class NumberEntryDialog < Dialog # @overload initialize() # Default constructor. # Call {Wx::NumberEntryDialog#create} to really create the dialog later. # @return [NumberEntryDialog] # @overload initialize(parent, message, prompt, caption, value, min, max, pos=Wx::DEFAULT_POSITION) # Constructor. # Use {Wx::NumberEntryDialog#show_modal} to show the dialog. # See {Wx::NumberEntryDialog#create} method for parameter description. # @param parent [Wx::Window] # @param message [String] # @param prompt [String] # @param caption [String] # @param value [Integer] # @param min [Integer] # @param max [Integer] # @param pos [Array(Integer, Integer), Wx::Point] # @return [NumberEntryDialog] def initialize(*args) end # @param parent [Wx::Window] Parent window. # @param message [String] Message to show on the dialog. # @param prompt [String] The prompt of the dialog. # @param caption [String] The caption of the dialog. # @param value [Integer] The default value. # @param min [Integer] The minimal value. # @param max [Integer] The maximal value. # @param pos [Array(Integer, Integer), Wx::Point] Dialog position. # @return [true,false] def create(parent, message, prompt, caption, value, min, max, pos=Wx::DEFAULT_POSITION) end # Returns the value that the user has entered if the user has pressed OK, or the original value if the user has pressed Cancel. # @return [Integer] def get_value; end alias_method :value, :get_value end # NumberEntryDialog end