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

int wxPropertyGridState::GetLeftSplitterPos ( wxClientDC &  dc,
wxPGPropertyWithChildren pwc,
bool  subProps 
)

Used by SetSplitterLeft.

Definition at line 11995 of file propgrid.cpp.

References wxPGPropertyWithChildren::GetCount(), wxPGProperty::GetLabel(), wxPGProperty::GetParentingType(), and wxPGPropertyWithChildren::Item().

Referenced by wxPropertyGrid::SetSplitterLeft(), and wxPropertyGridManager::SetSplitterLeft().

{
    wxPropertyGrid* pg = m_pPropGrid;
    size_t i;
    int maxW = 0;
    int w, h;

    for ( i=0; i<pwc->GetCount(); i++ )
    {
        wxPGProperty* p = pwc->Item(i);
        if ( p->GetParentingType() <= 0 )
        {
            dc.GetTextExtent( p->GetLabel(), &w, &h );

            w += pg->m_marginWidth + ( ((int)p->m_depth-1) * pg->m_subgroup_extramargin ) + (wxPG_XBEFORETEXT*2);

            if ( w > maxW )
                maxW = w;
        }

        if ( p->GetParentingType() &&
             ( subProps || p->GetParentingType() > 0 ) )
        {
            w = GetLeftSplitterPos( dc, (wxPGPropertyWithChildren*) p, subProps );

            if ( w > maxW )
                maxW = w;
        }
    }

    return maxW;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index