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); } }
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); } }
UInt32 PopupMenu::getNumItems(void) const { return getMFChildren()->size() - getNumSeparators(); }