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

Side by Side Diff: xfa/fwl/core/cfwl_scrollbar.h

Issue 2557103002: Cleanup FWL default values part II. (Closed)
Patch Set: Rebase to master Created 4 years 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/core/cfwl_notedriver.cpp ('k') | xfa/fwl/core/cfwl_scrollbar.cpp » ('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_CORE_CFWL_SCROLLBAR_H_ 7 #ifndef XFA_FWL_CORE_CFWL_SCROLLBAR_H_
8 #define XFA_FWL_CORE_CFWL_SCROLLBAR_H_ 8 #define XFA_FWL_CORE_CFWL_SCROLLBAR_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 void Run(CFWL_TimerInfo* pTimerInfo) override; 63 void Run(CFWL_TimerInfo* pTimerInfo) override;
64 }; 64 };
65 friend class CFWL_ScrollBar::Timer; 65 friend class CFWL_ScrollBar::Timer;
66 66
67 bool IsVertical() const { 67 bool IsVertical() const {
68 return !!(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_SCB_Vert); 68 return !!(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_SCB_Vert);
69 } 69 }
70 void DrawTrack(CFX_Graphics* pGraphics, 70 void DrawTrack(CFX_Graphics* pGraphics,
71 IFWL_ThemeProvider* pTheme, 71 IFWL_ThemeProvider* pTheme,
72 bool bLower = true, 72 bool bLower,
73 const CFX_Matrix* pMatrix = nullptr); 73 const CFX_Matrix* pMatrix);
74 void DrawArrowBtn(CFX_Graphics* pGraphics, 74 void DrawArrowBtn(CFX_Graphics* pGraphics,
75 IFWL_ThemeProvider* pTheme, 75 IFWL_ThemeProvider* pTheme,
76 bool bMinBtn = true, 76 bool bMinBtn,
77 const CFX_Matrix* pMatrix = nullptr); 77 const CFX_Matrix* pMatrix);
78 void DrawThumb(CFX_Graphics* pGraphics, 78 void DrawThumb(CFX_Graphics* pGraphics,
79 IFWL_ThemeProvider* pTheme, 79 IFWL_ThemeProvider* pTheme,
80 const CFX_Matrix* pMatrix = nullptr); 80 const CFX_Matrix* pMatrix);
81 void Layout(); 81 void Layout();
82 void CalcButtonLen(); 82 void CalcButtonLen();
83 void CalcMinButtonRect(CFX_RectF& rect); 83 void CalcMinButtonRect(CFX_RectF& rect);
84 void CalcMaxButtonRect(CFX_RectF& rect); 84 void CalcMaxButtonRect(CFX_RectF& rect);
85 void CalcThumbButtonRect(CFX_RectF& rect); 85 void CalcThumbButtonRect(CFX_RectF& rect);
86 void CalcMinTrackRect(CFX_RectF& rect); 86 void CalcMinTrackRect(CFX_RectF& rect);
87 void CalcMaxTrackRect(CFX_RectF& rect); 87 void CalcMaxTrackRect(CFX_RectF& rect);
88 FX_FLOAT GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy); 88 FX_FLOAT GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy);
89 void GetTrackRect(CFX_RectF& rect, bool bLower = true); 89
90 bool SendEvent(); 90 bool SendEvent();
91 bool OnScroll(CFWL_EvtScroll::Code dwCode, FX_FLOAT fPos); 91 bool OnScroll(CFWL_EvtScroll::Code dwCode, FX_FLOAT fPos);
92 void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 92 void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
93 void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 93 void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
94 void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 94 void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
95 void OnMouseLeave(); 95 void OnMouseLeave();
96 void OnMouseWheel(FX_FLOAT fx, 96 void OnMouseWheel(FX_FLOAT fx,
97 FX_FLOAT fy, 97 FX_FLOAT fy,
98 uint32_t dwFlags, 98 uint32_t dwFlags,
99 FX_FLOAT fDeltaX, 99 FX_FLOAT fDeltaX,
100 FX_FLOAT fDeltaY); 100 FX_FLOAT fDeltaY);
101 bool DoScroll(CFWL_EvtScroll::Code dwCode, FX_FLOAT fPos = 0.0f); 101 bool DoScroll(CFWL_EvtScroll::Code dwCode, FX_FLOAT fPos);
102 void DoMouseDown(int32_t iItem, 102 void DoMouseDown(int32_t iItem,
103 const CFX_RectF& rtItem, 103 const CFX_RectF& rtItem,
104 int32_t& iState, 104 int32_t& iState,
105 FX_FLOAT fx, 105 FX_FLOAT fx,
106 FX_FLOAT fy); 106 FX_FLOAT fy);
107 void DoMouseUp(int32_t iItem, 107 void DoMouseUp(int32_t iItem,
108 const CFX_RectF& rtItem, 108 const CFX_RectF& rtItem,
109 int32_t& iState, 109 int32_t& iState,
110 FX_FLOAT fx, 110 FX_FLOAT fx,
111 FX_FLOAT fy); 111 FX_FLOAT fy);
(...skipping 28 matching lines...) Expand all
140 CFX_RectF m_rtThumb; 140 CFX_RectF m_rtThumb;
141 CFX_RectF m_rtMinBtn; 141 CFX_RectF m_rtMinBtn;
142 CFX_RectF m_rtMaxBtn; 142 CFX_RectF m_rtMaxBtn;
143 CFX_RectF m_rtMinTrack; 143 CFX_RectF m_rtMinTrack;
144 CFX_RectF m_rtMaxTrack; 144 CFX_RectF m_rtMaxTrack;
145 FX_FLOAT m_fMinThumb; 145 FX_FLOAT m_fMinThumb;
146 CFWL_ScrollBar::Timer m_Timer; 146 CFWL_ScrollBar::Timer m_Timer;
147 }; 147 };
148 148
149 #endif // XFA_FWL_CORE_CFWL_SCROLLBAR_H_ 149 #endif // XFA_FWL_CORE_CFWL_SCROLLBAR_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_notedriver.cpp ('k') | xfa/fwl/core/cfwl_scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698