diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-16 07:01:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-16 07:01:26 -0800 |
commit | 72f957a0bafaf7c9628980e404c471b54f42de8f (patch) | |
tree | 1b6764bfdb0f87c01843397f16f191906d6810ec /xfa/fwl/core/ifwl_form.cpp | |
parent | f35650c8778522345d8a639f42add2874ffe44dd (diff) | |
download | pdfium-72f957a0bafaf7c9628980e404c471b54f42de8f.tar.xz |
Cleaning up nits in fwl/core files.chromium/2922
This Cl cleans up the nits in the first set of cfwl_* files. The unused Event
and Message classes are removed.
Review-Url: https://codereview.chromium.org/2505703003
Diffstat (limited to 'xfa/fwl/core/ifwl_form.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_form.cpp | 86 |
1 files changed, 1 insertions, 85 deletions
diff --git a/xfa/fwl/core/ifwl_form.cpp b/xfa/fwl/core/ifwl_form.cpp index 9e632a009a..42827ab759 100644 --- a/xfa/fwl/core/ifwl_form.cpp +++ b/xfa/fwl/core/ifwl_form.cpp @@ -666,62 +666,13 @@ void IFWL_Form::UpdateCaption() { } #ifdef FWL_UseMacSystemBorder -void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) { - if (!pMessage) - return; - - switch (pMessage->GetClassID()) { - case CFWL_MessageType::Activate: { - m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated; - Repaint(&m_rtRelative); - break; - } - case CFWL_MessageType::Deactivate: { - m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated; - Repaint(&m_rtRelative); - break; - } - default: - break; - } -} +void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {} #else void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return; switch (pMessage->GetClassID()) { - case CFWL_MessageType::Activate: { - m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated; - const IFWL_App* pApp = GetOwnerApp(); - CFWL_NoteDriver* pDriver = - static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); - IFWL_Widget* pSubFocus = GetSubFocus(); - if (pSubFocus && pSubFocus != pDriver->GetFocus()) - pDriver->SetFocus(pSubFocus); - - Repaint(&m_rtRelative); - break; - } - case CFWL_MessageType::Deactivate: { - m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated; - const IFWL_App* pApp = GetOwnerApp(); - CFWL_NoteDriver* pDriver = - static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); - IFWL_Widget* pSubFocus = GetSubFocus(); - if (pSubFocus) { - if (pSubFocus == pDriver->GetFocus()) { - pDriver->SetFocus(nullptr); - } else if (pSubFocus->GetStates() & FWL_WGTSTATE_Focused) { - if (IFWL_WidgetDelegate* pDelegate = pSubFocus->GetDelegate()) { - CFWL_MsgKillFocus ms; - pDelegate->OnProcessMessage(&ms); - } - } - } - Repaint(&m_rtRelative); - break; - } case CFWL_MessageType::Mouse: { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); switch (pMsg->m_dwCmd) { @@ -745,30 +696,6 @@ void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) { } break; } - case CFWL_MessageType::Size: { - CFWL_WidgetMgr* pWidgetMgr = GetOwnerApp()->GetWidgetMgr(); - if (!pWidgetMgr) - return; - - pWidgetMgr->AddRedrawCounts(this); - if (!m_bSetMaximize) - break; - - m_bSetMaximize = false; - CFWL_MsgSize* pMsg = static_cast<CFWL_MsgSize*>(pMessage); - m_pProperties->m_rtWidget.left = 0; - m_pProperties->m_rtWidget.top = 0; - m_pProperties->m_rtWidget.width = (FX_FLOAT)pMsg->m_iWidth; - m_pProperties->m_rtWidget.height = (FX_FLOAT)pMsg->m_iHeight; - Update(); - break; - } - case CFWL_MessageType::WindowMove: - OnWindowMove(static_cast<CFWL_MsgWindowMove*>(pMessage)); - break; - case CFWL_MessageType::Close: - OnClose(static_cast<CFWL_MsgClose*>(pMessage)); - break; default: break; } @@ -901,17 +828,6 @@ void IFWL_Form::OnLButtonDblClk(CFWL_MsgMouse* pMsg) { } } -void IFWL_Form::OnWindowMove(CFWL_MsgWindowMove* pMsg) { - m_pProperties->m_rtWidget.left = pMsg->m_fx; - m_pProperties->m_rtWidget.top = pMsg->m_fy; -} - -void IFWL_Form::OnClose(CFWL_MsgClose* pMsg) { - CFWL_EvtClose eClose; - eClose.m_pSrcTarget = this; - DispatchEvent(&eClose); -} - CFWL_SysBtn::CFWL_SysBtn() { m_rtBtn.Set(0, 0, 0, 0); m_dwState = 0; |