Beispiel #1
0
FolderItem::FolderItem(Menu* pSubMenu, const TCHAR* pszTitle, const TCHAR* pszIcon) : MenuItem(pszTitle)
{
	m_nSortPriority = M_SORT_FOLDER;
	m_ItemID = MENUITEM_ID_FOLDER;
	LinkSubmenu(pSubMenu);
	m_phIcon = GetIcon(pszIcon);
}
Beispiel #2
0
void MenuItem::ShowRightMenu(Menu *pSub)
{
    if (pSub) {
        m_pMenu->HideChild();
        LinkSubmenu(pSub);
        ShowSubmenu();
    }
}
Beispiel #3
0
FolderItem::FolderItem(Menu* pSubMenu, const char* pszTitle, const char* pszIcon) : MenuItem(pszTitle)
{
	m_nSortPriority = M_SORT_FOLDER;
	m_ItemID = MENUITEM_ID_FOLDER;
	LinkSubmenu(pSubMenu);
	m_pszIcon = new_str(pszIcon);
	GetIcon();
}
Beispiel #4
0
//================================================
void SpecialFolderItem::ShowSubMenu(void)
{
	if (NULL == m_pSubMenu)
	{
		check_pidl();
		LinkSubmenu(new SpecialFolder(m_pszTitle, m_pidl_list, m_pszExtra));
	}

	MenuItem::ShowSubMenu();
}
Beispiel #5
0
void MenuItem::ShowContextMenu(const TCHAR *path, const struct _ITEMIDLIST *pidl)
{
	struct _ITEMIDLIST *new_pidl = NULL;
	if (NULL == pidl && path) pidl = new_pidl = sh_getpidl(NULL, path);
	Menu *pSub = GetContextMenu(pidl);
	if (new_pidl) m_free(new_pidl);
	if (pSub)
	{
		m_pMenu->HideChild();
		LinkSubmenu(pSub);
		ShowSubMenu();
	}
}