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 XFA_FWL_THEME_CFWL_CHECKBOXTP_H_ 8 #define XFA_FWL_THEME_CFWL_CHECKBOXTP_H_ 9 10 #include <memory> 11 12 #include "xfa/fwl/theme/cfwl_widgettp.h" 13 14 class CFWL_Widget; 15 16 class CFWL_CheckBoxTP final : public CFWL_WidgetTP { 17 public: 18 CFWL_CheckBoxTP(); 19 ~CFWL_CheckBoxTP() override; 20 21 // CFWL_WidgetTP 22 void DrawBackground(const CFWL_ThemeBackground& pParams) override; 23 void DrawText(const CFWL_ThemeText& pParams) override; 24 25 private: 26 void DrawCheckSign(CFWL_Widget* pWidget, 27 CXFA_Graphics* pGraphics, 28 const CFX_RectF& pRtBox, 29 int32_t iState, 30 const CFX_Matrix& matrix); 31 void DrawSignCheck(CXFA_Graphics* pGraphics, 32 const CFX_RectF& rtSign, 33 FX_ARGB argbFill, 34 const CFX_Matrix& matrix); 35 void DrawSignCircle(CXFA_Graphics* pGraphics, 36 const CFX_RectF& rtSign, 37 FX_ARGB argbFill, 38 const CFX_Matrix& matrix); 39 void DrawSignCross(CXFA_Graphics* pGraphics, 40 const CFX_RectF& rtSign, 41 FX_ARGB argbFill, 42 const CFX_Matrix& matrix); 43 void DrawSignDiamond(CXFA_Graphics* pGraphics, 44 const CFX_RectF& rtSign, 45 FX_ARGB argbFill, 46 const CFX_Matrix& matrix); 47 void DrawSignSquare(CXFA_Graphics* pGraphics, 48 const CFX_RectF& rtSign, 49 FX_ARGB argbFill, 50 const CFX_Matrix& matrix); 51 void DrawSignStar(CXFA_Graphics* pGraphics, 52 const CFX_RectF& rtSign, 53 FX_ARGB argbFill, 54 const CFX_Matrix& matrix); 55 56 void InitCheckPath(float fCheckLen); 57 58 std::unique_ptr<CXFA_GEPath> m_pCheckPath; 59 }; 60 61 #endif // XFA_FWL_THEME_CFWL_CHECKBOXTP_H_ 62