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

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

Issue 2466273003: Change IFWL_Widget to store a single delegate. (Closed)
Patch Set: Fix Mac 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 "third_party/base/ptr_util.h" 9 #include "third_party/base/ptr_util.h"
10 #include "xfa/fde/tto/fde_textout.h" 10 #include "xfa/fde/tto/fde_textout.h"
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 case CFWL_MessageType::Deactivate: { 814 case CFWL_MessageType::Deactivate: {
815 m_pOwner->m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated; 815 m_pOwner->m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated;
816 const IFWL_App* pApp = m_pOwner->GetOwnerApp(); 816 const IFWL_App* pApp = m_pOwner->GetOwnerApp();
817 CFWL_NoteDriver* pDriver = 817 CFWL_NoteDriver* pDriver =
818 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); 818 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
819 IFWL_Widget* pSubFocus = m_pOwner->GetSubFocus(); 819 IFWL_Widget* pSubFocus = m_pOwner->GetSubFocus();
820 if (pSubFocus) { 820 if (pSubFocus) {
821 if (pSubFocus == pDriver->GetFocus()) { 821 if (pSubFocus == pDriver->GetFocus()) {
822 pDriver->SetFocus(nullptr); 822 pDriver->SetFocus(nullptr);
823 } else if (pSubFocus->GetStates() & FWL_WGTSTATE_Focused) { 823 } else if (pSubFocus->GetStates() & FWL_WGTSTATE_Focused) {
824 if (IFWL_WidgetDelegate* pDelegate = 824 if (IFWL_WidgetDelegate* pDelegate = pSubFocus->GetDelegate()) {
825 pSubFocus->GetCurrentDelegate()) {
826 CFWL_MsgKillFocus ms; 825 CFWL_MsgKillFocus ms;
827 pDelegate->OnProcessMessage(&ms); 826 pDelegate->OnProcessMessage(&ms);
828 } 827 }
829 } 828 }
830 } 829 }
831 m_pOwner->Repaint(&m_pOwner->m_rtRelative); 830 m_pOwner->Repaint(&m_pOwner->m_rtRelative);
832 break; 831 break;
833 } 832 }
834 case CFWL_MessageType::Mouse: { 833 case CFWL_MessageType::Mouse: {
835 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); 834 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 1085
1087 uint32_t CFWL_SysBtn::GetPartState() const { 1086 uint32_t CFWL_SysBtn::GetPartState() const {
1088 if (IsDisabled()) 1087 if (IsDisabled())
1089 return CFWL_PartState_Disabled; 1088 return CFWL_PartState_Disabled;
1090 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed) 1089 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed)
1091 return CFWL_PartState_Pressed; 1090 return CFWL_PartState_Pressed;
1092 if (m_dwState & FWL_SYSBUTTONSTATE_Hover) 1091 if (m_dwState & FWL_SYSBUTTONSTATE_Hover)
1093 return CFWL_PartState_Hovered; 1092 return CFWL_PartState_Hovered;
1094 return CFWL_PartState_Normal; 1093 return CFWL_PartState_Normal;
1095 } 1094 }
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