blob: 8ef3de6bca1fe4fb6c106b15ad3651351cb6415b [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001// 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.
Lei Zhanga6d9f0e2015-06-13 00:48:38 -07004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Dan Sinclairedbb3192016-03-21 09:08:24 -04007#ifndef FPDFSDK_FORMFILLER_CFFL_CHECKBOX_H_
8#define FPDFSDK_FORMFILLER_CFFL_CHECKBOX_H_
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07009
Dan Sinclairb9eed2f2017-07-10 11:35:18 -040010#include "fpdfsdk/formfiller/cffl_button.h"
Tom Sepez245c80e2015-04-08 16:19:33 -070011
Lei Zhang77e3fc52017-06-15 12:37:33 -070012class CPWL_CheckBox;
13
Nico Weber9d8ec5a2015-08-04 13:00:21 -070014class CFFL_CheckBox : public CFFL_Button {
15 public:
dsinclair735606d2016-10-05 15:47:02 -070016 CFFL_CheckBox(CPDFSDK_FormFillEnvironment* pApp, CPDFSDK_Widget* pWidget);
Lei Zhang2b1a2d52015-08-14 22:16:22 -070017 ~CFFL_CheckBox() override;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070018
Tom Sepezbf157302017-09-15 13:26:32 -070019 // CFFL_Button:
20 CPWL_Wnd* NewPDFWindow(const CPWL_Wnd::CreateParams& cp) override;
tsepez4cf55152016-11-02 14:37:54 -070021 bool OnKeyDown(CPDFSDK_Annot* pAnnot,
22 uint32_t nKeyCode,
dsinclair72177da2016-09-15 12:07:23 -070023 uint32_t nFlags) override;
tsepez4cf55152016-11-02 14:37:54 -070024 bool OnChar(CPDFSDK_Annot* pAnnot, uint32_t nChar, uint32_t nFlags) override;
25 bool OnLButtonUp(CPDFSDK_PageView* pPageView,
26 CPDFSDK_Annot* pAnnot,
27 uint32_t nFlags,
Dan Sinclairf528eee2017-02-14 11:52:07 -050028 const CFX_PointF& point) override;
tsepez4cf55152016-11-02 14:37:54 -070029 bool IsDataChanged(CPDFSDK_PageView* pPageView) override;
Lei Zhang2b1a2d52015-08-14 22:16:22 -070030 void SaveData(CPDFSDK_PageView* pPageView) override;
Lei Zhang77e3fc52017-06-15 12:37:33 -070031
32 private:
33 CPWL_CheckBox* GetCheckBox(CPDFSDK_PageView* pPageView, bool bNew);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070034};
35
Dan Sinclairedbb3192016-03-21 09:08:24 -040036#endif // FPDFSDK_FORMFILLER_CFFL_CHECKBOX_H_