]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/property.h
Add wxWinVersion_7 to the private wxMSW wxWinVersion enum.
[wxWidgets.git] / include / wx / propgrid / property.h
index 94d8b500657fcb3ad7a7f8cb82696bfa34643076..088f442b7c2566322edbf793455441e9b0f34b98 100644 (file)
@@ -98,7 +98,11 @@ public:
                               DontUseCellBgCol
     };
 
-    virtual void Render( wxDC& dc,
+    /**
+        Returns @true if rendered something in the foreground (text or
+        bitmap.
+    */
+    virtual bool Render( wxDC& dc,
                          const wxRect& rect,
                          const wxPropertyGrid* propertyGrid,
                          wxPGProperty* property,
@@ -171,7 +175,7 @@ public:
 class WXDLLIMPEXP_PROPGRID wxPGDefaultRenderer : public wxPGCellRenderer
 {
 public:
-    virtual void Render( wxDC& dc,
+    virtual bool Render( wxDC& dc,
                          const wxRect& rect,
                          const wxPropertyGrid* propertyGrid,
                          wxPGProperty* property,
@@ -254,6 +258,11 @@ public:
         return (m_refData && GetData()->m_hasValidText);
     }
 
+    /**
+        Sets empty but valid data to this cell object.
+    */
+    void SetEmptyData();
+
     /**
         Merges valid data from srcCell into this.
     */
@@ -541,10 +550,17 @@ wxPG_PROP_BEING_DELETED             = 0x00200000
 */
 #define wxPG_ATTR_UNITS                     wxS("Units")
 
-/** Universal, string. When set, will be shown in property's value cell
-    when displayed value string is empty, or value is unspecified.
+/** When set, will be shown as 'greyed' text in property's value cell when
+    the actual displayed value is blank.
+*/
+#define wxPG_ATTR_HINT                      wxS("Hint")
+
+#if wxPG_COMPATIBILITY_1_4
+/**
+    @deprecated Use "Hint" (wxPG_ATTR_INLINE_HELP) instead.
 */
 #define wxPG_ATTR_INLINE_HELP               wxS("InlineHelp")
+#endif
 
 /** Universal, wxArrayString. Set to enable auto-completion in any
     wxTextCtrl-based property editor.
@@ -678,8 +694,12 @@ wxPG_PROP_BEING_DELETED             = 0x00200000
 #define wxPG_ATTR_MAX                     wxPGGlobalVars->m_strMax
 #undef wxPG_ATTR_UNITS
 #define wxPG_ATTR_UNITS                   wxPGGlobalVars->m_strUnits
+#undef wxPG_ATTR_HINT
+#define wxPG_ATTR_HINT                    wxPGGlobalVars->m_strHint
+#if wxPG_COMPATIBILITY_1_4
 #undef wxPG_ATTR_INLINE_HELP
 #define wxPG_ATTR_INLINE_HELP             wxPGGlobalVars->m_strInlineHelp
+#endif
 
 #endif  // !SWIG
 
@@ -818,7 +838,7 @@ public:
         @param values
             Values for choices. If NULL, indexes are used.
     */
-    wxPGChoices( const wxChar** labels, const long* values = NULL )
+    wxPGChoices( const wxChar* const* labels, const long* values = NULL )
     {
         Init();
         Set(labels,values);
@@ -866,7 +886,7 @@ public:
         @param values
             Values for added choices. If empty, relevant entry indexes are used.
     */
-    void Add( const wxChar** labels, const ValArrItem* values = NULL );
+    void Add( const wxChar* const* labels, const ValArrItem* values = NULL );
 
     /** Version that works with wxArrayString and wxArrayInt. */
     void Add( const wxArrayString& arr, const wxArrayInt& arrint = wxArrayInt() );
@@ -994,7 +1014,7 @@ public:
 
 #ifndef SWIG
     /** Does not create copies for itself. */
-    void Set( const wxChar** labels, const long* values = NULL )
+    void Set( const wxChar* const* labels, const long* values = NULL )
     {
         Free();
         Add(labels,values);
@@ -1633,6 +1653,11 @@ public:
         return GetValueAsString(0);
     }
 
+    /**
+        Returns property's hint text (shown in empty value cell).
+    */
+    inline wxString GetHintText() const;
+
     /** Returns property grid where property lies. */
     wxPropertyGrid* GetGrid() const;
 
@@ -2043,7 +2068,7 @@ public:
     void SetValueToUnspecified()
     {
         wxVariant val;  // Create NULL variant
-        SetValue(val);
+        SetValue(val, NULL, wxPG_SETVAL_REFRESH_EDITOR);
     }
 
     // Helper function (for wxPython bindings and such) for settings protected
@@ -2067,7 +2092,7 @@ public:
             return m_validator;
         return DoGetValidator();
     }
-#endif // #if wxUSE_VALIDATORS
+#endif // wxUSE_VALIDATORS
 
 #ifndef SWIG
     /** Returns client data (void*) of a property.
@@ -2463,6 +2488,7 @@ public:
     int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const;
 
     virtual wxString ValueToString( wxVariant& value, int argFlags ) const;
+    virtual wxString GetValueAsString( int argFlags = 0 ) const;
 
 protected:
     void SetTextColIndex( unsigned int colInd )