Example #1
0
void TabPanel::removeTab(Component* const Tab)
{
    UInt32 index(0);
    // also erase the the tab from the components list
    removeObjFromChildren(Tab);
    // check if the component is a tab or tabcontent, then erase accordingly
    if (editMFTabs()->end() == editMFTabs()->find(Tab))
    {	// so it isn't in tabs
        for (UInt32 i = 0; i < getMFTabContents()->size(); ++i)
        {
            if(editMFTabContents()->find(Tab) == editMFTabContents()->find(getTabContents(i)))
                index = i;
        }
        editMFTabContents()->erase(editMFTabContents()->find(Tab));
        // also erase the the tab from the components list
        removeObjFromChildren(getTabs(index));
        editMFTabs()->erase(editMFTabs()->find(getTabs(index)));
    }
    else
    {
        for (UInt32 i = 0; i < getMFTabs()->size(); ++i)
        {
            if(editMFTabs()->find(Tab) == editMFTabs()->find(getTabs(i)))
                index = i;
        }
        editMFTabs()->erase(editMFTabs()->find(Tab));
        // also erase the the tab from the components list
        removeObjFromChildren(getTabContents(index)); 
        editMFTabContents()->erase(editMFTabContents()->find(getTabContents(index)));
    }
}
Example #2
0
void TabPanel::removeTab(const UInt32 TabIndex)
{
    if(TabIndex == getMFTabs()->size()-1 &&
       TabIndex == getSelectedIndex())
    {
        setSelectedIndex(TabIndex-1);
    }

    removeObjFromChildren(getTabs(TabIndex));
    removeObjFromChildren(getTabContents(TabIndex));
    editMFTabs()->erase(editMFTabs()->find(getTabs(TabIndex)));
    editMFTabContents()->erase(editMFTabContents()->find(getTabContents(TabIndex)));
}
Example #3
0
void MenuBar::removeMenu(Menu* const menu)
{
    removeObjFromChildren(menu);
    menu->setTopLevelMenu(false);
    if(_PopupMenuCanceledConnections.find(menu) != _PopupMenuCanceledConnections.end())
    {
        _PopupMenuCanceledConnections[menu].disconnect();
        _PopupMenuCanceledConnections.erase(_PopupMenuCanceledConnections.find(menu));
    }
}
void GenericFieldContainerEditor::updateShownPanels(void)
{
    if(getShowFields() &&
       getMFChildren()->findIndex(_FieldsContainer) < 0)
    {
        pushToChildren(_FieldsContainer);
    }
    else if(!getShowFields() &&
            getMFChildren()->findIndex(_FieldsContainer) >= 0)
    {
        removeObjFromChildren(_FieldsContainer);
    }

    if(getShowEvents() &&
       getMFChildren()->findIndex(_ProducedEventsContainer) < 0)
    {
        pushToChildren(_ProducedEventsContainer);
    }
    else if(!getShowEvents() &&
            getMFChildren()->findIndex(_ProducedEventsContainer) >= 0)
    {
        removeObjFromChildren(_ProducedEventsContainer);
    }
}
Example #5
0
void Toolbar::removeSeparator(SeparatorRefPtr TheSeparator)
{
    removeObjFromChildren(TheSeparator);
}
Example #6
0
void Toolbar::removeTool(ComponentRefPtr TheTool)
{
    removeObjFromChildren(TheTool);
}