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); }
void MenuItem::ShowRightMenu(Menu *pSub) { if (pSub) { m_pMenu->HideChild(); LinkSubmenu(pSub); ShowSubmenu(); } }
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(); }
//================================================ void SpecialFolderItem::ShowSubMenu(void) { if (NULL == m_pSubMenu) { check_pidl(); LinkSubmenu(new SpecialFolder(m_pszTitle, m_pidl_list, m_pszExtra)); } MenuItem::ShowSubMenu(); }
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(); } }