ReactOS 0.4.15-dev-7918-g2a2556c
shellbrowserimpl.h
Go to the documentation of this file.
1/*
2 * Copyright 2003 Martin Fuchs
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19
20 //
21 // Explorer clone
22 //
23 // shellbrowserimpl.h
24 //
25 // Martin Fuchs, 23.07.2003
26 //
27 // Credits: Thanks to Leon Finker for his explorer cabinet window example
28 //
29
30#ifdef __MINGW32__
31#include "servprov.h" // for IServiceProvider
32#include "docobj.h" // for IOleCommandTarget
33#endif
34
35
38 : public IShellBrowser,
39 public ICommDlgBrowser,
40 public IServiceProvider,
42{
44 : _dwRef(0)
45 {
46 }
47
49 {
50 }
51
53
54 virtual ULONG STDMETHODCALLTYPE AddRef() {return ++_dwRef;}
55 virtual ULONG STDMETHODCALLTYPE Release() {return --_dwRef;} //not heap based
56
57 // *** IOleWindow methods ***
59
60 // *** ICommDlgBrowser methods ***
62
64 { //handle selection, rename, focus if needed
65 return E_NOTIMPL;
66 }
67
69 { //filter files if needed
70 return S_OK;
71 }
72
73 // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
74 virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) {return E_NOTIMPL;}
75 virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject) {return E_NOTIMPL;}
76 virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared) {return E_NOTIMPL;}
77 virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR lpszStatusText) {return E_NOTIMPL;}
84
85 // IServiceProvider
87
88 // IOleCommandTarget
89 virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT* pCmdText);
90 virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
91
92protected:
94
95 virtual HRESULT OnDefaultCommand(LPIDA pida) {return E_NOTIMPL;}
96};
97
98#ifndef WM_GETISHELLBROWSER
99#define WM_GETISHELLBROWSER (WM_USER+7)
100#endif
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define E_NOTIMPL
Definition: ddrawi.h:99
UINT uFlags
Definition: api.c:59
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
REFIID riid
Definition: atlbase.h:39
struct IOleCommandTarget::_tagOLECMDTEXT OLECMDTEXT
struct IOleCommandTarget::_tagOLECMD OLECMD
#define S_OK
Definition: intsafe.h:52
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned int UINT
Definition: ndis.h:50
interface IStream * LPSTREAM
Definition: objfwd.h:10
#define REFIID
Definition: guiddef.h:118
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
Definition: shlobj.h:565
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject)
virtual HRESULT STDMETHODCALLTYPE OnStateChange(IShellView *ppshv, ULONG uChange)
virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared)
virtual HRESULT STDMETHODCALLTYPE BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **ppvObject)
virtual HRESULT STDMETHODCALLTYPE OnDefaultCommand(IShellView *ppshv)
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable)
virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, LPSTREAM *ppStrm)
virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR lpszStatusText)
virtual ULONG STDMETHODCALLTYPE AddRef()
virtual ULONG STDMETHODCALLTYPE Release()
virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(IShellView *ppshv)
virtual HRESULT OnDefaultCommand(LPIDA pida)
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(LPMSG lpmsg, WORD wID)
virtual ~IShellBrowserImpl()
virtual HRESULT STDMETHODCALLTYPE IncludeObject(IShellView *ppshv, LPCITEMIDLIST pidl)
Definition: scsiwmi.h:51
uint32_t ULONG
Definition: typedefs.h:59
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082