summaryrefslogtreecommitdiff
path: root/src/envshell.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/envshell.h')
-rw-r--r--src/envshell.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/envshell.h b/src/envshell.h
index 3be53841..3e694562 100644
--- a/src/envshell.h
+++ b/src/envshell.h
@@ -1,18 +1,34 @@
#ifndef ENV_SHELL_H
#define ENV_SHELL_H
+#include "env.h"
#include <QFileInfo>
#include <QPoint>
namespace env
{
-void showShellMenu(
- QWidget* parent, const QFileInfo& file, const QPoint& pos);
+class ShellMenu
+{
+public:
+ void addFile(QFileInfo fi);
+ void exec(QWidget* parent, const QPoint& pos);
+
+private:
+ std::vector<QFileInfo> m_files;
-void showShellMenu(
- QWidget* parent, const std::vector<QFileInfo>& files, const QPoint& pos);
+ QMainWindow* getMainWindow(QWidget* w);
+ COMPtr<IShellItem> createShellItem(const std::wstring& path);
+ COMPtr<IPersistIDList> getPersistIDList(IShellItem* item);
+ CoTaskMemPtr<LPITEMIDLIST> getIDList(IPersistIDList* pidlist);
+ std::vector<LPCITEMIDLIST> createIdls(const std::vector<QFileInfo>& files);
+ COMPtr<IShellItemArray> createItemArray(std::vector<LPCITEMIDLIST>& idls);
+ COMPtr<IContextMenu> 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