# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # Styles used by {Wx::TextValidator}. # # Notice that {Wx::FILTER_EXCLUDE}[_CHAR]_LIST pair can be used to document the purpose of the validator only and are not enforced in the implementation of the {Wx::TextValidator}. Therefore, calling the corresponding member functions: {Wx::TextValidator}::{SetExcludes,SetCharExcludes}(), is enough to create the desired validator. # class TextValidatorStyle < Wx::Enum # No filtering takes place. # FILTER_NONE = Wx::TextValidatorStyle.new(0) # Empty strings are filtered out. # FILTER_EMPTY = Wx::TextValidatorStyle.new(1) # Non-ASCII characters are filtered out. See Wx::String::IsAscii. # FILTER_ASCII = Wx::TextValidatorStyle.new(2) # Non-alpha characters are filtered out. # FILTER_ALPHA = Wx::TextValidatorStyle.new(4) # Non-alphanumeric characters are filtered out. # FILTER_ALPHANUMERIC = Wx::TextValidatorStyle.new(8) # Non-digit characters are filtered out. # FILTER_DIGITS = Wx::TextValidatorStyle.new(16) # Non-numeric characters are filtered out. # FILTER_NUMERIC = Wx::TextValidatorStyle.new(32) # Use an include list. # FILTER_INCLUDE_LIST = Wx::TextValidatorStyle.new(64) # Use an include char list. # FILTER_INCLUDE_CHAR_LIST = Wx::TextValidatorStyle.new(128) # Use an exclude list. # FILTER_EXCLUDE_LIST = Wx::TextValidatorStyle.new(256) # Use an exclude char list. # FILTER_EXCLUDE_CHAR_LIST = Wx::TextValidatorStyle.new(512) # Non-hexadecimal characters are filtered out. # FILTER_XDIGITS = Wx::TextValidatorStyle.new(1024) # A convenience flag for use with the other flags. # FILTER_SPACE = Wx::TextValidatorStyle.new(2048) end # TextValidatorStyle # {Wx::TextValidator} validates text controls, providing a variety of filtering behaviours. # For more information, please see wxValidator Overview. # === # # Category: {Wx::Validators} # @see wxValidator Overview # @see Wx::Validator # @see Wx::GenericValidator # @see Wx::IntegerValidator # @see Wx::FloatingPointValidator # # class TextValidator < Validator # Clones the text validator using the copy constructor. # @return [Wx::TextValidator] def clone; end # Returns a copy of the exclude char list (the list of invalid characters). # @return [String] def get_char_excludes; end alias_method :char_excludes, :get_char_excludes # Returns a copy of the include char list (the list of additional valid characters). # @return [String] def get_char_includes; end alias_method :char_includes, :get_char_includes # Returns a const reference to the exclude list (the list of invalid values). # @return [Wx::ArrayString] def get_excludes; end alias_method :excludes, :get_excludes # Returns a const reference to the include list (the list of valid values). # @return [Wx::ArrayString] def get_includes; end alias_method :includes, :get_includes # Returns the validator style. # # @see Wx::TextValidator#has_flag # @return [Integer] def get_style; end alias_method :style, :get_style # Returns true if the given style bit is set in the current style. # @param style [Wx::TextValidatorStyle] # @return [Boolean] def has_flag(style) end alias_method :has_flag?, :has_flag # Sets the exclude list (invalid values for the user input). # Beware that exclusion takes priority over inclusion. # @param stringList [Array<String>] # @return [void] def set_excludes(stringList) end alias_method :excludes=, :set_excludes # Sets the exclude char list (invalid characters for the user input). # Beware that exclusion takes priority over inclusion. # # This function may cancel the effect of {Wx::TextValidatorStyle::FILTER_SPACE} if the passed in string chars contains the <b>space</b> character. # @param chars [String] # @return [void] def set_char_excludes(chars) end alias_method :char_excludes=, :set_char_excludes # Sets the include list (valid values for the user input). # # @see Wx::TextValidator#is_included # @param stringList [Array<String>] # @return [void] def set_includes(stringList) end alias_method :includes=, :set_includes # Sets the include char list (additional valid values for the user input). # Any explicitly excluded characters will still be excluded even if they're part of chars. # @param chars [String] # @return [void] def set_char_includes(chars) end alias_method :char_includes=, :set_char_includes # Adds exclude to the list of excluded values. # Beware that exclusion takes priority over inclusion. # @param exclude [String] # @return [void] def add_exclude(exclude) end # Adds include to the list of included values. # Any explicitly excluded characters will still be excluded. # @param include [String] # @return [void] def add_include(include) end # Adds chars to the list of excluded characters. # Beware that exclusion takes priority over inclusion. # @param chars [String] # @return [void] def add_char_excludes(chars) end # Adds chars to the list of included characters. # Any explicitly excluded characters will still be excluded even if they're part of chars. # @param chars [String] # @return [void] def add_char_includes(chars) end # Sets the validator style which must be a combination of one or more of the {Wx::TextValidatorStyle} values. # Note that not all possible combinations make sense! Also, some combinations have shorter and more idiomatic alternative, e.g. {Wx::TextValidatorStyle::FILTER_ALPHANUMERIC} can be used instead of <code>wxFILTER_ALPHA|wxFILTER_DIGITS</code>. # @param style [Integer] # @return [void] def set_style(style) end alias_method :style=, :set_style # Validates the window contents against the include or exclude lists, depending on the validator style. # @param parent [Wx::Window] # @return [Boolean] def validate(parent) end # Returns the error message if the contents of val are invalid or the empty string if val is valid. # @param val [String] # @return [String] def is_valid(val) end alias_method :valid?, :is_valid end # TextValidator end