]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/props.h
Fixed compilation error on OS/2 (strnlen declaration was not visible).
[wxWidgets.git] / include / wx / propgrid / props.h
index b096bb24e106da0f22db4a2e316bfe5620ae389a..5517f8acd9877fac7c7e2a4034d8dd0d175681f1 100644 (file)
@@ -20,6 +20,12 @@ class wxArrayEditorDialog;
 
 #include "wx/propgrid/editors.h"
 
+#include "wx/filename.h"
+#include "wx/dialog.h"
+#include "wx/textctrl.h"
+#include "wx/button.h"
+#include "wx/listbox.h"
+
 // -----------------------------------------------------------------------
 
 //
@@ -35,7 +41,7 @@ WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME, T, EDITOR)
 //
 // These macros help creating DoGetValidator
 #define WX_PG_DOGETVALIDATOR_ENTRY() \
-    static wxValidator* s_ptr = (wxValidator*) NULL; \
+    static wxValidator* s_ptr = NULL; \
     if ( s_ptr ) return s_ptr;
 
 // Common function exit
@@ -48,8 +54,6 @@ WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME, T, EDITOR)
 
 #ifndef SWIG
 
-#include "wx/textctrl.h"
-
 /** @class wxPGInDialogValidator
     @ingroup classes
     Creates and manages a temporary wxTextCtrl for validation purposes.
@@ -302,10 +306,10 @@ public:
                               wxPGValidationInfo* pValidationInfo,
                               int mode =
                                  wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE );
+    virtual wxValidator* DoGetValidator () const;
 
 protected:
     int m_precision;
-    virtual wxValidator* DoGetValidator () const;
 };
 
 // -----------------------------------------------------------------------
@@ -424,6 +428,8 @@ public:
     // this take advantage of it.
     virtual int GetChoiceSelection() const { return m_index; }
 
+    virtual void OnValidationFailure( wxVariant& pendingValue );
+
 protected:
 
     int GetIndex() const;
@@ -443,6 +449,7 @@ private:
 
     // Relies on ValidateValue being called always before OnSetValue
     static int              ms_nextIndex;
+    static int              ms_prevIndex;
 };
 
 // -----------------------------------------------------------------------
@@ -571,8 +578,6 @@ public:
 
 // -----------------------------------------------------------------------
 
-#include "wx/filename.h"
-
 // Indicates first bit useable by derived properties.
 #define wxPG_PROP_SHOW_FULL_FILENAME  wxPG_PROP_CLASS_SPECIFIC_1
 
@@ -845,17 +850,13 @@ WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \
                                                     DELIMCHAR, \
                                                     CUSTBUTTXT) \
 wxValidator* PROPNAME::DoGetValidator () const \
-{ return (wxValidator*) NULL; }
+{ return NULL; }
 
 
 // -----------------------------------------------------------------------
 // wxArrayEditorDialog
 // -----------------------------------------------------------------------
 
-#include "wx/button.h"
-#include "wx/dialog.h"
-#include "wx/listbox.h"
-
 #define wxAEDIALOG_STYLE \
     (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE)
 
@@ -906,7 +907,7 @@ public:
     */
     virtual wxValidator* GetTextCtrlValidator() const
     {
-        return (wxValidator*) NULL;
+        return NULL;
     }
 
     // Returns true if array was actually modified