]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/props.h
Make wxChoicebook background transparent.
[wxWidgets.git] / include / wx / propgrid / props.h
index b2bf59f6e67f6c7ef4d56aaa406952f5adb7100b..a260605ade5fea8da21ea0436d4f94314cdcd7fc 100644 (file)
@@ -6,12 +6,14 @@
 // Created:     2007-03-28
 // RCS-ID:      $Id$
 // Copyright:   (c) Jaakko Salli
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_PROPGRID_PROPS_H_
 #define _WX_PROPGRID_PROPS_H_
 
+#include "wx/defs.h"
+
 #if wxUSE_PROPGRID
 
 // -----------------------------------------------------------------------
@@ -25,6 +27,7 @@ class wxPGArrayEditorDialog;
 #include "wx/textctrl.h"
 #include "wx/button.h"
 #include "wx/listbox.h"
+#include "wx/valtext.h"
 
 // -----------------------------------------------------------------------
 
@@ -122,9 +125,9 @@ protected:
 
 // -----------------------------------------------------------------------
 
-/** Constants used with DoValidation() methods.
+/** Constants used with NumericValidation<>().
 */
-enum wxPGDoValidationConstants
+enum wxPGNumericValidationConstants
 {
     /** Instead of modifying the value, show an error message.
     */
@@ -141,6 +144,29 @@ enum wxPGDoValidationConstants
 
 // -----------------------------------------------------------------------
 
+#if wxUSE_VALIDATORS
+
+/**
+    A more comprehensive numeric validator class.
+*/
+class WXDLLIMPEXP_PROPGRID wxNumericPropertyValidator : public wxTextValidator
+{
+public:
+    enum NumericType
+    {
+        Signed = 0,
+        Unsigned,
+        Float
+    };
+
+    wxNumericPropertyValidator( NumericType numericType, int base = 10 );
+    virtual ~wxNumericPropertyValidator() { }
+    virtual bool Validate(wxWindow* parent);
+};
+
+#endif // wxUSE_VALIDATORS
+
+
 /** @class wxIntProperty
     @ingroup classes
     Basic property with integer value.
@@ -255,6 +281,7 @@ public:
     virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
     virtual bool ValidateValue( wxVariant& value,
                                 wxPGValidationInfo& validationInfo ) const;
+    virtual wxValidator* DoGetValidator () const;
     virtual bool IntToValue( wxVariant& variant,
                              int number,
                              int argFlags = 0 ) const;
@@ -300,6 +327,7 @@ public:
                               wxPGValidationInfo* pValidationInfo,
                               int mode =
                                  wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE );
+    static wxValidator* GetClassValidator();
     virtual wxValidator* DoGetValidator () const;
 
 protected: