Author: dquintana
Date: Tue Apr 15 22:30:37 2014
New Revision: 62755
URL:
http://svn.reactos.org/svn/reactos?rev=62755&view=rev
Log:
[RSHELL]
* Fix gcc build.
* Wip beginning of horizontal menubar keyboard navigation. Not working yet. ;P
CORE-7586
Modified:
branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp
branches/shell-experiments/base/shell/rshell/CMenuFocusManager.h
branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp
Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1] Tue
Apr 15 22:30:37 2014
@@ -157,6 +157,9 @@
m_captureHwnd(0),
m_hwndUnderMouse(NULL),
m_entryUnderMouse(NULL),
+ m_selectedMenu(NULL),
+ m_selectedItem(0),
+ m_selectedItemFlags(0),
m_bandCount(0)
{
m_ptPrev.x = 0;
@@ -354,6 +357,35 @@
break;
case WM_MOUSEMOVE:
callNext = ProcessMouseMove(msg);
+ break;
+ case WM_INITMENUPOPUP:
+ DbgPrint("WM_INITMENUPOPUP %p %p\n", wParam, lParam);
+ m_selectedMenu = reinterpret_cast<HMENU>(lParam);
+ m_selectedItem = -1;
+ m_selectedItemFlags = 0;
+ break;
+ case WM_MENUSELECT:
+ DbgPrint("WM_MENUSELECT %p %p\n", wParam, lParam);
+ m_selectedMenu = reinterpret_cast<HMENU>(lParam);
+ m_selectedItem = LOWORD(wParam);
+ m_selectedItemFlags = HIWORD(wParam);
+ break;
+ case WM_KEYDOWN:
+ switch (msg->wParam)
+ {
+ case VK_LEFT:
+ if (m_current->hmenu == m_selectedMenu)
+ {
+ m_parent->mb->_MenuItemHotTrack(VK_LEFT);
+ }
+ break;
+ case VK_RIGHT:
+ if (!(m_selectedItemFlags & MF_POPUP))
+ {
+ m_parent->mb->_MenuItemHotTrack(VK_RIGHT);
+ }
+ break;
+ }
break;
}
Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuFocusManager.h [iso-8859-1]
(original)
+++ branches/shell-experiments/base/shell/rshell/CMenuFocusManager.h [iso-8859-1] Tue Apr
15 22:30:37 2014
@@ -73,6 +73,10 @@
HWND m_hwndUnderMouse;
StackEntry * m_entryUnderMouse;
+ HMENU m_selectedMenu;
+ INT m_selectedItem;
+ DWORD m_selectedItemFlags;
+
// TODO: make dynamic
#define MAX_RECURSE 20
StackEntry m_bandStack[MAX_RECURSE];
Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Tue Apr 15
22:30:37 2014
@@ -277,12 +277,12 @@
CMenuToolbarBase::CMenuToolbarBase(CMenuBand *menuBand, BOOL usePager) :
m_hwnd(NULL),
+ m_hwndToolbar(NULL),
m_useFlatMenus(FALSE),
m_SubclassOld(NULL),
m_disableMouseTrack(FALSE),
m_timerEnabled(FALSE),
m_menuBand(menuBand),
- m_hwndToolbar(NULL),
m_dwMenuFlags(0),
m_hasSizes(FALSE),
m_usePager(usePager),