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"
21 class WXDLLEXPORT wxGenericValidator
: public wxValidator
24 wxGenericValidator(bool* val
);
25 wxGenericValidator(int* val
);
26 wxGenericValidator(wxString
* val
);
27 wxGenericValidator(wxArrayInt
* val
);
28 wxGenericValidator(const wxGenericValidator
& copyFrom
);
30 ~wxGenericValidator();
32 // Make a clone of this validator (or return NULL) - currently necessary
33 // if you're passing a reference to a validator.
34 // Another possibility is to always pass a pointer to a new validator
35 // (so the calling code can use a copy constructor of the relevant class).
36 virtual wxObject
*Clone() const { return new wxGenericValidator(*this); }
37 bool Copy(const wxGenericValidator
& val
);
39 // Called when the value in the window must be validated.
40 // This function can pop up an error message.
41 virtual bool Validate(wxWindow
* WXUNUSED(parent
)) { return TRUE
; }
43 // Called to transfer data to the window
44 virtual bool TransferToWindow();
46 // Called to transfer data to the window
47 virtual bool TransferFromWindow();
55 wxArrayInt
* m_pArrayInt
;
58 #endif // _WX_VALGENH__