99cf799ce0e5713580063dc496afd2c0f54bb859
[reactos.git] / reactos / dll / win32 / browseui / addresseditbox.h
1 /*
2 * ReactOS Explorer
3 *
4 * Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #pragma once
22
23 class CAddressEditBox :
24 public CWindowImpl<CAddressEditBox, CWindow, CControlWinTraits>,
25 public CComCoClass<CAddressEditBox, &CLSID_AddressEditBox>,
26 public CComObjectRootEx<CComMultiThreadModelNoCS>,
27 public IWinEventHandler,
28 public IDispatch,
29 public IAddressBand,
30 public IAddressEditBox,
31 public IOleCommandTarget,
32 public IPersistStream,
33 public IShellService
34 {
35 private:
36 CContainedWindow fCombobox;
37 CContainedWindow fEditWindow;
38 DWORD fAdviseCookie;
39 CComPtr<IUnknown> fSite;
40 LPITEMIDLIST pidlLastParsed;
41 public:
42 CAddressEditBox();
43 ~CAddressEditBox();
44 private:
45 public:
46 // *** IShellService methods ***
47 virtual HRESULT STDMETHODCALLTYPE SetOwner(IUnknown *);
48
49 // *** IAddressBand methods ***
50 virtual HRESULT STDMETHODCALLTYPE FileSysChange(long param8, long paramC);
51 virtual HRESULT STDMETHODCALLTYPE Refresh(long param8);
52
53 // *** IAddressEditBox methods ***
54 virtual HRESULT STDMETHODCALLTYPE Init(HWND comboboxEx, HWND editControl, long param14, IUnknown *param18);
55 virtual HRESULT STDMETHODCALLTYPE SetCurrentDir(long paramC);
56 virtual HRESULT STDMETHODCALLTYPE ParseNow(long paramC);
57 virtual HRESULT STDMETHODCALLTYPE Execute(long paramC);
58 virtual HRESULT STDMETHODCALLTYPE Save(long paramC);
59
60 // *** IWinEventHandler methods ***
61 virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult);
62 virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd);
63
64 // *** IOleCommandTarget methods ***
65 virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
66 virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
67
68 // *** IDispatch methods ***
69 virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
70 virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
71 virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
72 virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
73
74 // *** IPersist methods ***
75 virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
76
77 // *** IPersistStream methods ***
78 virtual HRESULT STDMETHODCALLTYPE IsDirty();
79 virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
80 virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
81 virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
82
83 // message handlers
84
85 DECLARE_REGISTRY_RESOURCEID(IDR_ADDRESSEDITBOX)
86 DECLARE_NOT_AGGREGATABLE(CAddressEditBox)
87
88 DECLARE_PROTECT_FINAL_CONSTRUCT()
89
90 BEGIN_MSG_MAP(CAddressEditBox)
91 END_MSG_MAP()
92
93 BEGIN_COM_MAP(CAddressEditBox)
94 COM_INTERFACE_ENTRY_IID(IID_IShellService, IShellService)
95 COM_INTERFACE_ENTRY_IID(IID_IAddressBand, IAddressBand)
96 COM_INTERFACE_ENTRY_IID(IID_IAddressEditBox, IAddressEditBox)
97 COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
98 COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
99 COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDispatch)
100 COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
101 COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
102 END_COM_MAP()
103 };