https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5901716c078e06d517986b8992fc8d7ce7f781bd

commit 5901716c078e06d517986b8992fc8d7ce7f781bd
Author:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
AuthorDate: Thu Feb 8 20:31:01 2024 +0900
Commit:     GitHub <nore...@github.com>
CommitDate: Thu Feb 8 20:31:01 2024 +0900

    [MSUTB] Add CTipbarGripper (#6462)
    
    Supporting Language Bar...
    JIRA issue: CORE-19363
    - Half-implement CTipbarGripper class.
---
 dll/win32/msutb/msutb.cpp | 68 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/dll/win32/msutb/msutb.cpp b/dll/win32/msutb/msutb.cpp
index 899d51d5442..b582e7421fd 100644
--- a/dll/win32/msutb/msutb.cpp
+++ b/dll/win32/msutb/msutb.cpp
@@ -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.@)
  *

Reply via email to