Пример #1
0
void Toolbar::removeSeparator(const UInt32&  Index)
{
    if(Index < getNumSeparators())
    {
        UInt32 SeparatorCount(0);
        for(UInt32 i(0) ; i<getMFChildren()->size() ; ++i)
        {
            if(getChildren(i)->getType() == Separator::getClassType())
            {
                ++SeparatorCount;
            }
            if(SeparatorCount == Index)
            {
                break;
            }
        }

        removeFromChildren(SeparatorCount);
    }
}
Пример #2
0
void PopupMenu::removeSeparator(const UInt32&  Index)
{
    if(Index < getNumSeparators())
    {
        MFChildrenType::iterator RemoveItor(editMFChildren()->begin());
        UInt32 SeparatorCount(0);
        for(UInt32 i(0) ; i<getMFChildren()->size() ; ++i)
        {
            if(getChildren(i)->getType() == Separator::getClassType())
            {
                ++SeparatorCount;
            }
            if(SeparatorCount == Index)
            {
                break;
            }
            ++RemoveItor;
        }

            editMFChildren()->erase(RemoveItor);
    }
}
Пример #3
0
UInt32 PopupMenu::getNumItems(void) const
{
    return getMFChildren()->size() - getNumSeparators();
}