| 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_FWL_THEME_CFWL_CHECKBOXTP_H_ | 7 #ifndef XFA_FWL_THEME_CFWL_CHECKBOXTP_H_ |
| 8 #define XFA_FWL_THEME_CFWL_CHECKBOXTP_H_ | 8 #define XFA_FWL_THEME_CFWL_CHECKBOXTP_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "xfa/fwl/theme/cfwl_utils.h" | 12 #include "xfa/fwl/theme/cfwl_utils.h" |
| 13 #include "xfa/fwl/theme/cfwl_widgettp.h" | 13 #include "xfa/fwl/theme/cfwl_widgettp.h" |
| 14 | 14 |
| 15 class CFWL_CheckBoxTP : public CFWL_WidgetTP { | 15 class CFWL_CheckBoxTP : public CFWL_WidgetTP { |
| 16 public: | 16 public: |
| 17 CFWL_CheckBoxTP(); | 17 CFWL_CheckBoxTP(); |
| 18 ~CFWL_CheckBoxTP() override; | 18 ~CFWL_CheckBoxTP() override; |
| 19 | 19 |
| 20 // CFWL_WidgeTP | 20 // CFWL_WidgeTP |
| 21 void Initialize() override; | 21 void Initialize() override; |
| 22 void Finalize() override; | 22 void Finalize() override; |
| 23 bool IsValidWidget(IFWL_Widget* pWidget) override; | 23 bool IsValidWidget(CFWL_Widget* pWidget) override; |
| 24 void DrawText(CFWL_ThemeText* pParams) override; | 24 void DrawText(CFWL_ThemeText* pParams) override; |
| 25 void DrawBackground(CFWL_ThemeBackground* pParams) override; | 25 void DrawBackground(CFWL_ThemeBackground* pParams) override; |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 struct CKBThemeData { | 28 struct CKBThemeData { |
| 29 FX_ARGB clrBoxBk[13][2]; | 29 FX_ARGB clrBoxBk[13][2]; |
| 30 FX_ARGB clrSignBorderNormal; | 30 FX_ARGB clrSignBorderNormal; |
| 31 FX_ARGB clrSignBorderDisable; | 31 FX_ARGB clrSignBorderDisable; |
| 32 FX_ARGB clrSignCheck; | 32 FX_ARGB clrSignCheck; |
| 33 FX_ARGB clrSignNeutral; | 33 FX_ARGB clrSignNeutral; |
| 34 FX_ARGB clrSignNeutralNormal; | 34 FX_ARGB clrSignNeutralNormal; |
| 35 FX_ARGB clrSignNeutralHover; | 35 FX_ARGB clrSignNeutralHover; |
| 36 FX_ARGB clrSignNeutralPressed; | 36 FX_ARGB clrSignNeutralPressed; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 void DrawCheckSign(IFWL_Widget* pWidget, | 39 void DrawCheckSign(CFWL_Widget* pWidget, |
| 40 CFX_Graphics* pGraphics, | 40 CFX_Graphics* pGraphics, |
| 41 const CFX_RectF& pRtBox, | 41 const CFX_RectF& pRtBox, |
| 42 int32_t iState, | 42 int32_t iState, |
| 43 CFX_Matrix* pMatrix); | 43 CFX_Matrix* pMatrix); |
| 44 void DrawSignCheck(CFX_Graphics* pGraphics, | 44 void DrawSignCheck(CFX_Graphics* pGraphics, |
| 45 const CFX_RectF* pRtSign, | 45 const CFX_RectF* pRtSign, |
| 46 FX_ARGB argbFill, | 46 FX_ARGB argbFill, |
| 47 CFX_Matrix* pMatrix); | 47 CFX_Matrix* pMatrix); |
| 48 void DrawSignCircle(CFX_Graphics* pGraphics, | 48 void DrawSignCircle(CFX_Graphics* pGraphics, |
| 49 const CFX_RectF* pRtSign, | 49 const CFX_RectF* pRtSign, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 69 void InitCheckPath(FX_FLOAT fCheckLen); | 69 void InitCheckPath(FX_FLOAT fCheckLen); |
| 70 | 70 |
| 71 std::unique_ptr<CKBThemeData> m_pThemeData; | 71 std::unique_ptr<CKBThemeData> m_pThemeData; |
| 72 std::unique_ptr<CFX_Path> m_pCheckPath; | 72 std::unique_ptr<CFX_Path> m_pCheckPath; |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 void SetThemeData(); | 75 void SetThemeData(); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 #endif // XFA_FWL_THEME_CFWL_CHECKBOXTP_H_ | 78 #endif // XFA_FWL_THEME_CFWL_CHECKBOXTP_H_ |
| OLD | NEW |