Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: xfa/fwl/theme/cfwl_checkboxtp.h

Issue 2230813002: Use smart pointers for class owned pointers in xfa/fwl/theme (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | xfa/fwl/theme/cfwl_checkboxtp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/theme/cfwl_checkboxtp.h
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.h b/xfa/fwl/theme/cfwl_checkboxtp.h
index ce44f70aeff29de9cc42094ddb4eefebd05d6704..42d86d180f4f5c8ff5c0f4165b23c5d122641eb1 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_
« no previous file with comments | « no previous file | xfa/fwl/theme/cfwl_checkboxtp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698