# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # An empty, "null" {Wx::Validator} instance. # DEFAULT_VALIDATOR = nil # {Wx::Validator} is the base class for a family of validator classes that mediate between a class of control, and application data. # A validator has three major roles: # # - To transfer data from a C++ variable or own storage to and from a control. # - To validate data in a control, and show an appropriate error message. # - To filter events (such as keystrokes), thereby changing the behaviour of the associated control. # # Validators can be plugged into controls dynamically. # To specify a default, "null" validator, use {Wx::DEFAULT_VALIDATOR}. # For more information, please see wxValidator Overview. # === # # Category: {Wx::Validators} # Predefined objects/pointers: {Wx::DEFAULT_VALIDATOR} # @see wxValidator Overview # @see Wx::TextValidator # @see Wx::GenericValidator # @see Wx::IntegerValidator # @see Wx::FloatingPointValidator # # class Validator < EvtHandler # Constructor. # @return [Wx::Validator] def initialize; end # Returns the window associated with the validator. # @return [Wx::Window] def get_window; end alias_method :window, :get_window # Associates a window with the validator. # This function is automatically called by wxWidgets when creating a {Wx::Window}-derived class instance which takes a {Wx::Validator} reference. Since wxWidgets 3.1.1, it can be overridden in custom validators in order to perform any one-time initialization or checks of the window when the validator is associated with it. # E.g. # ```ruby # Wx::TextCtrl.new(self, Wx::ID_ANY, '', Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, 0, # Wx::TextValidator.new(Wx::FILTER_ALPHA)) # ``` # will automatically link the {Wx::TextValidator} instance with the {Wx::TextCtrl} instance and call {Wx::Validator#set_window} method on the {Wx::TextValidator} object. # @param window [Wx::Window] # @return [void] def set_window(window) end alias_method :window=, :set_window # This overridable function is called when the value in the associated window must be validated. # false if the value in the window is not valid; you may pop up an error dialog. # @param parent [Wx::Window] The parent of the window associated with the validator. # @return [Boolean] def validate(parent) end # This functions switches on or turns off the error sound produced by the validators if an invalid key is pressed. # @param suppress [Boolean] If true, error sound is not played when a validator detects an error. If false, error sound is enabled. # @return [void] def self.suppress_bell_on_error(suppress=true) end # Returns if the error sound is currently disabled. # @return [Boolean] def self.is_silent; end end # Validator end