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

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

Issue 1737593006: Re-land "Replace CPDF_Rect and CPDF_Point with CFX types." (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Ooops. Created 4 years, 9 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_SpecialButton.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 "fpdfsdk/include/pdfwindow/PWL_Wnd.h" 10 #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
(...skipping 25 matching lines...) Expand all
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 ~CPWL_SBButton() override; 38 ~CPWL_SBButton() override;
39 39
40 // CPWL_Wnd 40 // CPWL_Wnd
41 CFX_ByteString GetClassName() const override; 41 CFX_ByteString GetClassName() const override;
42 void OnCreate(PWL_CREATEPARAM& cp) override; 42 void OnCreate(PWL_CREATEPARAM& cp) override;
43 void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override; 43 void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
44 void DrawThisAppearance(CFX_RenderDevice* pDevice, 44 void DrawThisAppearance(CFX_RenderDevice* pDevice,
45 CFX_Matrix* pUser2Device) override; 45 CFX_Matrix* pUser2Device) override;
46 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override; 46 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
47 FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override; 47 FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
48 FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) override; 48 FX_BOOL OnMouseMove(const CFX_FloatPoint& 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL); 94 CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL);
95 ~CPWL_ScrollBar() override; 95 ~CPWL_ScrollBar() override;
96 96
97 // CPWL_Wnd 97 // CPWL_Wnd
98 CFX_ByteString GetClassName() const override; 98 CFX_ByteString GetClassName() const override;
99 void OnCreate(PWL_CREATEPARAM& cp) override; 99 void OnCreate(PWL_CREATEPARAM& cp) override;
100 void RePosChildWnd() override; 100 void RePosChildWnd() override;
101 void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override; 101 void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
102 void DrawThisAppearance(CFX_RenderDevice* pDevice, 102 void DrawThisAppearance(CFX_RenderDevice* pDevice,
103 CFX_Matrix* pUser2Device) override; 103 CFX_Matrix* pUser2Device) override;
104 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override; 104 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
105 FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override; 105 FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
106 void OnNotify(CPWL_Wnd* pWnd, 106 void OnNotify(CPWL_Wnd* pWnd,
107 FX_DWORD msg, 107 FX_DWORD msg,
108 intptr_t wParam = 0, 108 intptr_t wParam = 0,
109 intptr_t lParam = 0) override; 109 intptr_t lParam = 0) override;
110 void CreateChildWnd(const PWL_CREATEPARAM& cp) override; 110 void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
111 void TimerProc() override; 111 void TimerProc() override;
112 112
113 FX_FLOAT GetScrollBarWidth() const; 113 FX_FLOAT GetScrollBarWidth() const;
114 PWL_SCROLLBAR_TYPE GetScrollBarType() const { return m_sbType; } 114 PWL_SCROLLBAR_TYPE GetScrollBarType() const { return m_sbType; }
115 115
116 void SetNotifyForever(FX_BOOL bForever) { m_bNotifyForever = bForever; } 116 void SetNotifyForever(FX_BOOL bForever) { m_bNotifyForever = bForever; }
117 117
118 protected: 118 protected:
119 void SetScrollRange(FX_FLOAT fMin, FX_FLOAT fMax, FX_FLOAT fClientWidth); 119 void SetScrollRange(FX_FLOAT fMin, FX_FLOAT fMax, FX_FLOAT fClientWidth);
120 void SetScrollPos(FX_FLOAT fPos); 120 void SetScrollPos(FX_FLOAT fPos);
121 void MovePosButton(FX_BOOL bRefresh); 121 void MovePosButton(FX_BOOL bRefresh);
122 void SetScrollStep(FX_FLOAT fBigStep, FX_FLOAT fSmallStep); 122 void SetScrollStep(FX_FLOAT fBigStep, FX_FLOAT fSmallStep);
123 void NotifyScrollWindow(); 123 void NotifyScrollWindow();
124 CPDF_Rect GetScrollArea() const; 124 CFX_FloatRect GetScrollArea() const;
125 125
126 private: 126 private:
127 void CreateButtons(const PWL_CREATEPARAM& cp); 127 void CreateButtons(const PWL_CREATEPARAM& cp);
128 128
129 void OnMinButtonLBDown(const CPDF_Point& point); 129 void OnMinButtonLBDown(const CFX_FloatPoint& point);
130 void OnMinButtonLBUp(const CPDF_Point& point); 130 void OnMinButtonLBUp(const CFX_FloatPoint& point);
131 void OnMinButtonMouseMove(const CPDF_Point& point); 131 void OnMinButtonMouseMove(const CFX_FloatPoint& point);
132 132
133 void OnMaxButtonLBDown(const CPDF_Point& point); 133 void OnMaxButtonLBDown(const CFX_FloatPoint& point);
134 void OnMaxButtonLBUp(const CPDF_Point& point); 134 void OnMaxButtonLBUp(const CFX_FloatPoint& point);
135 void OnMaxButtonMouseMove(const CPDF_Point& point); 135 void OnMaxButtonMouseMove(const CFX_FloatPoint& point);
136 136
137 void OnPosButtonLBDown(const CPDF_Point& point); 137 void OnPosButtonLBDown(const CFX_FloatPoint& point);
138 void OnPosButtonLBUp(const CPDF_Point& point); 138 void OnPosButtonLBUp(const CFX_FloatPoint& point);
139 void OnPosButtonMouseMove(const CPDF_Point& point); 139 void OnPosButtonMouseMove(const CFX_FloatPoint& point);
140 140
141 FX_FLOAT TrueToFace(FX_FLOAT); 141 FX_FLOAT TrueToFace(FX_FLOAT);
142 FX_FLOAT FaceToTrue(FX_FLOAT); 142 FX_FLOAT FaceToTrue(FX_FLOAT);
143 143
144 PWL_SCROLLBAR_TYPE m_sbType; 144 PWL_SCROLLBAR_TYPE m_sbType;
145 PWL_SCROLL_INFO m_OriginInfo; 145 PWL_SCROLL_INFO m_OriginInfo;
146 CPWL_SBButton* m_pMinButton; 146 CPWL_SBButton* m_pMinButton;
147 CPWL_SBButton* m_pMaxButton; 147 CPWL_SBButton* m_pMaxButton;
148 CPWL_SBButton* m_pPosButton; 148 CPWL_SBButton* m_pPosButton;
149 PWL_SCROLL_PRIVATEDATA m_sData; 149 PWL_SCROLL_PRIVATEDATA m_sData;
150 FX_BOOL m_bMouseDown; 150 FX_BOOL m_bMouseDown;
151 FX_BOOL m_bMinOrMax; 151 FX_BOOL m_bMinOrMax;
152 FX_BOOL m_bNotifyForever; 152 FX_BOOL m_bNotifyForever;
153 FX_FLOAT m_nOldPos; 153 FX_FLOAT m_nOldPos;
154 FX_FLOAT m_fOldPosButton; 154 FX_FLOAT m_fOldPosButton;
155 }; 155 };
156 156
157 #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_SpecialButton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698