Beispiel #1
0
void MenuItem::UnlinkSubmenu(void)
{
	if (m_pSubMenu)
	{
		Menu *pSubMenu = m_pSubMenu;
		m_pSubMenu = NULL;
		if (this==pSubMenu->m_pParentItem)
			pSubMenu->LinkToParentItem(NULL);
		pSubMenu->decref();
	}
}
Beispiel #2
0
void MenuItem::UnlinkSubmenu(void)
{
    if (m_pSubmenu)
    {
        Menu *sub = m_pSubmenu;
        m_pSubmenu = NULL;

        if (this == sub->m_pParentItem)
            // i.e. the submenu is currently visible
            sub->LinkToParentItem(NULL);

        sub->decref();
    }
}