Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

void wxsPropertyGridManager::UnbindPropertyContainer ( wxsPropertyContainer PC ) [private]

Function unbinding given container.

This function destroys all property enteries using given container. It's automatically called in container's destructor but it may be used in other places too.

Parameters:
PCpointer to property container

Definition at line 135 of file wxspropertygridmanager.cpp.

References wxPropertyGridManager::ClearPage(), wxPropertyContainerMethods::Delete(), wxPropertyGridManager::GetPageCount(), MainContainer, PGContainers, PGContainersSet, PGEnteries, PGIDs, PGIndexes, SetNewMainContainer(), and UnbindAll().

{
    if ( PGContainersSet.find(PC) == PGContainersSet.end() )
    {
        // This container is not used here
        return;
    }

    if ( PC == MainContainer )
    {
        // Main container unbinds all
        UnbindAll();
        return;
    }

    Freeze();
    for ( size_t i = PGIDs.Count(); i-- > 0; )
    {
        if ( PGContainers[i] == PC )
        {
            Delete(PGIDs[i]);
            PGIDs.RemoveAt(i);
            PGEnteries.RemoveAt(i);
            PGIndexes.RemoveAt(i);
            PGContainers.RemoveAt(i);
        }
    }
    Thaw();

    // If there are no properties, we have unbinded main property container
    if ( !PGIDs.Count() )
    {
        for ( size_t i=0; i<GetPageCount(); i++ )
        {
            ClearPage(i);
        }
        SetNewMainContainer(0);
    }
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index