• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef FPDFSDK_FORMFILLER_CFFL_RADIOBUTTON_H_
8 #define FPDFSDK_FORMFILLER_CFFL_RADIOBUTTON_H_
9 
10 #include <memory>
11 
12 #include "fpdfsdk/formfiller/cffl_button.h"
13 
14 class CPWL_RadioButton;
15 
16 class CFFL_RadioButton final : public CFFL_Button {
17  public:
18   CFFL_RadioButton(CPDFSDK_FormFillEnvironment* pApp, CPDFSDK_Widget* pWidget);
19   ~CFFL_RadioButton() override;
20 
21   // CFFL_Button:
22   std::unique_ptr<CPWL_Wnd> NewPWLWindow(
23       const CPWL_Wnd::CreateParams& cp,
24       std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
25       override;
26   bool OnKeyDown(uint32_t nKeyCode, uint32_t nFlags) override;
27   bool OnChar(CPDFSDK_Annot* pAnnot, uint32_t nChar, uint32_t nFlags) override;
28   bool OnLButtonUp(CPDFSDK_PageView* pPageView,
29                    CPDFSDK_Annot* pAnnot,
30                    uint32_t nFlags,
31                    const CFX_PointF& point) override;
32   bool IsDataChanged(CPDFSDK_PageView* pPageView) override;
33   void SaveData(CPDFSDK_PageView* pPageView) override;
34 
35  private:
36   CPWL_RadioButton* GetRadioButton(CPDFSDK_PageView* pPageView, bool bNew);
37 };
38 
39 #endif  // FPDFSDK_FORMFILLER_CFFL_RADIOBUTTON_H_
40