/**
Destructor.
*/
- ~wxValidator();
+ virtual ~wxValidator();
/**
All validator classes must implement the Clone() function, which
/**
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.
*/
- 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);
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.
*/