X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e6d8c311868c2bce749c4d4922e2efb8e3f019a..937d5b6075db060b98daa0f0fadbaa528bc85554:/include/wx/propgrid/property.h?ds=sidebyside diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index e8521d6944..99027163b7 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -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, @@ -546,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_HINT) instead. */ #define wxPG_ATTR_INLINE_HELP wxS("InlineHelp") +#endif /** Universal, wxArrayString. Set to enable auto-completion in any wxTextCtrl-based property editor. @@ -683,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 @@ -1441,12 +1456,16 @@ public: */ virtual void RefreshChildren(); - /** Special handling for attributes of this property. + /** + Reimplement this member function to add special handling for + attributes of this property. - If returns false, then the attribute will be automatically stored in - m_attributes. + @return Return @false to have the attribute automatically stored in + m_attributes. Default implementation simply does that and + nothing else. - Default implementation simply returns false. + @remarks To actually set property attribute values from the + application, use wxPGProperty::SetAttribute() instead. */ virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); @@ -1638,6 +1657,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; @@ -2468,6 +2492,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 )