X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec3cce5a29f0ed01a4d37f78260e0f8a283e9422..ba5619e07600355a9823f9d2dcfab56cdcbbfb07:/include/wx/propgrid/property.h diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 0e34bcf2ed..5e0afbf884 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -367,7 +367,7 @@ protected: @{ */ -enum wxPG_PROPERTY_FLAGS +enum wxPGPropertyFlags { /** Indicates bold font. @@ -499,7 +499,9 @@ wxPG_PROP_BEING_DELETED = 0x00200000 Code should automatically take care of this, however. */ #define wxPG_PROP_PARENTAL_FLAGS \ - (wxPG_PROP_AGGREGATE|wxPG_PROP_CATEGORY|wxPG_PROP_MISC_PARENT) + ((wxPGPropertyFlags)(wxPG_PROP_AGGREGATE | \ + wxPG_PROP_CATEGORY | \ + wxPG_PROP_MISC_PARENT)) /** @} */ @@ -1679,7 +1681,12 @@ public: return m_value.IsNull(); } - FlagType HasFlag( FlagType flag ) const + /** + Returns non-zero if property has given flag set. + + @see propgrid_propflags + */ + FlagType HasFlag( wxPGPropertyFlags flag ) const { return ( m_flags & flag ); } @@ -1695,6 +1702,9 @@ public: */ wxVariant GetAttributesAsList() const; + /** + Returns property flags. + */ FlagType GetFlags() const { return m_flags; @@ -1848,7 +1858,7 @@ public: By default changes are applied recursively. Set this paramter wxPG_DONT_RECURSE to prevent this. */ - inline bool Hide( bool hide, int flags = wxPG_RECURSE ); + bool Hide( bool hide, int flags = wxPG_RECURSE ); bool IsExpanded() const { return (!(m_flags & wxPG_PROP_COLLAPSED) && GetChildCount()); } @@ -2009,14 +2019,25 @@ public: } /** - Sets given property flag(s). + Sets given property flag. + + @see propgrid_propflags */ - void SetFlag( FlagType flag ) { m_flags |= flag; } + void SetFlag( wxPGPropertyFlags flag ) + { + // + // NB: While using wxPGPropertyFlags here makes it difficult to + // combine different flags, it usefully prevents user from + // using incorrect flags (say, wxWindow styles). + m_flags |= flag; + } /** - Sets or clears given property flag(s). + Sets or clears given property flag. + + @see propgrid_propflags */ - void ChangeFlag( FlagType flag, bool set ) + void ChangeFlag( wxPGPropertyFlags flag, bool set ) { if ( set ) m_flags |= flag; @@ -2024,7 +2045,12 @@ public: m_flags &= ~flag; } - void SetFlagRecursively( FlagType flag, bool set ); + /** + Sets or clears given property flag, recursively. + + @see propgrid_propflags + */ + void SetFlagRecursively( wxPGPropertyFlags flag, bool set ); void SetHelpString( const wxString& helpString ) { @@ -2109,10 +2135,11 @@ public: */ wxClientData *GetClientObject() const { return m_clientObject; } - /** Sets new set of choices for property. + /** + Sets new set of choices for the property. - @remarks - This operation clears the property value. + @remarks This operation deselects the property and clears its + value. */ bool SetChoices( wxPGChoices& choices ); @@ -2301,6 +2328,8 @@ protected: const wxVariantList* valueOverrides = NULL, wxPGHashMapS2S* childResults = NULL ) const; + bool DoHide( bool hide, int flags ); + void DoSetName(const wxString& str) { m_name = str; } /** Deletes all sub-properties. */