OLD | NEW |
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 "fpdfsdk/formfiller/cffl_formfiller.h" | 7 #include "fpdfsdk/formfiller/cffl_formfiller.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
10 #include "core/fxge/include/cfx_renderdevice.h" | 10 #include "core/fxge/include/cfx_renderdevice.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 return pWnd; | 360 return pWnd; |
361 | 361 |
362 if (found) { | 362 if (found) { |
363 CFFL_PrivateData* pPrivateData = (CFFL_PrivateData*)pWnd->GetAttachedData(); | 363 CFFL_PrivateData* pPrivateData = (CFFL_PrivateData*)pWnd->GetAttachedData(); |
364 if (pPrivateData->nWidgetAge != m_pWidget->GetAppearanceAge()) { | 364 if (pPrivateData->nWidgetAge != m_pWidget->GetAppearanceAge()) { |
365 return ResetPDFWindow( | 365 return ResetPDFWindow( |
366 pPageView, m_pWidget->GetValueAge() == pPrivateData->nValueAge); | 366 pPageView, m_pWidget->GetValueAge() == pPrivateData->nValueAge); |
367 } | 367 } |
368 } else { | 368 } else { |
369 PWL_CREATEPARAM cp = GetCreateParam(); | 369 PWL_CREATEPARAM cp = GetCreateParam(); |
370 cp.hAttachedWnd = (FX_HWND)m_pWidget; | 370 cp.pAttachedWidget = m_pWidget; |
371 | 371 |
372 CFFL_PrivateData* pPrivateData = new CFFL_PrivateData; | 372 CFFL_PrivateData* pPrivateData = new CFFL_PrivateData; |
373 pPrivateData->pWidget = m_pWidget; | 373 pPrivateData->pWidget = m_pWidget; |
374 pPrivateData->pPageView = pPageView; | 374 pPrivateData->pPageView = pPageView; |
375 pPrivateData->nWidgetAge = m_pWidget->GetAppearanceAge(); | 375 pPrivateData->nWidgetAge = m_pWidget->GetAppearanceAge(); |
376 pPrivateData->nValueAge = 0; | 376 pPrivateData->nValueAge = 0; |
377 | 377 |
378 cp.pAttachedData = pPrivateData; | 378 cp.pAttachedData = pPrivateData; |
379 | 379 |
380 pWnd = NewPDFWindow(cp, pPageView); | 380 pWnd = NewPDFWindow(cp, pPageView); |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); | 711 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); |
712 } | 712 } |
713 } | 713 } |
714 | 714 |
715 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, | 715 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, |
716 CPDFSDK_Annot* pAnnot, | 716 CPDFSDK_Annot* pAnnot, |
717 CFX_RenderDevice* pDevice, | 717 CFX_RenderDevice* pDevice, |
718 CFX_Matrix* pUser2Device) { | 718 CFX_Matrix* pUser2Device) { |
719 OnDraw(pPageView, pAnnot, pDevice, pUser2Device); | 719 OnDraw(pPageView, pAnnot, pDevice, pUser2Device); |
720 } | 720 } |
OLD | NEW |