IntegerValidator.h

00001 
00004 #ifndef _IntegerValidator_h
00005 #define _IntegerValidator_h
00006 
00007 // SYSTEM INCLUDES
00008 //
00009 
00010 // PROJECT INCLUDES
00011 //
00012 
00013 // LOCAL INCLUDES
00014 //
00015 
00016 // FORWARD REFERENCES
00017 //
00018 
00019 
00020 class IntegerValidator
00021     : public wxValidator
00022 {
00023 public:
00024 // LIFECYCLE
00025 
00034     IntegerValidator(long&              rValue,
00035                      long               min = LONG_MIN,
00036                      long               max = LONG_MAX,
00037                      const wxString&    format = wxT("%ld"));
00038 
00043     IntegerValidator(const IntegerValidator& from);
00044 
00045 
00048     ~IntegerValidator(void);
00049 
00050 
00051 // OPERATORS
00052 
00053 // OPERATIONS
00054 
00056     virtual wxObject*       Clone() const;
00057 
00059     virtual bool            Validate(wxWindow* pParent);
00060 
00063     virtual bool            TransferToWindow();
00064 
00067     virtual bool            TransferFromWindow();
00068 
00069 
00073     void                    OnChar(wxKeyEvent& event);
00074 
00075 // ACCESS
00076 // INQUIRY
00077 
00078 protected:
00079 private:
00080     DECLARE_EVENT_TABLE()
00081 
00082     
00084     void                    ShowError(wxWindow*         pParent,
00085                                       const wxString&   message);
00086 
00087     long&           mrValue;    
00088     const wxString  mFormat;    
00089     long            mMin;       
00090     long            mMax;       
00091 };
00092 
00093 // INLINE METHODS
00094 //
00095 
00096 // EXTERNAL REFERENCES
00097 //
00098 
00099 #endif  // _IntegerValidator_h

Wygenerowano Fri Sep 29 21:04:48 2006 dla EduOptim2 programem  doxygen 1.4.6