X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..5b88a837ba75928cd3835a6b97ae2bf5ad983a6e:/interface/wx/validate.h diff --git a/interface/wx/validate.h b/interface/wx/validate.h index 76f4abd835..bb2077bcaa 100644 --- a/interface/wx/validate.h +++ b/interface/wx/validate.h @@ -8,7 +8,6 @@ /** @class wxValidator - @wxheader{validate.h} wxValidator is the base class for a family of validator classes that mediate between a class of control, and application data. @@ -52,7 +51,7 @@ public: /** Destructor. */ - ~wxValidator(); + virtual ~wxValidator(); /** All validator classes must implement the Clone() function, which @@ -76,10 +75,21 @@ public: This functions switches on or turns off the error sound produced by the validators if an invalid key is pressed. */ - void SetBellOnError(bool doIt = true); + static void SetBellOnError(bool doIt = 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); @@ -103,6 +113,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. */