#ifndef ENV_SHELL_H #define ENV_SHELL_H #include "env.h" #include #include namespace env { class ShellMenu { public: void addFile(QFileInfo fi); void exec(QWidget* parent, const QPoint& pos); private: std::vector m_files; QMainWindow* getMainWindow(QWidget* w); COMPtr createShellItem(const std::wstring& path); COMPtr getPersistIDList(IShellItem* item); CoTaskMemPtr getIDList(IPersistIDList* pidlist); std::vector createIdls(const std::vector& files); COMPtr createItemArray(std::vector& idls); COMPtr createContextMenu(IShellItemArray* array); HMenuPtr createMenu(IContextMenu* cm); int runMenu(QMainWindow* mw, IContextMenu* cm, HMENU menu, const QPoint& p); void invoke(QMainWindow* mw, const QPoint& p, int cmd, IContextMenu* cm); }; } // namespace #endif // ENV_SHELL_H