本文整理汇总了C++中CFFL_FormFiller类的典型用法代码示例。如果您正苦于以下问题:C++ CFFL_FormFiller类的具体用法?C++ CFFL_FormFiller怎么用?C++ CFFL_FormFiller使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CFFL_FormFiller类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ToCPDFSDKWidget
bool CFFL_InteractiveFormFiller::OnValidate(CPDFSDK_Annot::ObservedPtr* pAnnot,
CPDFSDK_PageView* pPageView,
uint32_t nFlag) {
if (m_bNotifying)
return true;
CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot->Get());
if (!pWidget->GetAAction(CPDF_AAction::kValidate).GetDict())
return true;
ASSERT(pPageView);
m_bNotifying = true;
pWidget->ClearAppModified();
CPDFSDK_FieldAction fa;
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
fa.bKeyDown = true;
fa.bRC = true;
CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false);
pFormFiller->GetActionData(pPageView, CPDF_AAction::kValidate, fa);
pFormFiller->SaveState(pPageView);
pWidget->OnAAction(CPDF_AAction::kValidate, &fa, pPageView);
if (!pAnnot->HasObservable())
return true;
m_bNotifying = false;
return fa.bRC;
}
示例2: ASSERT
void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget,
CPDFSDK_PageView* pPageView,
FX_BOOL& bRC,
FX_BOOL& bExit,
FX_DWORD nFlag) {
if (!m_bNotifying) {
if (pWidget->GetAAction(CPDF_AAction::Validate).GetDict()) {
m_bNotifying = TRUE;
pWidget->ClearAppModified();
ASSERT(pPageView);
PDFSDK_FieldAction fa;
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
fa.bKeyDown = TRUE;
fa.bRC = TRUE;
CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE);
pFormFiller->GetActionData(pPageView, CPDF_AAction::Validate, fa);
pFormFiller->SaveState(pPageView);
PDFSDK_FieldAction faOld = fa;
pWidget->OnAAction(CPDF_AAction::Validate, fa, pPageView);
bRC = fa.bRC;
m_bNotifying = FALSE;
}
}
}
示例3: ASSERT
bool CFFL_InteractiveFormFiller::OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlag) {
if (!pAnnot->HasObservable())
return false;
ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), false);
if (!pFormFiller)
return true;
pFormFiller->KillFocusForAnnot(pAnnot->Get(), nFlag);
if (!pAnnot->HasObservable())
return false;
if (m_bNotifying)
return true;
CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot->Get());
if (!pWidget->GetAAction(CPDF_AAction::kLoseFocus).GetDict())
return true;
m_bNotifying = true;
pWidget->ClearAppModified();
CPDFSDK_PageView* pPageView = pWidget->GetPageView();
ASSERT(pPageView);
CPDFSDK_FieldAction fa;
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pFormFiller->GetActionData(pPageView, CPDF_AAction::kLoseFocus, fa);
pWidget->OnAAction(CPDF_AAction::kLoseFocus, &fa, pPageView);
m_bNotifying = false;
return pAnnot->HasObservable();
}
示例4: ASSERT
FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
{
if(!pAnnot) return FALSE;
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
if (!m_bNotifying)
{
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::GetFocus))
{
m_bNotifying = TRUE;
pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
pWidget->ClearAppModified();
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
ASSERT(pPageView != NULL);
PDFSDK_FieldAction fa;
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, TRUE);
if(!pFormFiller) return FALSE;
pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa);
pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView);
m_bNotifying = FALSE;
// if (!IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pAnnot)) return FALSE;
if (pWidget->IsAppModified())
{
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
{
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge());
}
}
}
}
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
{
if (pFormFiller->OnSetFocus(pAnnot, nFlag))
{
return TRUE;
}
else
return FALSE;
}
return TRUE;
}
示例5: OutputSelectedRect
void CFX_SystemHandler::OutputSelectedRect(void* pFormFiller, CPDF_Rect& rect) {
CFFL_FormFiller* pFFL = (CFFL_FormFiller*)pFormFiller;
if (pFFL) {
CPDF_Point leftbottom = CPDF_Point(rect.left, rect.bottom);
CPDF_Point righttop = CPDF_Point(rect.right, rect.top);
CPDF_Point ptA = pFFL->PWLtoFFL(leftbottom);
CPDF_Point ptB = pFFL->PWLtoFFL(righttop);
CPDFSDK_Annot* pAnnot = pFFL->GetSDKAnnot();
ASSERT(pAnnot);
CPDF_Page* pPage = pAnnot->GetPDFPage();
ASSERT(pPage);
m_pEnv->FFI_OutputSelectedRect(pPage, ptA.x, ptB.y, ptB.x, ptA.y);
}
}
示例6: ASSERT
FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) {
if (!pAnnot)
return FALSE;
ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
if (!m_bNotifying) {
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::GetFocus).GetDict()) {
m_bNotifying = TRUE;
pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
pWidget->ClearAppModified();
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
ASSERT(pPageView);
PDFSDK_FieldAction fa;
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, TRUE);
if (!pFormFiller)
return FALSE;
pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa);
pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView);
m_bNotifying = FALSE;
if (pWidget->IsAppModified()) {
if (CFFL_FormFiller* pFiller = GetFormFiller(pWidget, FALSE)) {
pFiller->ResetPDFWindow(pPageView,
nValueAge == pWidget->GetValueAge());
}
}
}
}
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
pFormFiller->SetFocusForAnnot(pAnnot, nFlag);
return TRUE;
}