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

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

Issue 2459423003: Rename IFWL_Widget::SetDelegate (Closed)
Patch Set: 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
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_datetimecalendar.h" 7 #include "xfa/fwl/core/ifwl_datetimecalendar.h"
8 8
9 #include "xfa/fwl/core/cfwl_widgetmgr.h" 9 #include "xfa/fwl/core/cfwl_widgetmgr.h"
10 #include "xfa/fwl/core/ifwl_datetimepicker.h" 10 #include "xfa/fwl/core/ifwl_datetimepicker.h"
(...skipping 24 matching lines...) Expand all
35 : CFWL_MonthCalendarImpDelegate(pOwner), m_pOwner(pOwner) { 35 : CFWL_MonthCalendarImpDelegate(pOwner), m_pOwner(pOwner) {
36 m_bFlag = FALSE; 36 m_bFlag = FALSE;
37 } 37 }
38 38
39 void CFWL_DateTimeCalendarImpDelegate::OnProcessMessage( 39 void CFWL_DateTimeCalendarImpDelegate::OnProcessMessage(
40 CFWL_Message* pMessage) { 40 CFWL_Message* pMessage) {
41 CFWL_MessageType dwCode = pMessage->GetClassID(); 41 CFWL_MessageType dwCode = pMessage->GetClassID();
42 if (dwCode == CFWL_MessageType::SetFocus || 42 if (dwCode == CFWL_MessageType::SetFocus ||
43 dwCode == CFWL_MessageType::KillFocus) { 43 dwCode == CFWL_MessageType::KillFocus) {
44 IFWL_Widget* pOuter = m_pOwner->GetOuter(); 44 IFWL_Widget* pOuter = m_pOwner->GetOuter();
45 IFWL_WidgetDelegate* pDelegate = pOuter->SetDelegate(nullptr); 45 pOuter->GetCurrentDelegate()->OnProcessMessage(pMessage);
46 pDelegate->OnProcessMessage(pMessage);
47 return; 46 return;
48 } 47 }
49 if (dwCode == CFWL_MessageType::Mouse) { 48 if (dwCode == CFWL_MessageType::Mouse) {
50 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); 49 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
51 if (pMsg->m_dwCmd == FWL_MouseCommand::LeftButtonDown) 50 if (pMsg->m_dwCmd == FWL_MouseCommand::LeftButtonDown)
52 OnLButtonDownEx(pMsg); 51 OnLButtonDownEx(pMsg);
53 else if (pMsg->m_dwCmd == FWL_MouseCommand::LeftButtonUp) 52 else if (pMsg->m_dwCmd == FWL_MouseCommand::LeftButtonUp)
54 OnLButtonUpEx(pMsg); 53 OnLButtonUpEx(pMsg);
55 return; 54 return;
56 } 55 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 rtInvalidate.Union(lpDatesInfo->rect); 206 rtInvalidate.Union(lpDatesInfo->rect);
208 } 207 }
209 m_pOwner->AddSelDay(iCurSel); 208 m_pOwner->AddSelDay(iCurSel);
210 IFWL_DateTimePicker* pDateTime = 209 IFWL_DateTimePicker* pDateTime =
211 static_cast<IFWL_DateTimePicker*>(m_pOwner->m_pOuter); 210 static_cast<IFWL_DateTimePicker*>(m_pOwner->m_pOuter);
212 pDateTime->ProcessSelChanged(m_pOwner->m_iCurYear, m_pOwner->m_iCurMonth, 211 pDateTime->ProcessSelChanged(m_pOwner->m_iCurYear, m_pOwner->m_iCurMonth,
213 iCurSel); 212 iCurSel);
214 pDateTime->ShowMonthCalendar(FALSE); 213 pDateTime->ShowMonthCalendar(FALSE);
215 } 214 }
216 } 215 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698