[MSUTB] Add CTipbarGripper (#6462)

Supporting Language Bar...
JIRA issue: CORE-19363
- Half-implement CTipbarGripper class.
This commit is contained in:
Katayama Hirofumi MZ 2024-02-08 20:31:01 +09:00 committed by GitHub
parent 3581a79ebf
commit 5901716c07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -934,6 +934,22 @@ public:
/***********************************************************************/
class CTipbarGripper : public CUIFGripper
{
protected:
CTipbarWnd *m_pTipbarWnd;
BOOL m_bInDebugMenu;
public:
CTipbarGripper(CTipbarWnd *pTipbarWnd, LPCRECT prc, DWORD style);
STDMETHOD_(void, OnLButtonUp)(LONG x, LONG y) override;
STDMETHOD_(void, OnRButtonUp)(LONG x, LONG y) override;
STDMETHOD_(BOOL, OnSetCursor)(UINT uMsg, LONG x, LONG y) override;
};
/***********************************************************************/
class CTrayIconWnd
{
protected:
@ -3360,6 +3376,58 @@ STDMETHODIMP CLBarInatItem::OnMenuSelect(INT nCommandId)
return S_OK;
}
/***********************************************************************
* CTipbarGripper
*/
/// @unimplemented
CTipbarGripper::CTipbarGripper(CTipbarWnd *pTipbarWnd, LPCRECT prc, DWORD style)
// : CUIFGripper((pTipbarWnd ? pTipbarWnd->GetWindow() : NULL), prc, style)
: CUIFGripper(NULL, prc, style)
{
m_bInDebugMenu = FALSE;
m_pTipbarWnd = pTipbarWnd;
}
/// @unimplemented
STDMETHODIMP_(void) CTipbarGripper::OnLButtonUp(LONG x, LONG y)
{
#if 0 // FIXME: m_pTipbarWnd
m_pTipbarWnd->RestoreFromStub();
APPBARDATA AppBar = { sizeof(AppBar) };
AppBar.hWnd = ::FindWindowW(L"Shell_TrayWnd", NULL);
if (::SHAppBarMessage(ABM_GETTASKBARPOS, &AppBar))
{
RECT rc = AppBar.rc;
POINT pt;
::GetCursorPos(&pt);
if (g_pTipbarWnd && ::PtInRect(&rc, pt))
g_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND | TF_SFT_EXTRAICONSONMINIMIZED);
}
CUIFGripper::OnLButtonUp(x, y);
m_pTipbarWnd->UpdatePosFlags();
#endif
}
/// @unimplemented
STDMETHODIMP_(void) CTipbarGripper::OnRButtonUp(LONG x, LONG y)
{
if (g_bShowDebugMenu)
{
// FIXME: Debugging feature
}
}
STDMETHODIMP_(BOOL) CTipbarGripper::OnSetCursor(UINT uMsg, LONG x, LONG y)
{
if (m_bInDebugMenu)
return FALSE;
return CUIFGripper::OnSetCursor(uMsg, x, y);
}
/***********************************************************************
* GetLibTls (MSUTB.@)
*