summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_checkboxtp.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/theme/cfwl_checkboxtp.h')
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.h51
1 files changed, 28 insertions, 23 deletions
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.h b/xfa/fwl/theme/cfwl_checkboxtp.h
index ce44f70aef..42d86d180f 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.h
+++ b/xfa/fwl/theme/cfwl_checkboxtp.h
@@ -7,6 +7,8 @@
#ifndef XFA_FWL_THEME_CFWL_CHECKBOXTP_H_
#define XFA_FWL_THEME_CFWL_CHECKBOXTP_H_
+#include <memory>
+
#include "xfa/fwl/theme/cfwl_utils.h"
#include "xfa/fwl/theme/cfwl_widgettp.h"
@@ -26,61 +28,64 @@ class CFWL_CheckBoxTP : public CFWL_WidgetTP {
FWL_Error Finalize() override;
protected:
+ struct CKBThemeData {
+ FX_ARGB clrBoxBk[13][2];
+ FX_ARGB clrSignBorderNormal;
+ FX_ARGB clrSignBorderDisable;
+ FX_ARGB clrSignCheck;
+ FX_ARGB clrSignNeutral;
+ FX_ARGB clrSignNeutralNormal;
+ FX_ARGB clrSignNeutralHover;
+ FX_ARGB clrSignNeutralPressed;
+ };
+
void DrawBoxBk(IFWL_Widget* pWidget,
CFX_Graphics* pGraphics,
const CFX_RectF* pRect,
uint32_t dwStates,
- CFX_Matrix* pMatrix = nullptr);
+ CFX_Matrix* pMatrix);
void DrawSign(IFWL_Widget* pWidget,
CFX_Graphics* pGraphics,
const CFX_RectF* pRtBox,
uint32_t dwStates,
- CFX_Matrix* pMatrix = nullptr);
+ CFX_Matrix* pMatrix);
void DrawSignNeutral(CFX_Graphics* pGraphics,
const CFX_RectF* pRtSign,
- CFX_Matrix* pMatrix = nullptr);
+ CFX_Matrix* pMatrix);
void DrawSignCheck(CFX_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
- CFX_Matrix* pMatrix = nullptr);
+ CFX_Matrix* pMatrix);
void DrawSignCircle(CFX_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
- CFX_Matrix* pMatrix = nullptr);
+ CFX_Matrix* pMatrix);
void DrawSignCross(CFX_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
- CFX_Matrix* pMatrix = nullptr);
+ CFX_Matrix* pMatrix);
void DrawSignDiamond(CFX_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
- CFX_Matrix* pMatrix = nullptr);
+ CFX_Matrix* pMatrix);
void DrawSignSquare(CFX_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
- CFX_Matrix* pMatrix = nullptr);
+ CFX_Matrix* pMatrix);
void DrawSignStar(CFX_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
- CFX_Matrix* pMatrix = nullptr);
+ CFX_Matrix* pMatrix);
void DrawSignBorder(IFWL_Widget* pWidget,
CFX_Graphics* pGraphics,
const CFX_RectF* pRtBox,
- FX_BOOL bDisable = FALSE,
- CFX_Matrix* pMatrix = nullptr);
+ FX_BOOL bDisable,
+ CFX_Matrix* pMatrix);
void SetThemeData(uint32_t dwID);
- void initCheckPath(FX_FLOAT fCheckLen);
- struct CKBThemeData {
- FX_ARGB clrBoxBk[13][2];
- FX_ARGB clrSignBorderNormal;
- FX_ARGB clrSignBorderDisable;
- FX_ARGB clrSignCheck;
- FX_ARGB clrSignNeutral;
- FX_ARGB clrSignNeutralNormal;
- FX_ARGB clrSignNeutralHover;
- FX_ARGB clrSignNeutralPressed;
- } * m_pThemeData;
- CFX_Path* m_pCheckPath;
+ void InitCheckPath(FX_FLOAT fCheckLen);
+
+ std::unique_ptr<CKBThemeData> m_pThemeData;
+ std::unique_ptr<CFX_Path> m_pCheckPath;
};
#endif // XFA_FWL_THEME_CFWL_CHECKBOXTP_H_