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

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

Issue 1862243002: Remove IFWL_Grid and other grid classes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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/fwl_gridimp.cpp ('k') | xfa/fwl/core/fwl_panelimp.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/fwl_noteimp.h" 7 #include "xfa/fwl/core/fwl_noteimp.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fwl/basewidget/fwl_tooltipctrlimp.h" 10 #include "xfa/fwl/basewidget/fwl_tooltipctrlimp.h"
11 #include "xfa/fwl/basewidget/ifwl_tooltip.h" 11 #include "xfa/fwl/basewidget/ifwl_tooltip.h"
12 #include "xfa/fwl/core/cfwl_message.h" 12 #include "xfa/fwl/core/cfwl_message.h"
13 #include "xfa/fwl/core/fwl_appimp.h" 13 #include "xfa/fwl/core/fwl_appimp.h"
14 #include "xfa/fwl/core/fwl_formimp.h" 14 #include "xfa/fwl/core/fwl_formimp.h"
15 #include "xfa/fwl/core/fwl_panelimp.h" 15 #include "xfa/fwl/core/fwl_panelimp.h"
16 #include "xfa/fwl/core/fwl_targetimp.h" 16 #include "xfa/fwl/core/fwl_targetimp.h"
17 #include "xfa/fwl/core/fwl_threadimp.h" 17 #include "xfa/fwl/core/fwl_threadimp.h"
18 #include "xfa/fwl/core/fwl_widgetimp.h" 18 #include "xfa/fwl/core/fwl_widgetimp.h"
19 #include "xfa/fwl/core/fwl_widgetmgrimp.h" 19 #include "xfa/fwl/core/fwl_widgetmgrimp.h"
20 #include "xfa/fwl/core/ifwl_adapterwidgetmgr.h" 20 #include "xfa/fwl/core/ifwl_adapterwidgetmgr.h"
21 #include "xfa/fwl/core/ifwl_app.h" 21 #include "xfa/fwl/core/ifwl_app.h"
22 #include "xfa/fwl/core/ifwl_grid.h"
23 #include "xfa/fwl/core/ifwl_tooltiptarget.h" 22 #include "xfa/fwl/core/ifwl_tooltiptarget.h"
24 23
25 CFWL_NoteLoop::CFWL_NoteLoop(CFWL_WidgetImp* pForm) 24 CFWL_NoteLoop::CFWL_NoteLoop(CFWL_WidgetImp* pForm)
26 : m_pForm(pForm), m_bContinueModal(TRUE) {} 25 : m_pForm(pForm), m_bContinueModal(TRUE) {}
27 FX_BOOL CFWL_NoteLoop::PreProcessMessage(CFWL_Message* pMessage) { 26 FX_BOOL CFWL_NoteLoop::PreProcessMessage(CFWL_Message* pMessage) {
28 if (!m_pForm) { 27 if (!m_pForm) {
29 return FALSE; 28 return FALSE;
30 } 29 }
31 return TranslateAccelerator(pMessage); 30 return TranslateAccelerator(pMessage);
32 } 31 }
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 if (!DoMouseEx(pMsg, pMessageForm)) { 660 if (!DoMouseEx(pMsg, pMessageForm)) {
662 pMsg->m_pDstTarget = pMessageForm; 661 pMsg->m_pDstTarget = pMessageForm;
663 } 662 }
664 return TRUE; 663 return TRUE;
665 } 664 }
666 FX_BOOL CFWL_NoteDriver::DoWheel(CFWL_MsgMouseWheel* pMsg, 665 FX_BOOL CFWL_NoteDriver::DoWheel(CFWL_MsgMouseWheel* pMsg,
667 IFWL_Widget* pMessageForm) { 666 IFWL_Widget* pMessageForm) {
668 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 667 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr());
669 if (!pWidgetMgr) 668 if (!pWidgetMgr)
670 return FALSE; 669 return FALSE;
670
671 IFWL_Widget* pDst = 671 IFWL_Widget* pDst =
672 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy); 672 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy);
673 if (!pDst) 673 if (!pDst)
674 return FALSE; 674 return FALSE;
675 while (pDst && pDst->GetClassID() == FWL_CLASSHASH_Grid) { 675
676 pDst = pDst->GetParent();
677 }
678 pMessageForm->TransformTo(pDst, pMsg->m_fx, pMsg->m_fy); 676 pMessageForm->TransformTo(pDst, pMsg->m_fx, pMsg->m_fy);
679 pMsg->m_pDstTarget = pDst; 677 pMsg->m_pDstTarget = pDst;
680 return TRUE; 678 return TRUE;
681 } 679 }
682 FX_BOOL CFWL_NoteDriver::DoSize(CFWL_MsgSize* pMsg) { 680 FX_BOOL CFWL_NoteDriver::DoSize(CFWL_MsgSize* pMsg) {
683 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 681 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr());
684 if (!pWidgetMgr) 682 if (!pWidgetMgr)
685 return FALSE; 683 return FALSE;
686 pWidgetMgr->NotifySizeChanged(pMsg->m_pDstTarget, (FX_FLOAT)pMsg->m_iWidth, 684 pWidgetMgr->NotifySizeChanged(pMsg->m_pDstTarget, (FX_FLOAT)pMsg->m_iWidth,
687 (FX_FLOAT)pMsg->m_iHeight); 685 (FX_FLOAT)pMsg->m_iHeight);
(...skipping 11 matching lines...) Expand all
699 IFWL_Widget* pMessageForm) { 697 IFWL_Widget* pMessageForm) {
700 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 698 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr());
701 if (!pWidgetMgr) 699 if (!pWidgetMgr)
702 return FALSE; 700 return FALSE;
703 IFWL_Widget* pTarget = NULL; 701 IFWL_Widget* pTarget = NULL;
704 if (m_pGrab) 702 if (m_pGrab)
705 pTarget = m_pGrab; 703 pTarget = m_pGrab;
706 if (!pTarget) { 704 if (!pTarget) {
707 pTarget = 705 pTarget =
708 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy); 706 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy);
709 while (pTarget && pTarget->GetClassID() == FWL_CLASSHASH_Grid) {
710 pTarget = pTarget->GetParent();
711 }
712 } 707 }
713 if (pTarget) { 708 if (pTarget) {
714 if (pMessageForm != pTarget) { 709 if (pMessageForm != pTarget) {
715 pMessageForm->TransformTo(pTarget, pMsg->m_fx, pMsg->m_fy); 710 pMessageForm->TransformTo(pTarget, pMsg->m_fx, pMsg->m_fy);
716 } 711 }
717 } 712 }
718 if (!pTarget) 713 if (!pTarget)
719 return FALSE; 714 return FALSE;
720 pMsg->m_pDstTarget = pTarget; 715 pMsg->m_pDstTarget = pTarget;
721 return TRUE; 716 return TRUE;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 return NULL; 1081 return NULL;
1087 return widget->GetInterface(); 1082 return widget->GetInterface();
1088 } 1083 }
1089 FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver, 1084 FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver,
1090 FWLMessageHookCallback callback, 1085 FWLMessageHookCallback callback,
1091 void* info) { 1086 void* info) {
1092 CFWL_NoteDriver* noteDriver = static_cast<CFWL_NoteDriver*>(driver); 1087 CFWL_NoteDriver* noteDriver = static_cast<CFWL_NoteDriver*>(driver);
1093 noteDriver->SetHook(callback, info); 1088 noteDriver->SetHook(callback, info);
1094 return FWL_ERR_Succeeded; 1089 return FWL_ERR_Succeeded;
1095 } 1090 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/fwl_gridimp.cpp ('k') | xfa/fwl/core/fwl_panelimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698