本文整理汇总了C++中CPDFSDK_PageView::GetPDFXFAPage方法的典型用法代码示例。如果您正苦于以下问题:C++ CPDFSDK_PageView::GetPDFXFAPage方法的具体用法?C++ CPDFSDK_PageView::GetPDFXFAPage怎么用?C++ CPDFSDK_PageView::GetPDFXFAPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPDFSDK_PageView
的用法示例。
在下文中一共展示了CPDFSDK_PageView::GetPDFXFAPage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetNextAnnot
CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,
bool bNext) {
#ifdef PDF_ENABLE_XFA
CPDFSDK_PageView* pPageView = pSDKAnnot->GetPageView();
CPDFXFA_Page* pPage = pPageView->GetPDFXFAPage();
if (pPage && !pPage->AsPDFPage()) {
// For xfa annots in XFA pages not backed by PDF pages.
std::unique_ptr<IXFA_WidgetIterator> pWidgetIterator(
pPage->GetXFAPageView()->CreateWidgetIterator(
XFA_TRAVERSEWAY_Tranvalse, XFA_WidgetStatus_Visible |
XFA_WidgetStatus_Viewable |
XFA_WidgetStatus_Focused));
if (!pWidgetIterator)
return nullptr;
if (pWidgetIterator->GetCurrentWidget() != pSDKAnnot->GetXFAWidget())
pWidgetIterator->SetCurrentWidget(pSDKAnnot->GetXFAWidget());
CXFA_FFWidget* hNextFocus = bNext ? pWidgetIterator->MoveToNext()
: pWidgetIterator->MoveToPrevious();
if (!hNextFocus && pSDKAnnot)
hNextFocus = pWidgetIterator->MoveToFirst();
return pPageView->GetAnnotByXFAWidget(hNextFocus);
}
#endif // PDF_ENABLE_XFA
// For PDF annots.
CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pSDKAnnot);
CPDFSDK_AnnotIterator ai(pWidget->GetPageView(), pWidget->GetAnnotSubtype());
return bNext ? ai.GetNextAnnot(pWidget) : ai.GetPrevAnnot(pWidget);
}
示例2: GetNextAnnot
CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,
FX_BOOL bNext) {
#ifdef PDF_ENABLE_XFA
CPDFSDK_PageView* pPageView = pSDKAnnot->GetPageView();
CPDFXFA_Page* pPage = pPageView->GetPDFXFAPage();
if (!pPage)
return nullptr;
if (pPage->GetPDFPage()) { // for pdf annots.
CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), pSDKAnnot->GetType(), "");
CPDFSDK_Annot* pNext =
bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot);
return pNext;
}
// for xfa annots
std::unique_ptr<IXFA_WidgetIterator> pWidgetIterator(
pPage->GetXFAPageView()->CreateWidgetIterator(
XFA_TRAVERSEWAY_Tranvalse, XFA_WidgetStatus_Visible |
XFA_WidgetStatus_Viewable |
XFA_WidgetStatus_Focused));
if (!pWidgetIterator)
return nullptr;
if (pWidgetIterator->GetCurrentWidget() != pSDKAnnot->GetXFAWidget())
pWidgetIterator->SetCurrentWidget(pSDKAnnot->GetXFAWidget());
CXFA_FFWidget* hNextFocus =
bNext ? pWidgetIterator->MoveToNext() : pWidgetIterator->MoveToPrevious();
if (!hNextFocus && pSDKAnnot)
hNextFocus = pWidgetIterator->MoveToFirst();
return pPageView->GetAnnotByXFAWidget(hNextFocus);
#else // PDF_ENABLE_XFA
CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), "Widget", "");
return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot);
#endif // PDF_ENABLE_XFA
}
示例3: GetNextAnnot
CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,
FX_BOOL bNext) {
#ifdef PDF_ENABLE_XFA
CPDFSDK_PageView* pPageView = pSDKAnnot->GetPageView();
CPDFXFA_Page* pPage = pPageView->GetPDFXFAPage();
if (pPage == NULL)
return NULL;
if (pPage->GetPDFPage()) { // for pdf annots.
CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), pSDKAnnot->GetType(), "");
CPDFSDK_Annot* pNext =
bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot);
return pNext;
}
// for xfa annots
IXFA_WidgetIterator* pWidgetIterator =
pPage->GetXFAPageView()->CreateWidgetIterator(
XFA_TRAVERSEWAY_Tranvalse, XFA_WIDGETFILTER_Visible |
XFA_WIDGETFILTER_Viewable |
XFA_WIDGETFILTER_Field);
if (pWidgetIterator == NULL)
return NULL;
if (pWidgetIterator->GetCurrentWidget() != pSDKAnnot->GetXFAWidget())
pWidgetIterator->SetCurrentWidget(pSDKAnnot->GetXFAWidget());
IXFA_Widget* hNextFocus = NULL;
hNextFocus =
bNext ? pWidgetIterator->MoveToNext() : pWidgetIterator->MoveToPrevious();
if (hNextFocus == NULL && pSDKAnnot != NULL)
hNextFocus = pWidgetIterator->MoveToFirst();
pWidgetIterator->Release();
return pPageView->GetAnnotByXFAWidget(hNextFocus);
#else // PDF_ENABLE_XFA
CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), "Widget", "");
return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot);
#endif // PDF_ENABLE_XFA
}