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()); }
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. */
m_customEditor = wxPropertyGridInterface::GetEditorByName(editorName);
}
-inline bool wxPGProperty::Hide( bool hide, int flags )
-{
- return GetGrid()->HideProperty(this, hide, flags);
-}
-
inline bool wxPGProperty::SetMaxLength( int maxLen )
{
return GetGrid()->SetPropertyMaxLength(this,maxLen);
return editor;
}
+bool wxPGProperty::Hide( bool hide, int flags )
+{
+ wxPropertyGrid* pg = GetGrid();
+ if ( pg )
+ return pg->HideProperty(this, hide, flags);
+
+ return DoHide( hide, flags );
+}
+
+bool wxPGProperty::DoHide( bool hide, int flags )
+{
+ if ( !hide )
+ ClearFlag( wxPG_PROP_HIDDEN );
+ else
+ SetFlag( wxPG_PROP_HIDDEN );
+
+ if ( flags & wxPG_RECURSE )
+ {
+ unsigned int i;
+ for ( i = 0; i < GetChildCount(); i++ )
+ Item(i)->DoHide(hide, flags | wxPG_RECURSE_STARTS);
+ }
+
+ return true;
+}
+
bool wxPGProperty::HasVisibleChildren() const
{
unsigned int i;
bool wxPropertyGridPageState::DoHideProperty( wxPGProperty* p, bool hide, int flags )
{
- if ( !hide )
- p->ClearFlag( wxPG_PROP_HIDDEN );
- else
- p->SetFlag( wxPG_PROP_HIDDEN );
-
- if ( flags & wxPG_RECURSE )
- {
- unsigned int i;
- for ( i = 0; i < p->GetChildCount(); i++ )
- DoHideProperty(p->Item(i), hide, flags | wxPG_RECURSE_STARTS);
- }
-
+ p->DoHide(hide, flags);
VirtualHeightChanged();
return true;