mirror of
https://github.com/reactos/reactos.git
synced 2025-06-23 02:50:17 +00:00
[RSHELL]
* Move some classes to separate files. * Move class declarations to .h files. CORE-7586 svn path=/branches/shell-experiments/; revision=62319
This commit is contained in:
parent
8c18269e39
commit
b62a6757ee
11 changed files with 1818 additions and 1621 deletions
75
base/shell/rshell/CMenuFocusManager.h
Normal file
75
base/shell/rshell/CMenuFocusManager.h
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Shell Menu Band
|
||||
*
|
||||
* Copyright 2014 David Quintana
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
class CMenuBand;
|
||||
|
||||
class CMenuFocusManager :
|
||||
public CComCoClass<CMenuFocusManager>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>
|
||||
{
|
||||
private:
|
||||
static DWORD TlsIndex;
|
||||
|
||||
static CMenuFocusManager * GetManager();
|
||||
|
||||
public:
|
||||
static CMenuFocusManager * AcquireManager();
|
||||
|
||||
static void ReleaseManager(CMenuFocusManager * obj);
|
||||
|
||||
private:
|
||||
static LRESULT CALLBACK s_GetMsgHook(INT nCode, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
private:
|
||||
CMenuBand * m_currentBand;
|
||||
HWND m_currentFocus;
|
||||
HHOOK m_hHook;
|
||||
DWORD m_threadId;
|
||||
|
||||
// TODO: make dynamic
|
||||
#define MAX_RECURSE 20
|
||||
CMenuBand* m_bandStack[MAX_RECURSE];
|
||||
int m_bandCount;
|
||||
|
||||
HRESULT PushToArray(CMenuBand * item);
|
||||
HRESULT PopFromArray(CMenuBand ** pItem);
|
||||
HRESULT PeekArray(CMenuBand ** pItem);
|
||||
|
||||
protected:
|
||||
CMenuFocusManager();
|
||||
~CMenuFocusManager();
|
||||
|
||||
public:
|
||||
|
||||
DECLARE_NOT_AGGREGATABLE(CMenuFocusManager)
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
BEGIN_COM_MAP(CMenuFocusManager)
|
||||
END_COM_MAP()
|
||||
|
||||
LRESULT GetMsgHook(INT nCode, WPARAM wParam, LPARAM lParam);
|
||||
HRESULT PlaceHooks(HWND window);
|
||||
HRESULT RemoveHooks(HWND window);
|
||||
HRESULT UpdateFocus(CMenuBand * newBand);
|
||||
|
||||
public:
|
||||
HRESULT PushMenu(CMenuBand * mb);
|
||||
HRESULT PopMenu(CMenuBand * mb);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue