00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef _WX_IMAGEVALIDATORH__
00013 #define _WX_IMAGEVALIDATORH__
00014
00015 #include "wx/valgen.h"
00016 #include "wx/image.h"
00017 #include "imageblock.h"
00018
00019 #if wxUSE_VALIDATORS
00020
00021 class WXDLLEXPORT wxImageValidator: public wxValidator
00022 {
00023 DECLARE_CLASS(wxImageValidator)
00024 DECLARE_EVENT_TABLE()
00025 public:
00026 wxImageValidator(wxImageBlock* imageBlock = NULL);
00027 wxImageValidator(const wxImageValidator& copyFrom);
00028
00029 virtual ~wxImageValidator(){}
00030
00031
00032
00033
00034
00035 virtual wxObject *Clone() const { return new wxImageValidator(*this); }
00036 bool Copy(const wxImageValidator& val);
00037
00038
00039
00040 virtual bool Validate(wxWindow * WXUNUSED(parent)) { return true; }
00041
00042
00043 virtual bool TransferToWindow();
00044
00045
00046 virtual bool TransferFromWindow();
00047
00048
00049 void OnLeftClick(wxMouseEvent& event);
00050
00051 protected:
00052
00053
00054 void Init();
00055
00056 wxImageBlock* m_imageBlock;
00057
00058 private:
00059
00060
00061
00062
00063
00064 wxImageValidator& operator=(const wxImageValidator&);
00065 };
00066
00067 #endif
00068
00069
00070 #endif
00071