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

Side by Side Diff: xfa/fwl/basewidget/fwl_scrollbarimp.h

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_pushbuttonimp.cpp ('k') | xfa/fwl/basewidget/fwl_spinbuttonimp.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BASEWIDGET_FWL_SCROLLBARIMP_H_ 7 #ifndef XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_
8 #define XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_ 8 #define XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_
9 9
10 #include "xfa/fwl/core/fwl_widgetimp.h" 10 #include "xfa/fwl/core/fwl_widgetimp.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 FWL_Error SetTrackPos(FX_FLOAT fTrackPos); 47 FWL_Error SetTrackPos(FX_FLOAT fTrackPos);
48 FX_BOOL DoScroll(uint32_t dwCode, FX_FLOAT fPos = 0.0f); 48 FX_BOOL DoScroll(uint32_t dwCode, FX_FLOAT fPos = 0.0f);
49 FWL_Error SetOuter(IFWL_Widget* pOuter); 49 FWL_Error SetOuter(IFWL_Widget* pOuter);
50 50
51 protected: 51 protected:
52 friend class CFWL_ScrollBarImpDelegate; 52 friend class CFWL_ScrollBarImpDelegate;
53 53
54 void DrawTrack(CFX_Graphics* pGraphics, 54 void DrawTrack(CFX_Graphics* pGraphics,
55 IFWL_ThemeProvider* pTheme, 55 IFWL_ThemeProvider* pTheme,
56 FX_BOOL bLower = TRUE, 56 FX_BOOL bLower = TRUE,
57 const CFX_Matrix* pMatrix = NULL); 57 const CFX_Matrix* pMatrix = nullptr);
58 void DrawArrowBtn(CFX_Graphics* pGraphics, 58 void DrawArrowBtn(CFX_Graphics* pGraphics,
59 IFWL_ThemeProvider* pTheme, 59 IFWL_ThemeProvider* pTheme,
60 FX_BOOL bMinBtn = TRUE, 60 FX_BOOL bMinBtn = TRUE,
61 const CFX_Matrix* pMatrix = NULL); 61 const CFX_Matrix* pMatrix = nullptr);
62 void DrawThumb(CFX_Graphics* pGraphics, 62 void DrawThumb(CFX_Graphics* pGraphics,
63 IFWL_ThemeProvider* pTheme, 63 IFWL_ThemeProvider* pTheme,
64 const CFX_Matrix* pMatrix = NULL); 64 const CFX_Matrix* pMatrix = nullptr);
65 void Layout(); 65 void Layout();
66 void CalcButtonLen(); 66 void CalcButtonLen();
67 void CalcMinButtonRect(CFX_RectF& rect); 67 void CalcMinButtonRect(CFX_RectF& rect);
68 void CalcMaxButtonRect(CFX_RectF& rect); 68 void CalcMaxButtonRect(CFX_RectF& rect);
69 void CalcThumbButtonRect(CFX_RectF& rect); 69 void CalcThumbButtonRect(CFX_RectF& rect);
70 void CalcMinTrackRect(CFX_RectF& rect); 70 void CalcMinTrackRect(CFX_RectF& rect);
71 void CalcMaxTrackRect(CFX_RectF& rect); 71 void CalcMaxTrackRect(CFX_RectF& rect);
72 FX_FLOAT GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy); 72 FX_FLOAT GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy);
73 void GetTrackRect(CFX_RectF& rect, FX_BOOL bLower = TRUE); 73 void GetTrackRect(CFX_RectF& rect, FX_BOOL bLower = TRUE);
74 FX_BOOL SendEvent(); 74 FX_BOOL SendEvent();
(...skipping 29 matching lines...) Expand all
104 CFX_RectF m_rtMaxTrack; 104 CFX_RectF m_rtMaxTrack;
105 FX_BOOL m_bCustomLayout; 105 FX_BOOL m_bCustomLayout;
106 FX_FLOAT m_fMinThumb; 106 FX_FLOAT m_fMinThumb;
107 }; 107 };
108 108
109 class CFWL_ScrollBarImpDelegate : public CFWL_WidgetImpDelegate { 109 class CFWL_ScrollBarImpDelegate : public CFWL_WidgetImpDelegate {
110 public: 110 public:
111 CFWL_ScrollBarImpDelegate(CFWL_ScrollBarImp* pOwner); 111 CFWL_ScrollBarImpDelegate(CFWL_ScrollBarImp* pOwner);
112 void OnProcessMessage(CFWL_Message* pMessage) override; 112 void OnProcessMessage(CFWL_Message* pMessage) override;
113 void OnDrawWidget(CFX_Graphics* pGraphics, 113 void OnDrawWidget(CFX_Graphics* pGraphics,
114 const CFX_Matrix* pMatrix = NULL) override; 114 const CFX_Matrix* pMatrix = nullptr) override;
115 115
116 protected: 116 protected:
117 void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 117 void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
118 void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 118 void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
119 void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 119 void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
120 void OnMouseLeave(); 120 void OnMouseLeave();
121 void OnMouseWheel(FX_FLOAT fx, 121 void OnMouseWheel(FX_FLOAT fx,
122 FX_FLOAT fy, 122 FX_FLOAT fy,
123 uint32_t dwFlags, 123 uint32_t dwFlags,
124 FX_FLOAT fDeltaX, 124 FX_FLOAT fDeltaX,
(...skipping 13 matching lines...) Expand all
138 int32_t& iState, 138 int32_t& iState,
139 FX_FLOAT fx, 139 FX_FLOAT fx,
140 FX_FLOAT fy); 140 FX_FLOAT fy);
141 void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); 141 void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
142 void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); 142 void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
143 143
144 CFWL_ScrollBarImp* m_pOwner; 144 CFWL_ScrollBarImp* m_pOwner;
145 }; 145 };
146 146
147 #endif // XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_ 147 #endif // XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_pushbuttonimp.cpp ('k') | xfa/fwl/basewidget/fwl_spinbuttonimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698