X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78f2d746a01dba8b3f62f89050129a351906ce2a..f54e5c1a4f6952c62ed4480f7d26feddc20f98ba:/include/wx/propgrid/props.h diff --git a/include/wx/propgrid/props.h b/include/wx/propgrid/props.h index b096bb24e1..5517f8acd9 100644 --- a/include/wx/propgrid/props.h +++ b/include/wx/propgrid/props.h @@ -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