diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-10 01:27:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-10 01:27:27 +0000 |
commit | 76718abdb2138623102398a10f3228e576dd0ae8 (patch) | |
tree | ddb098baac9689b9e661a41c2a28a8a23ef246d4 /src/kreplacements/ShellContextMenu.h | |
download | kdiff3-76718abdb2138623102398a10f3228e576dd0ae8.tar.gz kdiff3-76718abdb2138623102398a10f3228e576dd0ae8.zip |
Added abandoned KDE3 version of kdiff3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1088041 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kreplacements/ShellContextMenu.h')
-rw-r--r-- | src/kreplacements/ShellContextMenu.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/kreplacements/ShellContextMenu.h b/src/kreplacements/ShellContextMenu.h new file mode 100644 index 0000000..ae67483 --- /dev/null +++ b/src/kreplacements/ShellContextMenu.h @@ -0,0 +1,60 @@ +/*************************************************************************** + ShellContextMenu.h - description + ------------------- + begin : Sat Mar 4 2006 + copyright : (C) 2005-2007 by Joachim Eibl + email : joachim dot eibl at gmx dot de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// ShellContextMenu.h: Schnittstelle fr die Klasse CShellContextMenu. +// +////////////////////////////////////////////////////////////////////// + +#ifndef SHELLCONTEXTMENU_H +#define SHELLCONTEXTMENU_H + +///////////////////////////////////////////////////////////////////// +// class to show shell contextmenu of files/folders/shell objects +// developed by R. Engels 2003 +///////////////////////////////////////////////////////////////////// + +class CShellContextMenu +{ +public: + HMENU GetMenu (); + void SetObjects (IShellFolder * psfFolder, LPITEMIDLIST pidlItem); + void SetObjects (IShellFolder * psfFolder, LPITEMIDLIST * pidlArray, int nItemCount); + void SetObjects (LPITEMIDLIST pidl); + void SetObjects (const QString& strObject); + void SetObjects (const QStringList& strList); + UINT ShowContextMenu (QWidget* pParent, QPoint pt, QPopupMenu* pMenu); + CShellContextMenu(); + virtual ~CShellContextMenu(); + +private: + int nItems; + BOOL bDelete; + HMENU m_hMenu; + IShellFolder * m_psfFolder; + LPITEMIDLIST * m_pidlArray; + + void InvokeCommand (LPCONTEXTMENU pContextMenu, UINT idCommand); + BOOL GetContextMenu (void ** ppContextMenu, int & iMenuType); + HRESULT SHBindToParentEx (LPCITEMIDLIST pidl, REFIID riid, VOID **ppv, LPCITEMIDLIST *ppidlLast); + static LRESULT CALLBACK HookWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + void FreePIDLArray (LPITEMIDLIST * pidlArray); + LPITEMIDLIST CopyPIDL (LPCITEMIDLIST pidl, int cb = -1); + UINT GetPIDLSize (LPCITEMIDLIST pidl); + LPBYTE GetPIDLPos (LPCITEMIDLIST pidl, int nPos); + int GetPIDLCount (LPCITEMIDLIST pidl); +}; + +#endif |