1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "fpdfsdk/formfiller/cffl_pushbutton.h"
8
9 #include "fpdfsdk/formfiller/cffl_formfiller.h"
10 #include "fpdfsdk/pdfwindow/PWL_SpecialButton.h"
11
CFFL_PushButton(CPDFSDK_FormFillEnvironment * pApp,CPDFSDK_Annot * pAnnot)12 CFFL_PushButton::CFFL_PushButton(CPDFSDK_FormFillEnvironment* pApp,
13 CPDFSDK_Annot* pAnnot)
14 : CFFL_Button(pApp, pAnnot) {}
15
~CFFL_PushButton()16 CFFL_PushButton::~CFFL_PushButton() {}
17
NewPDFWindow(const PWL_CREATEPARAM & cp,CPDFSDK_PageView * pPageView)18 CPWL_Wnd* CFFL_PushButton::NewPDFWindow(const PWL_CREATEPARAM& cp,
19 CPDFSDK_PageView* pPageView) {
20 CPWL_PushButton* pWnd = new CPWL_PushButton();
21 pWnd->Create(cp);
22
23 return pWnd;
24 }
25
OnChar(CPDFSDK_Annot * pAnnot,uint32_t nChar,uint32_t nFlags)26 bool CFFL_PushButton::OnChar(CPDFSDK_Annot* pAnnot,
27 uint32_t nChar,
28 uint32_t nFlags) {
29 return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
30 }
31
OnDraw(CPDFSDK_PageView * pPageView,CPDFSDK_Annot * pAnnot,CFX_RenderDevice * pDevice,CFX_Matrix * pUser2Device)32 void CFFL_PushButton::OnDraw(CPDFSDK_PageView* pPageView,
33 CPDFSDK_Annot* pAnnot,
34 CFX_RenderDevice* pDevice,
35 CFX_Matrix* pUser2Device) {
36 CFFL_Button::OnDraw(pPageView, pAnnot, pDevice, pUser2Device);
37 }
38