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 #ifndef XFA_FXFA_APP_XFA_FFCHECKBUTTON_H_ | 7 #ifndef XFA_FXFA_APP_XFA_FFCHECKBUTTON_H_ |
8 #define XFA_FXFA_APP_XFA_FFCHECKBUTTON_H_ | 8 #define XFA_FXFA_APP_XFA_FFCHECKBUTTON_H_ |
9 | 9 |
10 #include "xfa/fxfa/app/xfa_fffield.h" | 10 #include "xfa/fxfa/app/xfa_fffield.h" |
11 #include "xfa/fxfa/include/xfa_ffpageview.h" | 11 #include "xfa/fxfa/include/xfa_ffpageview.h" |
12 | 12 |
13 class CXFA_FFCheckButton : public CXFA_FFField { | 13 class CXFA_FFCheckButton : public CXFA_FFField { |
14 public: | 14 public: |
15 CXFA_FFCheckButton(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); | 15 CXFA_FFCheckButton(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); |
16 virtual ~CXFA_FFCheckButton(); | 16 ~CXFA_FFCheckButton() override; |
17 virtual void RenderWidget(CFX_Graphics* pGS, | |
18 CFX_Matrix* pMatrix = NULL, | |
19 uint32_t dwStatus = 0, | |
20 int32_t iRotate = 0); | |
21 | 17 |
22 virtual FX_BOOL LoadWidget(); | 18 // CXFA_FFField |
23 virtual FX_BOOL PerformLayout(); | 19 void RenderWidget(CFX_Graphics* pGS, |
24 virtual FX_BOOL UpdateFWLData(); | 20 CFX_Matrix* pMatrix = NULL, |
25 virtual void UpdateWidgetProperty(); | 21 uint32_t dwStatus = 0, |
26 virtual FX_BOOL OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); | 22 int32_t iRotate = 0) override; |
| 23 |
| 24 FX_BOOL LoadWidget() override; |
| 25 FX_BOOL PerformLayout() override; |
| 26 FX_BOOL UpdateFWLData() override; |
| 27 void UpdateWidgetProperty() override; |
| 28 FX_BOOL OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; |
| 29 void OnProcessMessage(CFWL_Message* pMessage) override; |
| 30 void OnProcessEvent(CFWL_Event* pEvent) override; |
| 31 void OnDrawWidget(CFX_Graphics* pGraphics, |
| 32 const CFX_Matrix* pMatrix = NULL) override; |
| 33 |
27 void SetFWLCheckState(XFA_CHECKSTATE eCheckState); | 34 void SetFWLCheckState(XFA_CHECKSTATE eCheckState); |
28 virtual void OnProcessMessage(CFWL_Message* pMessage); | |
29 virtual void OnProcessEvent(CFWL_Event* pEvent); | |
30 virtual void OnDrawWidget(CFX_Graphics* pGraphics, | |
31 const CFX_Matrix* pMatrix = NULL); | |
32 | 35 |
33 protected: | 36 protected: |
34 virtual FX_BOOL CommitData(); | 37 FX_BOOL CommitData() override; |
35 virtual FX_BOOL IsDataChanged(); | 38 FX_BOOL IsDataChanged() override; |
| 39 |
36 void CapLeftRightPlacement(CXFA_Margin mgCap); | 40 void CapLeftRightPlacement(CXFA_Margin mgCap); |
37 void AddUIMargin(int32_t iCapPlacement); | 41 void AddUIMargin(int32_t iCapPlacement); |
38 XFA_CHECKSTATE FWLState2XFAState(); | 42 XFA_CHECKSTATE FWLState2XFAState(); |
39 IFWL_WidgetDelegate* m_pOldDelegate; | 43 IFWL_WidgetDelegate* m_pOldDelegate; |
40 CFX_RectF m_rtCheckBox; | 44 CFX_RectF m_rtCheckBox; |
41 }; | 45 }; |
42 | 46 |
43 #endif // XFA_FXFA_APP_XFA_FFCHECKBUTTON_H_ | 47 #endif // XFA_FXFA_APP_XFA_FFCHECKBUTTON_H_ |
OLD | NEW |