CMenuBand.h (c2c66aff) CMenuBand.h (49b2b1da)
1/*
2* Shell Menu Band
3*
4* Copyright 2014 David Quintana
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

--- 86 unchanged lines hidden (view full) ---

95 COM_INTERFACE_ENTRY_IID(IID_IMenuPopup, IMenuPopup)
96 COM_INTERFACE_ENTRY_IID(IID_IMenuBand, IMenuBand)
97 COM_INTERFACE_ENTRY_IID(IID_IShellMenu2, IShellMenu2)
98 COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
99 COM_INTERFACE_ENTRY_IID(IID_IShellMenuAcc, IShellMenuAcc)
100 END_COM_MAP()
101
102 // *** IDeskBand methods ***
1/*
2* Shell Menu Band
3*
4* Copyright 2014 David Quintana
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

--- 86 unchanged lines hidden (view full) ---

95 COM_INTERFACE_ENTRY_IID(IID_IMenuPopup, IMenuPopup)
96 COM_INTERFACE_ENTRY_IID(IID_IMenuBand, IMenuBand)
97 COM_INTERFACE_ENTRY_IID(IID_IShellMenu2, IShellMenu2)
98 COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
99 COM_INTERFACE_ENTRY_IID(IID_IShellMenuAcc, IShellMenuAcc)
100 END_COM_MAP()
101
102 // *** IDeskBand methods ***
103 virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi);
103 STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override;
104
105 // *** IDockingWindow methods ***
104
105 // *** IDockingWindow methods ***
106 virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow);
107 virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved);
108 virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved);
106 STDMETHOD(ShowDW)(BOOL fShow) override;
107 STDMETHOD(CloseDW)(DWORD dwReserved) override;
108 STDMETHOD(ResizeBorderDW)(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override;
109
110 // *** IOleWindow methods ***
109
110 // *** IOleWindow methods ***
111 virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd);
112 virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
111 STDMETHOD(GetWindow)(HWND *phwnd) override;
112 STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override;
113
114 // *** IObjectWithSite methods ***
113
114 // *** IObjectWithSite methods ***
115 virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
116 virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, PVOID *ppvSite);
115 STDMETHOD(SetSite)(IUnknown *pUnkSite) override;
116 STDMETHOD(GetSite)(REFIID riid, PVOID *ppvSite) override;
117
118 // *** IInputObject methods ***
117
118 // *** IInputObject methods ***
119 virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
120 virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
121 virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
119 STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override;
120 STDMETHOD(HasFocusIO)() override;
121 STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override;
122
123 // *** IPersistStream methods ***
122
123 // *** IPersistStream methods ***
124 virtual HRESULT STDMETHODCALLTYPE IsDirty();
125 virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
126 virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
127 virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
124 STDMETHOD(IsDirty)() override;
125 STDMETHOD(Load)(IStream *pStm) override;
126 STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override;
127 STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override;
128
129 // *** IPersist methods ***
128
129 // *** IPersist methods ***
130 virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
130 STDMETHOD(GetClassID)(CLSID *pClassID) override;
131
132 // *** IOleCommandTarget methods ***
131
132 // *** IOleCommandTarget methods ***
133 virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText);
134 virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
133 STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText) override;
134 STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override;
135
136 // *** IServiceProvider methods ***
135
136 // *** IServiceProvider methods ***
137 virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
137 STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override;
138
139 // *** IMenuPopup methods ***
138
139 // *** IMenuPopup methods ***
140 virtual HRESULT STDMETHODCALLTYPE Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags);
141 virtual HRESULT STDMETHODCALLTYPE OnSelect(DWORD dwSelectType);
142 virtual HRESULT STDMETHODCALLTYPE SetSubMenu(IMenuPopup *pmp, BOOL fSet);
140 STDMETHOD(Popup)(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags) override;
141 STDMETHOD(OnSelect)(DWORD dwSelectType) override;
142 STDMETHOD(SetSubMenu)(IMenuPopup *pmp, BOOL fSet) override;
143
144 // *** IDeskBar methods ***
143
144 // *** IDeskBar methods ***
145 virtual HRESULT STDMETHODCALLTYPE SetClient(IUnknown *punkClient);
146 virtual HRESULT STDMETHODCALLTYPE GetClient(IUnknown **ppunkClient);
147 virtual HRESULT STDMETHODCALLTYPE OnPosRectChangeDB(RECT *prc);
145 STDMETHOD(SetClient)(IUnknown *punkClient) override;
146 STDMETHOD(GetClient)(IUnknown **ppunkClient) override;
147 STDMETHOD(OnPosRectChangeDB)(RECT *prc) override;
148
149 // *** IMenuBand methods ***
148
149 // *** IMenuBand methods ***
150 virtual HRESULT STDMETHODCALLTYPE IsMenuMessage(MSG *pmsg);
151 virtual HRESULT STDMETHODCALLTYPE TranslateMenuMessage(MSG *pmsg, LRESULT *plRet);
150 STDMETHOD(IsMenuMessage)(MSG *pmsg) override;
151 STDMETHOD(TranslateMenuMessage)(MSG *pmsg, LRESULT *plRet) override;
152
153 // *** IShellMenu methods ***
152
153 // *** IShellMenu methods ***
154 virtual HRESULT STDMETHODCALLTYPE Initialize(IShellMenuCallback *psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags);
155 virtual HRESULT STDMETHODCALLTYPE GetMenuInfo(IShellMenuCallback **ppsmc, UINT *puId, UINT *puIdAncestor, DWORD *pdwFlags);
156 virtual HRESULT STDMETHODCALLTYPE SetShellFolder(IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags);
157 virtual HRESULT STDMETHODCALLTYPE GetShellFolder(DWORD *pdwFlags, LPITEMIDLIST *ppidl, REFIID riid, void **ppv);
158 virtual HRESULT STDMETHODCALLTYPE SetMenu(HMENU hmenu, HWND hwnd, DWORD dwFlags);
159 virtual HRESULT STDMETHODCALLTYPE GetMenu(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags);
160 virtual HRESULT STDMETHODCALLTYPE InvalidateItem(LPSMDATA psmd, DWORD dwFlags);
161 virtual HRESULT STDMETHODCALLTYPE GetState(LPSMDATA psmd);
162 virtual HRESULT STDMETHODCALLTYPE SetMenuToolbar(IUnknown *punk, DWORD dwFlags);
154 STDMETHOD(Initialize)(IShellMenuCallback *psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags) override;
155 STDMETHOD(GetMenuInfo)(IShellMenuCallback **ppsmc, UINT *puId, UINT *puIdAncestor, DWORD *pdwFlags) override;
156 STDMETHOD(SetShellFolder)(IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags) override;
157 STDMETHOD(GetShellFolder)(DWORD *pdwFlags, LPITEMIDLIST *ppidl, REFIID riid, void **ppv) override;
158 STDMETHOD(SetMenu)(HMENU hmenu, HWND hwnd, DWORD dwFlags) override;
159 STDMETHOD(GetMenu)(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags) override;
160 STDMETHOD(InvalidateItem)(LPSMDATA psmd, DWORD dwFlags) override;
161 STDMETHOD(GetState)(LPSMDATA psmd) override;
162 STDMETHOD(SetMenuToolbar)(IUnknown *punk, DWORD dwFlags) override;
163
164 // *** IWinEventHandler methods ***
163
164 // *** IWinEventHandler methods ***
165 virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult);
166 virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd);
165 STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override;
166 STDMETHOD(IsWindowOwner)(HWND hWnd) override;
167
168 // *** IShellMenu2 methods ***
167
168 // *** IShellMenu2 methods ***
169 virtual HRESULT STDMETHODCALLTYPE GetSubMenu(THIS);
170 virtual HRESULT STDMETHODCALLTYPE SetToolbar(THIS);
171 virtual HRESULT STDMETHODCALLTYPE SetMinWidth(THIS);
172 virtual HRESULT STDMETHODCALLTYPE SetNoBorder(THIS);
173 virtual HRESULT STDMETHODCALLTYPE SetTheme(THIS);
169 STDMETHOD(GetSubMenu)(THIS) override;
170 STDMETHOD(SetToolbar)(THIS) override;
171 STDMETHOD(SetMinWidth)(THIS) override;
172 STDMETHOD(SetNoBorder)(THIS) override;
173 STDMETHOD(SetTheme)(THIS) override;
174
175 // *** IShellMenuAcc methods ***
174
175 // *** IShellMenuAcc methods ***
176 virtual HRESULT STDMETHODCALLTYPE GetTop(THIS);
177 virtual HRESULT STDMETHODCALLTYPE GetBottom(THIS);
178 virtual HRESULT STDMETHODCALLTYPE GetTracked(THIS);
179 virtual HRESULT STDMETHODCALLTYPE GetParentSite(THIS);
180 virtual HRESULT STDMETHODCALLTYPE GetState(THIS);
181 virtual HRESULT STDMETHODCALLTYPE DoDefaultAction(THIS);
182 virtual HRESULT STDMETHODCALLTYPE IsEmpty(THIS);
176 STDMETHOD(GetTop)(THIS) override;
177 STDMETHOD(GetBottom)(THIS) override;
178 STDMETHOD(GetTracked)(THIS) override;
179 STDMETHOD(GetParentSite)(THIS) override;
180 STDMETHOD(GetState)(THIS) override;
181 STDMETHOD(DoDefaultAction)(THIS) override;
182 STDMETHOD(IsEmpty)(THIS) override;
183
184 HRESULT _CallCBWithItemId(UINT Id, UINT uMsg, WPARAM wParam, LPARAM lParam);
185 HRESULT _CallCBWithItemPidl(LPITEMIDLIST pidl, UINT uMsg, WPARAM wParam, LPARAM lParam);
186 HRESULT _TrackSubMenu(HMENU popup, INT x, INT y, RECT& rcExclude);
187 HRESULT _TrackContextMenu(IContextMenu * popup, INT x, INT y);
188 HRESULT _GetTopLevelWindow(HWND*topLevel);
189 HRESULT _ChangeHotItem(CMenuToolbarBase * tb, INT id, DWORD dwFlags);
190 HRESULT _ChangePopupItem(CMenuToolbarBase * tb, INT id);

--- 25 unchanged lines hidden ---
183
184 HRESULT _CallCBWithItemId(UINT Id, UINT uMsg, WPARAM wParam, LPARAM lParam);
185 HRESULT _CallCBWithItemPidl(LPITEMIDLIST pidl, UINT uMsg, WPARAM wParam, LPARAM lParam);
186 HRESULT _TrackSubMenu(HMENU popup, INT x, INT y, RECT& rcExclude);
187 HRESULT _TrackContextMenu(IContextMenu * popup, INT x, INT y);
188 HRESULT _GetTopLevelWindow(HWND*topLevel);
189 HRESULT _ChangeHotItem(CMenuToolbarBase * tb, INT id, DWORD dwFlags);
190 HRESULT _ChangePopupItem(CMenuToolbarBase * tb, INT id);

--- 25 unchanged lines hidden ---