X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/adaaa68635b4c8a4d8c5284add40366ea3eefb07..db414879d45f5da2be534a0f523b0506f2ab1183:/interface/wx/validate.h?ds=inline diff --git a/interface/wx/validate.h b/interface/wx/validate.h index 5ef578fb58..fcaa6a76cb 100644 --- a/interface/wx/validate.h +++ b/interface/wx/validate.h @@ -3,7 +3,7 @@ // Purpose: interface of wxValidator // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -38,7 +38,8 @@ @stdobjects ::wxDefaultValidator - @see @ref overview_validator, wxTextValidator, wxGenericValidator + @see @ref overview_validator, wxTextValidator, wxGenericValidator, + wxIntegerValidator, wxFloatingPointValidator */ class wxValidator : public wxEvtHandler { @@ -74,11 +75,28 @@ public: /** This functions switches on or turns off the error sound produced by the validators if an invalid key is pressed. + + @since 2.9.1 + + @param suppress + If @true, error sound is not played when a validator detects an + error. If @false, error sound is enabled. */ - static void SetBellOnError(bool doIt = true); + static void SuppressBellOnError(bool suppress = true); /** Associates a window with the validator. + + This function is automatically called by wxWidgets when creating a wxWindow-derived + class instance which takes a wxValidator reference. + + E.g. + @code + new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, + wxTextValidator(wxFILTER_ALPHA, &g_data.m_string)); + @endcode + will automatically link the wxTextValidator instance with the wxTextCtrl + instance. */ void SetWindow(wxWindow* window); @@ -102,6 +120,9 @@ public: This overridable function is called when the value in the associated window must be validated. + @param parent + The parent of the window associated with the validator. + @return @false if the value in the window is not valid; you may pop up an error dialog. */ @@ -111,5 +132,5 @@ public: /** An empty, "null" wxValidator instance. */ -wxValidator wxDefaultValidator; +const wxValidator wxDefaultValidator;