1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGenericValidator class
6 // Created: Jan 22 1999
8 // Copyright: (c) 1999 Kevin Smith
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "valgen.h"
19 #include "wx/validate.h"
23 class WXDLLEXPORT wxGenericValidator
: public wxValidator
26 wxGenericValidator(bool* val
);
27 wxGenericValidator(int* val
);
28 wxGenericValidator(wxString
* val
);
29 wxGenericValidator(wxArrayInt
* val
);
30 wxGenericValidator(const wxGenericValidator
& copyFrom
);
32 ~wxGenericValidator();
34 // Make a clone of this validator (or return NULL) - currently necessary
35 // if you're passing a reference to a validator.
36 // Another possibility is to always pass a pointer to a new validator
37 // (so the calling code can use a copy constructor of the relevant class).
38 virtual wxObject
*Clone() const { return new wxGenericValidator(*this); }
39 bool Copy(const wxGenericValidator
& val
);
41 // Called when the value in the window must be validated.
42 // This function can pop up an error message.
43 virtual bool Validate(wxWindow
* WXUNUSED(parent
)) { return TRUE
; }
45 // Called to transfer data to the window
46 virtual bool TransferToWindow();
48 // Called to transfer data to the window
49 virtual bool TransferFromWindow();
57 wxArrayInt
* m_pArrayInt
;