ReactOS 0.4.16-dev-106-g10b08aa
CMenuFocusManager.h
Go to the documentation of this file.
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
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19*/
20#pragma once
21
22class CMenuBand;
23
25 public CComCoClass<CMenuFocusManager>,
26 public CComObjectRootEx<CComMultiThreadModelNoCS>
27{
28private:
30
32
34 {
39 };
40
42 {
47 };
48
49public:
51
53
54private:
57
58private:
62
66
68
70
72
75
79
82
84
85 // TODO: make dynamic
86#define MAX_RECURSE 20
90
92 HRESULT PopFromArray(StackEntryType * pType, CMenuBand ** pMb, HMENU * pHmenu);
93
94protected:
97
98public:
99
104
105private:
113
114 void DisableMouseTrack(HWND parent, BOOL disableThis);
116
118 LRESULT ProcessMouseDown(MSG* msg, BOOL isLButton);
119 LRESULT ProcessMouseUp(MSG* msg, BOOL isLButton);
120public:
127};
#define MAX_RECURSE
#define msg(x)
Definition: auth_time.c:54
HWND hWnd
Definition: settings.c:17
static CMenuFocusManager * AcquireManager()
HRESULT PopFromArray(StackEntryType *pType, CMenuBand **pMb, HMENU *pHmenu)
LRESULT GetMsgHook(INT nCode, WPARAM wParam, LPARAM lParam)
HRESULT PopMenuPopup(CMenuBand *mb)
LRESULT ProcessMouseMove(MSG *msg)
StackEntry * m_entryUnderMouse
static LRESULT CALLBACK s_MsgFilterHook(INT nCode, WPARAM wParam, LPARAM lParam)
static void ReleaseManager(CMenuFocusManager *obj)
HRESULT IsTrackedWindow(HWND hWnd, StackEntry **pentry=NULL)
LRESULT MsgFilterHook(INT nCode, WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK s_GetMsgHook(INT nCode, WPARAM wParam, LPARAM lParam)
HRESULT IsTrackedWindowOrParent(HWND hWnd)
HRESULT PushTrackedPopup(HMENU popup)
LRESULT ProcessMouseUp(MSG *msg, BOOL isLButton)
HRESULT PushMenuPopup(CMenuBand *mb)
HRESULT PushToArray(StackEntryType type, CMenuBand *mb, HMENU hmenu)
void SetMenuCapture(HWND child)
static CMenuFocusManager * GetManager()
void DisableMouseTrack(HWND parent, BOOL disableThis)
LRESULT ProcessMouseDown(MSG *msg, BOOL isLButton)
StackEntry * m_current
HRESULT PopTrackedPopup(HMENU popup)
StackEntry * m_parent
HRESULT PopMenuBar(CMenuBand *mb)
StackEntry * m_menuBar
static DWORD TlsIndex
HRESULT PushMenuBar(CMenuBand *mb)
StackEntry m_bandStack[MAX_RECURSE]
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define CALLBACK
Definition: compat.h:35
r parent
Definition: btrfs.c:3010
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define END_COM_MAP()
Definition: atlcom.h:592
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static HWND child
Definition: cursoricon.c:298
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
int32_t INT
Definition: typedefs.h:58
static HMENU hmenu
Definition: win.c:66
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207