FX_BOOL CPDFSDK_XFAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point) { if (!pPageView || !pAnnot) return FALSE; CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); if (!pSDKDoc) return FALSE; CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); if (!pDoc) return FALSE; IXFA_DocView* pDocView = pDoc->GetXFADocView(); if (!pDocView) return FALSE; IXFA_WidgetHandler* pWidgetHandler = pDocView->GetWidgetHandler(); if (!pWidgetHandler) return FALSE; FX_DWORD dwHitTest = pWidgetHandler->OnHitTest(pAnnot->GetXFAWidget(), point.x, point.y); return (dwHitTest != FWL_WGTHITTEST_Unknown); }
FX_BOOL CPDFSDK_XFAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); if (!pSDKDoc) return FALSE; CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); if (!pDoc) return FALSE; CXFA_FFDocView* pDocView = pDoc->GetXFADocView(); if (!pDocView) return FALSE; CXFA_FFWidgetHandler* pWidgetHandler = pDocView->GetWidgetHandler(); if (!pWidgetHandler) return FALSE; FWL_WidgetHit dwHitTest = pWidgetHandler->OnHitTest(pAnnot->GetXFAWidget(), point.x, point.y); return dwHitTest != FWL_WidgetHit::Unknown; }
IXFA_WidgetHandler* CPDFSDK_XFAAnnotHandler::GetXFAWidgetHandler( CPDFSDK_Annot* pAnnot) { if (!pAnnot) return NULL; CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); if (!pPageView) return NULL; CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); if (!pSDKDoc) return NULL; CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); if (!pDoc) return NULL; IXFA_DocView* pDocView = pDoc->GetXFADocView(); if (!pDocView) return NULL; return pDocView->GetWidgetHandler(); }