Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: xfa/fwl/core/ifwl_form.cpp

Issue 2459423003: Rename IFWL_Widget::SetDelegate (Closed)
Patch Set: Review feedback Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_datetimepicker.cpp ('k') | xfa/fwl/core/ifwl_formproxy.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/core/ifwl_form.h" 7 #include "xfa/fwl/core/ifwl_form.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 case CFWL_MessageType::Deactivate: { 823 case CFWL_MessageType::Deactivate: {
824 m_pOwner->m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated; 824 m_pOwner->m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated;
825 const IFWL_App* pApp = m_pOwner->GetOwnerApp(); 825 const IFWL_App* pApp = m_pOwner->GetOwnerApp();
826 CFWL_NoteDriver* pDriver = 826 CFWL_NoteDriver* pDriver =
827 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); 827 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
828 IFWL_Widget* pSubFocus = m_pOwner->GetSubFocus(); 828 IFWL_Widget* pSubFocus = m_pOwner->GetSubFocus();
829 if (pSubFocus) { 829 if (pSubFocus) {
830 if (pSubFocus == pDriver->GetFocus()) { 830 if (pSubFocus == pDriver->GetFocus()) {
831 pDriver->SetFocus(nullptr); 831 pDriver->SetFocus(nullptr);
832 } else if (pSubFocus->GetStates() & FWL_WGTSTATE_Focused) { 832 } else if (pSubFocus->GetStates() & FWL_WGTSTATE_Focused) {
833 CFWL_MsgKillFocus ms; 833 if (IFWL_WidgetDelegate* pDelegate =
834 IFWL_WidgetDelegate* pDelegate = pSubFocus->SetDelegate(nullptr); 834 pSubFocus->GetCurrentDelegate()) {
835 if (pDelegate) 835 CFWL_MsgKillFocus ms;
836 pDelegate->OnProcessMessage(&ms); 836 pDelegate->OnProcessMessage(&ms);
837 }
837 } 838 }
838 } 839 }
839 m_pOwner->Repaint(&m_pOwner->m_rtRelative); 840 m_pOwner->Repaint(&m_pOwner->m_rtRelative);
840 break; 841 break;
841 } 842 }
842 case CFWL_MessageType::Mouse: { 843 case CFWL_MessageType::Mouse: {
843 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); 844 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
844 switch (pMsg->m_dwCmd) { 845 switch (pMsg->m_dwCmd) {
845 case FWL_MouseCommand::LeftButtonDown: { 846 case FWL_MouseCommand::LeftButtonDown: {
846 OnLButtonDown(pMsg); 847 OnLButtonDown(pMsg);
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 1095
1095 uint32_t CFWL_SysBtn::GetPartState() const { 1096 uint32_t CFWL_SysBtn::GetPartState() const {
1096 if (IsDisabled()) 1097 if (IsDisabled())
1097 return CFWL_PartState_Disabled; 1098 return CFWL_PartState_Disabled;
1098 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed) 1099 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed)
1099 return CFWL_PartState_Pressed; 1100 return CFWL_PartState_Pressed;
1100 if (m_dwState & FWL_SYSBUTTONSTATE_Hover) 1101 if (m_dwState & FWL_SYSBUTTONSTATE_Hover)
1101 return CFWL_PartState_Hovered; 1102 return CFWL_PartState_Hovered;
1102 return CFWL_PartState_Normal; 1103 return CFWL_PartState_Normal;
1103 } 1104 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_datetimepicker.cpp ('k') | xfa/fwl/core/ifwl_formproxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698