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

Side by Side Diff: xfa/fxfa/app/xfa_fffield.cpp

Issue 1948583002: Remove FWL_WGTHITTEST_* defines in favour of enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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/fxfa/app/xfa_fffield.h ('k') | xfa/fxfa/app/xfa_ffsignature.h » ('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/fxfa/app/xfa_fffield.h" 7 #include "xfa/fxfa/app/xfa_fffield.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_edit.h" 9 #include "xfa/fwl/basewidget/ifwl_edit.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 } 591 }
592 CFWL_MsgKey ms; 592 CFWL_MsgKey ms;
593 ms.m_dwCmd = FWL_MSGKEYCMD_Char; 593 ms.m_dwCmd = FWL_MSGKEYCMD_Char;
594 ms.m_dwFlags = dwFlags; 594 ms.m_dwFlags = dwFlags;
595 ms.m_dwKeyCode = dwChar; 595 ms.m_dwKeyCode = dwChar;
596 ms.m_pDstTarget = m_pNormalWidget->m_pIface; 596 ms.m_pDstTarget = m_pNormalWidget->m_pIface;
597 ms.m_pSrcTarget = NULL; 597 ms.m_pSrcTarget = NULL;
598 TranslateFWLMessage(&ms); 598 TranslateFWLMessage(&ms);
599 return TRUE; 599 return TRUE;
600 } 600 }
601 uint32_t CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { 601 FWL_WidgetHit CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
602 if (m_pNormalWidget) { 602 if (m_pNormalWidget) {
603 FX_FLOAT ffx = fx, ffy = fy; 603 FX_FLOAT ffx = fx, ffy = fy;
604 FWLToClient(ffx, ffy); 604 FWLToClient(ffx, ffy);
605 uint32_t dwWidgetHit = m_pNormalWidget->HitTest(ffx, ffy); 605 if (m_pNormalWidget->HitTest(ffx, ffy) != FWL_WidgetHit::Unknown)
606 if (dwWidgetHit != FWL_WGTHITTEST_Unknown) { 606 return FWL_WidgetHit::Client;
607 return FWL_WGTHITTEST_Client;
608 }
609 } 607 }
610 CFX_RectF rtBox; 608 CFX_RectF rtBox;
611 GetRectWithoutRotate(rtBox); 609 GetRectWithoutRotate(rtBox);
612 if (!rtBox.Contains(fx, fy)) { 610 if (!rtBox.Contains(fx, fy))
613 return FWL_WGTHITTEST_Unknown; 611 return FWL_WidgetHit::Unknown;
614 } 612 if (m_rtCaption.Contains(fx, fy))
615 if (m_rtCaption.Contains(fx, fy)) { 613 return FWL_WidgetHit::Titlebar;
616 return FWL_WGTHITTEST_Titlebar; 614 return FWL_WidgetHit::Border;
617 }
618 return FWL_WGTHITTEST_Border;
619 } 615 }
620 FX_BOOL CXFA_FFField::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) { 616 FX_BOOL CXFA_FFField::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) {
621 return TRUE; 617 return TRUE;
622 } 618 }
623 FX_BOOL CXFA_FFField::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) { 619 FX_BOOL CXFA_FFField::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
624 if (!m_pNormalWidget) { 620 if (!m_pNormalWidget) {
625 return FALSE; 621 return FALSE;
626 } 622 }
627 CFX_RectF rtWidget; 623 CFX_RectF rtWidget;
628 m_pNormalWidget->GetWidgetRect(rtWidget); 624 m_pNormalWidget->GetWidgetRect(rtWidget);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 default: 826 default:
831 break; 827 break;
832 } 828 }
833 return FWL_ERR_Succeeded; 829 return FWL_ERR_Succeeded;
834 } 830 }
835 831
836 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, 832 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics,
837 const CFX_Matrix* pMatrix) { 833 const CFX_Matrix* pMatrix) {
838 return FWL_ERR_Succeeded; 834 return FWL_ERR_Succeeded;
839 } 835 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_fffield.h ('k') | xfa/fxfa/app/xfa_ffsignature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698