]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/property.cpp
remove streams tests: they're very basic and already-existing CppUnit stream tests...
[wxWidgets.git] / src / propgrid / property.cpp
index 44dd00af8f0739045cd30450718137b879a5283b..bfa70e38386b853ae4918c977f3f7e994ef3d1c3 100644 (file)
@@ -1911,7 +1911,7 @@ void wxPGProperty::SetChoiceSelection( int newValue )
     }
 }
 
-bool wxPGProperty::SetChoices( wxPGChoices& choices )
+bool wxPGProperty::SetChoices( const wxPGChoices& choices )
 {
     // Property must be de-selected first (otherwise choices in
     // the control would be de-synced with true choices)
@@ -1962,6 +1962,32 @@ const wxPGEditor* wxPGProperty::GetEditorClass() const
     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;