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

Side by Side Diff: fpdfsdk/include/pdfwindow/PWL_ScrollBar.h

Issue 1288393004: Merge to XFA: Use override in more classes in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: self review Created 5 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_Note.h ('k') | fpdfsdk/include/pdfwindow/PWL_Signature.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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_SCROLLBAR_H_ 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_SCROLLBAR_H_
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_SCROLLBAR_H_ 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_SCROLLBAR_H_
9 9
10 #include "PWL_Wnd.h" 10 #include "PWL_Wnd.h"
(...skipping 17 matching lines...) Expand all
28 }; 28 };
29 29
30 enum PWL_SCROLLBAR_TYPE { SBT_HSCROLL, SBT_VSCROLL }; 30 enum PWL_SCROLLBAR_TYPE { SBT_HSCROLL, SBT_VSCROLL };
31 31
32 enum PWL_SBBUTTON_TYPE { PSBT_MIN, PSBT_MAX, PSBT_POS }; 32 enum PWL_SBBUTTON_TYPE { PSBT_MIN, PSBT_MAX, PSBT_POS };
33 33
34 class CPWL_SBButton : public CPWL_Wnd { 34 class CPWL_SBButton : public CPWL_Wnd {
35 public: 35 public:
36 CPWL_SBButton(PWL_SCROLLBAR_TYPE eScrollBarType, 36 CPWL_SBButton(PWL_SCROLLBAR_TYPE eScrollBarType,
37 PWL_SBBUTTON_TYPE eButtonType); 37 PWL_SBBUTTON_TYPE eButtonType);
38 virtual ~CPWL_SBButton(); 38 ~CPWL_SBButton() override;
39 39
40 public: 40 // CPWL_Wnd
41 virtual CFX_ByteString GetClassName() const; 41 CFX_ByteString GetClassName() const override;
42 virtual void OnCreate(PWL_CREATEPARAM& cp); 42 void OnCreate(PWL_CREATEPARAM& cp) override;
43 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream); 43 void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
44 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, 44 void DrawThisAppearance(CFX_RenderDevice* pDevice,
45 CPDF_Matrix* pUser2Device); 45 CPDF_Matrix* pUser2Device) override;
46 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); 46 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
47 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); 47 FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
48 virtual FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag); 48 FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) override;
49 49
50 protected: 50 protected:
51 PWL_SCROLLBAR_TYPE m_eScrollBarType; 51 PWL_SCROLLBAR_TYPE m_eScrollBarType;
52 PWL_SBBUTTON_TYPE m_eSBButtonType; 52 PWL_SBBUTTON_TYPE m_eSBButtonType;
53 53
54 FX_BOOL m_bMouseDown; 54 FX_BOOL m_bMouseDown;
55 }; 55 };
56 56
57 struct PWL_FLOATRANGE { 57 struct PWL_FLOATRANGE {
58 public: 58 public:
(...skipping 26 matching lines...) Expand all
85 PWL_FLOATRANGE ScrollRange; 85 PWL_FLOATRANGE ScrollRange;
86 FX_FLOAT fClientWidth; 86 FX_FLOAT fClientWidth;
87 FX_FLOAT fScrollPos; 87 FX_FLOAT fScrollPos;
88 FX_FLOAT fBigStep; 88 FX_FLOAT fBigStep;
89 FX_FLOAT fSmallStep; 89 FX_FLOAT fSmallStep;
90 }; 90 };
91 91
92 class CPWL_ScrollBar : public CPWL_Wnd { 92 class CPWL_ScrollBar : public CPWL_Wnd {
93 public: 93 public:
94 CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL); 94 CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL);
95 virtual ~CPWL_ScrollBar(); 95 ~CPWL_ScrollBar() override;
96 96
97 public: 97 // CPWL_Wnd
98 virtual CFX_ByteString GetClassName() const; 98 CFX_ByteString GetClassName() const override;
99 virtual void OnCreate(PWL_CREATEPARAM& cp); 99 void OnCreate(PWL_CREATEPARAM& cp) override;
100 virtual void RePosChildWnd(); 100 void RePosChildWnd() override;
101 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream); 101 void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
102 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, 102 void DrawThisAppearance(CFX_RenderDevice* pDevice,
103 CPDF_Matrix* pUser2Device); 103 CPDF_Matrix* pUser2Device) override;
104 104 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
105 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); 105 FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
106 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); 106 void OnNotify(CPWL_Wnd* pWnd,
107 virtual void OnNotify(CPWL_Wnd* pWnd, 107 FX_DWORD msg,
108 FX_DWORD msg, 108 intptr_t wParam = 0,
109 intptr_t wParam = 0, 109 intptr_t lParam = 0) override;
110 intptr_t lParam = 0); 110 void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
111 111 void TimerProc() override;
112 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
113 112
114 FX_FLOAT GetScrollBarWidth() const; 113 FX_FLOAT GetScrollBarWidth() const;
115 PWL_SCROLLBAR_TYPE GetScrollBarType() const { return m_sbType; }; 114 PWL_SCROLLBAR_TYPE GetScrollBarType() const { return m_sbType; };
116 115
117 void SetNotifyForever(FX_BOOL bForever) { m_bNotifyForever = bForever; } 116 void SetNotifyForever(FX_BOOL bForever) { m_bNotifyForever = bForever; }
118 117
119 protected: 118 protected:
120 void SetScrollRange(FX_FLOAT fMin, FX_FLOAT fMax, FX_FLOAT fClientWidth); 119 void SetScrollRange(FX_FLOAT fMin, FX_FLOAT fMax, FX_FLOAT fClientWidth);
121 void SetScrollPos(FX_FLOAT fPos); 120 void SetScrollPos(FX_FLOAT fPos);
122 void MovePosButton(FX_BOOL bRefresh); 121 void MovePosButton(FX_BOOL bRefresh);
(...skipping 12 matching lines...) Expand all
135 void OnMaxButtonLBUp(const CPDF_Point& point); 134 void OnMaxButtonLBUp(const CPDF_Point& point);
136 void OnMaxButtonMouseMove(const CPDF_Point& point); 135 void OnMaxButtonMouseMove(const CPDF_Point& point);
137 136
138 void OnPosButtonLBDown(const CPDF_Point& point); 137 void OnPosButtonLBDown(const CPDF_Point& point);
139 void OnPosButtonLBUp(const CPDF_Point& point); 138 void OnPosButtonLBUp(const CPDF_Point& point);
140 void OnPosButtonMouseMove(const CPDF_Point& point); 139 void OnPosButtonMouseMove(const CPDF_Point& point);
141 140
142 FX_FLOAT TrueToFace(FX_FLOAT); 141 FX_FLOAT TrueToFace(FX_FLOAT);
143 FX_FLOAT FaceToTrue(FX_FLOAT); 142 FX_FLOAT FaceToTrue(FX_FLOAT);
144 143
145 virtual void TimerProc();
146
147 private:
148 PWL_SCROLLBAR_TYPE m_sbType; 144 PWL_SCROLLBAR_TYPE m_sbType;
149 PWL_SCROLL_INFO m_OriginInfo; 145 PWL_SCROLL_INFO m_OriginInfo;
150 CPWL_SBButton* m_pMinButton; 146 CPWL_SBButton* m_pMinButton;
151 CPWL_SBButton* m_pMaxButton; 147 CPWL_SBButton* m_pMaxButton;
152 CPWL_SBButton* m_pPosButton; 148 CPWL_SBButton* m_pPosButton;
153 PWL_SCROLL_PRIVATEDATA m_sData; 149 PWL_SCROLL_PRIVATEDATA m_sData;
154 FX_BOOL m_bMouseDown; 150 FX_BOOL m_bMouseDown;
155 FX_BOOL m_bMinOrMax; 151 FX_BOOL m_bMinOrMax;
156 FX_BOOL m_bNotifyForever; 152 FX_BOOL m_bNotifyForever;
157 FX_FLOAT m_nOldPos; 153 FX_FLOAT m_nOldPos;
158 FX_FLOAT m_fOldPosButton; 154 FX_FLOAT m_fOldPosButton;
159 }; 155 };
160 156
161 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_SCROLLBAR_H_ 157 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_SCROLLBAR_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_Note.h ('k') | fpdfsdk/include/pdfwindow/PWL_Signature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698