本文整理汇总了C++中GetFormFiller函数的典型用法代码示例。如果您正苦于以下问题:C++ GetFormFiller函数的具体用法?C++ GetFormFiller怎么用?C++ GetFormFiller使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetFormFiller函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ASSERT
void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_UINT nFlag) {
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
if (!m_bNotifying) {
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::CursorExit).GetDict()) {
m_bNotifying = TRUE;
pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
pWidget->ClearAppModified();
ASSERT(pPageView);
PDFSDK_FieldAction fa;
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView);
m_bNotifying = FALSE;
if (pWidget->IsAppModified()) {
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) {
pFormFiller->ResetPDFWindow(pPageView,
nValueAge == pWidget->GetValueAge());
}
}
}
}
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) {
pFormFiller->OnMouseExit(pPageView, pAnnot);
}
}
示例2: 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;
}
示例3: ASSERT
void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView,
/*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice,
CPDF_Matrix* pUser2Device,
/*const CRect& rcWindow,*/ FX_DWORD dwFlags) {
ASSERT(pPageView != NULL);
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (IsVisible(pWidget)) {
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) {
if (pFormFiller->IsValid()) {
pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags);
pAnnot->GetPDFPage();
CPDFSDK_Document* pDocument = m_pApp->GetSDKDocument();
if (pDocument->GetFocusAnnot() == pAnnot) {
CPDF_Rect rcFocus = pFormFiller->GetFocusBox(pPageView);
if (!rcFocus.IsEmpty()) {
CFX_PathData path;
path.SetPointCount(5);
path.SetPoint(0, rcFocus.left, rcFocus.top, FXPT_MOVETO);
path.SetPoint(1, rcFocus.left, rcFocus.bottom, FXPT_LINETO);
path.SetPoint(2, rcFocus.right, rcFocus.bottom, FXPT_LINETO);
path.SetPoint(3, rcFocus.right, rcFocus.top, FXPT_LINETO);
path.SetPoint(4, rcFocus.left, rcFocus.top, FXPT_LINETO);
CFX_GraphStateData gsd;
gsd.SetDashCount(1);
gsd.m_DashArray[0] = 1.0f;
gsd.m_DashPhase = 0;
gsd.m_LineWidth = 1.0f;
pDevice->DrawPath(&path, pUser2Device, &gsd, 0,
ArgbEncode(255, 0, 0, 0), FXFILL_ALTERNATE);
}
}
return;
}
}
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
pFormFiller->OnDrawDeactive(pPageView, pAnnot, pDevice, pUser2Device,
dwFlags);
else
pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
if (!IsReadOnly(pWidget) && IsFillingAllowed(pWidget))
pWidget->DrawShadow(pDevice, pPageView);
}
}
示例4: OnPostOpen
void CFFL_IFormFiller::OnPostOpen(CPDFSDK_Widget* pWidget,
CPDFSDK_PageView* pPageView,
FX_BOOL& bReset,
FX_BOOL& bExit,
FX_UINT nFlag) {
if (!m_bNotifying) {
if (pWidget->HasXFAAAction(PDFSDK_XFA_PostOpen)) {
m_bNotifying = TRUE;
int nAge = pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, fa, pPageView);
m_bNotifying = FALSE;
if (!IsValidAnnot(pPageView, pWidget)) {
bExit = TRUE;
return;
}
if (nAge != pWidget->GetAppearanceAge()) {
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) {
pFormFiller->ResetPDFWindow(pPageView,
nValueAge == pWidget->GetValueAge());
}
bReset = TRUE;
}
}
}
}
示例5: GetViewBBox
FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot)
{
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
return pFormFiller->GetViewBBox(pPageView, pAnnot);
}
else
{
ASSERT(pPageView != NULL);
ASSERT(pAnnot != NULL);
CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot();
ASSERT(pPDFAnnot != NULL);
CPDF_Rect rcAnnot;
pPDFAnnot->GetRect(rcAnnot);
// CRect rcWin;
// pPageView->DocToWindow(rcAnnot, rcWin);
CPDF_Rect rcWin = CPWL_Utils::InflateRect(rcAnnot,1);
// rcWin.InflateRect(1, 1);
return rcWin.GetOutterRect();
}
}
示例6: OnDelete
void CFFL_IFormFiller::OnDelete(CPDFSDK_Annot* pAnnot) {
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) {
pFormFiller->OnDelete(pAnnot);
}
UnRegisterFormFiller(pAnnot);
}
示例7: OnLoad
void CFFL_IFormFiller::OnLoad(CPDFSDK_Annot* pAnnot)
{
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
pFormFiller->OnLoad(pAnnot);
}
}
示例8: 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;
}
示例9: GetViewBBox
FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot) {
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
return pFormFiller->GetViewBBox(pPageView, pAnnot);
ASSERT(pPageView);
CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot();
CFX_FloatRect rcWin = CPWL_Utils::InflateRect(pPDFAnnot->GetRect(), 1);
return rcWin.GetOuterRect();
}