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

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

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 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 | « 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 { 42 {
43 public: 43 public:
44 CPWL_SBButton(PWL_SCROLLBAR_TYPE eScrollBarType,PWL_SBBUTTON_TYPE eButto nType); 44 CPWL_SBButton(PWL_SCROLLBAR_TYPE eScrollBarType,PWL_SBBUTTON_TYPE eButto nType);
45 virtual ~CPWL_SBButton(); 45 virtual ~CPWL_SBButton();
46 46
47 public: 47 public:
48 virtual CFX_ByteString GetClassName() const; 48 virtual CFX_ByteString GetClassName() const;
49 virtual void OnCreate(PWL_CREATEPARAM & cp); 49 virtual void OnCreate(PWL_CREATEPARAM & cp);
50 virtual void GetThisAppearanceStream(CFX_Byte TextBuf & sAppStream); 50 virtual void GetThisAppearanceStream(CFX_Byte TextBuf & sAppStream);
51 virtual void DrawThisAppearance(CFX_RenderDev ice* pDevice, CPDF_Matrix* pUser2Device); 51 virtual void DrawThisAppearance(CFX_RenderDev ice* pDevice, CPDF_Matrix* pUser2Device);
52 » virtual FX_BOOL»» » » OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); 52 » virtual bool» » » » OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
53 » virtual FX_BOOL»» » » OnLButtonUp(const CPDF_Point & p oint, FX_DWORD nFlag); 53 » virtual bool» » » » OnLButtonUp(const CPDF_Point & p oint, FX_DWORD nFlag);
54 » virtual FX_BOOL»» » » OnMouseMove(const CPDF_Point & p oint, FX_DWORD nFlag); 54 » virtual bool» » » » OnMouseMove(const CPDF_Point & p oint, FX_DWORD nFlag);
55 55
56 protected: 56 protected:
57 PWL_SCROLLBAR_TYPE m_eScrollBarType; 57 PWL_SCROLLBAR_TYPE m_eScrollBarType;
58 PWL_SBBUTTON_TYPE m_eSBButtonType; 58 PWL_SBBUTTON_TYPE m_eSBButtonType;
59 59
60 » FX_BOOL»» » » » » m_bMouseDown; 60 » bool» » » » » » m_bMouseDown;
61 }; 61 };
62 62
63 struct PWL_FLOATRANGE 63 struct PWL_FLOATRANGE
64 { 64 {
65 public: 65 public:
66 PWL_FLOATRANGE(); 66 PWL_FLOATRANGE();
67 PWL_FLOATRANGE(FX_FLOAT min,FX_FLOAT max); 67 PWL_FLOATRANGE(FX_FLOAT min,FX_FLOAT max);
68 void Default(); 68 void Default();
69 void Set(FX_FLOAT min,FX_FLOAT max); 69 void Set(FX_FLOAT min,FX_FLOAT max);
70 » FX_BOOL»In(FX_FLOAT x) const; 70 » bool» In(FX_FLOAT x) const;
71 FX_FLOAT GetWidth() const; 71 FX_FLOAT GetWidth() const;
72 72
73 FX_FLOAT fMin,fMax; 73 FX_FLOAT fMin,fMax;
74 }; 74 };
75 75
76 struct PWL_SCROLL_PRIVATEDATA 76 struct PWL_SCROLL_PRIVATEDATA
77 { 77 {
78 public: 78 public:
79 PWL_SCROLL_PRIVATEDATA(); 79 PWL_SCROLL_PRIVATEDATA();
80 80
81 void Default(); 81 void Default();
82 void SetScrollRange(FX_FLOAT min,FX_FLOAT max); 82 void SetScrollRange(FX_FLOAT min,FX_FLOAT max);
83 void SetClientWidth(FX_FLOAT width); 83 void SetClientWidth(FX_FLOAT width);
84 void SetSmallStep(FX_FLOAT step); 84 void SetSmallStep(FX_FLOAT step);
85 void SetBigStep(FX_FLOAT step); 85 void SetBigStep(FX_FLOAT step);
86 » FX_BOOL SetPos(FX_FLOAT pos); 86 » bool SetPos(FX_FLOAT pos);
87 87
88 void AddSmall(); 88 void AddSmall();
89 void SubSmall(); 89 void SubSmall();
90 void AddBig(); 90 void AddBig();
91 void SubBig(); 91 void SubBig();
92 92
93 PWL_FLOATRANGE ScrollRange; 93 PWL_FLOATRANGE ScrollRange;
94 FX_FLOAT fClientWidth; 94 FX_FLOAT fClientWidth;
95 FX_FLOAT fScrollPos; 95 FX_FLOAT fScrollPos;
96 FX_FLOAT fBigStep; 96 FX_FLOAT fBigStep;
97 FX_FLOAT fSmallStep; 97 FX_FLOAT fSmallStep;
98 }; 98 };
99 99
100 class CPWL_ScrollBar : public CPWL_Wnd 100 class CPWL_ScrollBar : public CPWL_Wnd
101 { 101 {
102 public: 102 public:
103 CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL); 103 CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL);
104 virtual ~CPWL_ScrollBar(); 104 virtual ~CPWL_ScrollBar();
105 105
106 public: 106 public:
107 virtual CFX_ByteString GetClassName() const; 107 virtual CFX_ByteString GetClassName() const;
108 virtual void OnCreate(PWL_CREATEPARAM & cp); 108 virtual void OnCreate(PWL_CREATEPARAM & cp);
109 virtual void RePosChildWnd(); 109 virtual void RePosChildWnd();
110 virtual void GetThisAppearanceStream(CFX_Byte TextBuf & sAppStream); 110 virtual void GetThisAppearanceStream(CFX_Byte TextBuf & sAppStream);
111 virtual void DrawThisAppearance(CFX_RenderDev ice* pDevice, CPDF_Matrix* pUser2Device); 111 virtual void DrawThisAppearance(CFX_RenderDev ice* pDevice, CPDF_Matrix* pUser2Device);
112 112
113 » virtual FX_BOOL»» » » OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); 113 » virtual bool» » » » OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
114 » virtual FX_BOOL»» » » OnLButtonUp(const CPDF_Point & p oint, FX_DWORD nFlag); 114 » virtual bool» » » » OnLButtonUp(const CPDF_Point & p oint, FX_DWORD nFlag);
115 virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWOR D msg, intptr_t wParam = 0, intptr_t lParam = 0); 115 virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWOR D msg, intptr_t wParam = 0, intptr_t lParam = 0);
116 116
117 virtual void CreateChildWnd(const PWL_CREATEP ARAM & cp); 117 virtual void CreateChildWnd(const PWL_CREATEP ARAM & cp);
118 118
119 FX_FLOAT GetScrollBarWidth() cons t; 119 FX_FLOAT GetScrollBarWidth() cons t;
120 PWL_SCROLLBAR_TYPE GetScrollBarType() const {return m_sbType;}; 120 PWL_SCROLLBAR_TYPE GetScrollBarType() const {return m_sbType;};
121 121
122 » void» » » » » » SetNotifyForever(FX_BOOL bForever) {m_bNotifyForever = bForever;} 122 » void» » » » » » SetNotifyForever(bool bF orever) {m_bNotifyForever = bForever;}
123 123
124 protected: 124 protected:
125 void SetScrollRange(FX_FLOAT fMin,FX_FLOAT fMax,FX_FLOAT fClientWidth); 125 void SetScrollRange(FX_FLOAT fMin,FX_FLOAT fMax,FX_FLOAT fClientWidth);
126 void SetScrollPos(FX_FLOAT fP os); 126 void SetScrollPos(FX_FLOAT fP os);
127 » void» » » » » » MovePosButton(FX_BOOL bR efresh); 127 » void» » » » » » MovePosButton(bool bRefr esh);
128 void SetScrollStep(FX_FLOAT f BigStep,FX_FLOAT fSmallStep); 128 void SetScrollStep(FX_FLOAT f BigStep,FX_FLOAT fSmallStep);
129 void NotifyScrollWindow(); 129 void NotifyScrollWindow();
130 CPDF_Rect GetScrollArea() const; 130 CPDF_Rect GetScrollArea() const;
131 131
132 private: 132 private:
133 void CreateButtons(const PWL_ CREATEPARAM & cp); 133 void CreateButtons(const PWL_ CREATEPARAM & cp);
134 134
135 void OnMinButtonLBDown(const CPDF_Point & point); 135 void OnMinButtonLBDown(const CPDF_Point & point);
136 void OnMinButtonLBUp(const CP DF_Point & point); 136 void OnMinButtonLBUp(const CP DF_Point & point);
137 void OnMinButtonMouseMove(con st CPDF_Point & point); 137 void OnMinButtonMouseMove(con st CPDF_Point & point);
(...skipping 11 matching lines...) Expand all
149 149
150 virtual void TimerProc(); 150 virtual void TimerProc();
151 151
152 private: 152 private:
153 PWL_SCROLLBAR_TYPE m_sbType; 153 PWL_SCROLLBAR_TYPE m_sbType;
154 PWL_SCROLL_INFO m_OriginInfo; 154 PWL_SCROLL_INFO m_OriginInfo;
155 CPWL_SBButton* m_pMinButton; 155 CPWL_SBButton* m_pMinButton;
156 CPWL_SBButton* m_pMaxButton; 156 CPWL_SBButton* m_pMaxButton;
157 CPWL_SBButton* m_pPosButton; 157 CPWL_SBButton* m_pPosButton;
158 PWL_SCROLL_PRIVATEDATA m_sData; 158 PWL_SCROLL_PRIVATEDATA m_sData;
159 » FX_BOOL»» » » » » m_bMouseDown; 159 » bool» » » » » » m_bMouseDown;
160 » FX_BOOL»» » » » » m_bMinOrMax; 160 » bool» » » » » » m_bMinOrMax;
161 » FX_BOOL»» » » » » m_bNotifyForever; 161 » bool» » » » » » m_bNotifyForever;
162 FX_FLOAT m_nOldPos; 162 FX_FLOAT m_nOldPos;
163 FX_FLOAT m_fOldPosButton; 163 FX_FLOAT m_fOldPosButton;
164 }; 164 };
165 165
166 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_SCROLLBAR_H_ 166 #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