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

Side by Side Diff: fpdfsdk/pdfwindow/PWL_Wnd.h

Issue 1980973002: Convert border style defines to an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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
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_PDFWINDOW_PWL_WND_H_ 7 #ifndef FPDFSDK_PDFWINDOW_PWL_WND_H_
8 #define FPDFSDK_PDFWINDOW_PWL_WND_H_ 8 #define FPDFSDK_PDFWINDOW_PWL_WND_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #define PCBS_ALLOWCUSTOMTEXT 0x0001L 61 #define PCBS_ALLOWCUSTOMTEXT 0x0001L
62 62
63 // richedit styles 63 // richedit styles
64 #define PRES_MULTILINE 0x0001L 64 #define PRES_MULTILINE 0x0001L
65 #define PRES_AUTORETURN 0x0002L 65 #define PRES_AUTORETURN 0x0002L
66 #define PRES_AUTOSCROLL 0x0004L 66 #define PRES_AUTOSCROLL 0x0004L
67 #define PRES_UNDO 0x0100L 67 #define PRES_UNDO 0x0100L
68 #define PRES_MULTIPAGES 0x0200L 68 #define PRES_MULTIPAGES 0x0200L
69 #define PRES_TEXTOVERFLOW 0x0400L 69 #define PRES_TEXTOVERFLOW 0x0400L
70 70
71 // border style
72 #define PBS_SOLID 0
73 #define PBS_DASH 1
74 #define PBS_BEVELED 2
75 #define PBS_INSET 3
76 #define PBS_UNDERLINED 4
77 #define PBS_SHADOW 5
78
79 // notification messages 71 // notification messages
80 #define PNM_ADDCHILD 0x00000000L 72 #define PNM_ADDCHILD 0x00000000L
81 #define PNM_REMOVECHILD 0x00000001L 73 #define PNM_REMOVECHILD 0x00000001L
82 #define PNM_SETSCROLLINFO 0x00000002L 74 #define PNM_SETSCROLLINFO 0x00000002L
83 #define PNM_SETSCROLLPOS 0x00000003L 75 #define PNM_SETSCROLLPOS 0x00000003L
84 #define PNM_SCROLLWINDOW 0x00000004L 76 #define PNM_SCROLLWINDOW 0x00000004L
85 #define PNM_LBUTTONDOWN 0x00000005L 77 #define PNM_LBUTTONDOWN 0x00000005L
86 #define PNM_LBUTTONUP 0x00000006L 78 #define PNM_LBUTTONUP 0x00000006L
87 #define PNM_MOUSEMOVE 0x00000007L 79 #define PNM_MOUSEMOVE 0x00000007L
88 #define PNM_NOTERESET 0x00000008L 80 #define PNM_NOTERESET 0x00000008L
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 public: 188 public:
197 PWL_CREATEPARAM() 189 PWL_CREATEPARAM()
198 : rcRectWnd(0, 0, 0, 0), 190 : rcRectWnd(0, 0, 0, 0),
199 pSystemHandler(NULL), 191 pSystemHandler(NULL),
200 pFontMap(NULL), 192 pFontMap(NULL),
201 pProvider(NULL), 193 pProvider(NULL),
202 pFocusHandler(NULL), 194 pFocusHandler(NULL),
203 dwFlags(0), 195 dwFlags(0),
204 sBackgroundColor(), 196 sBackgroundColor(),
205 hAttachedWnd(NULL), 197 hAttachedWnd(NULL),
206 nBorderStyle(PBS_SOLID), 198 nBorderStyle(BorderStyle::SOLID),
207 dwBorderWidth(1), 199 dwBorderWidth(1),
208 sBorderColor(), 200 sBorderColor(),
209 sTextColor(), 201 sTextColor(),
210 sTextStrokeColor(), 202 sTextStrokeColor(),
211 nTransparency(255), 203 nTransparency(255),
212 fFontSize(PWL_DEFAULT_FONTSIZE), 204 fFontSize(PWL_DEFAULT_FONTSIZE),
213 sDash(3, 0, 0), 205 sDash(3, 0, 0),
214 pAttachedData(NULL), 206 pAttachedData(NULL),
215 pParentWnd(NULL), 207 pParentWnd(NULL),
216 pMsgControl(NULL), 208 pMsgControl(NULL),
217 eCursorType(FXCT_ARROW), 209 eCursorType(FXCT_ARROW),
218 mtChild(1, 0, 0, 1, 0, 0) {} 210 mtChild(1, 0, 0, 1, 0, 0) {}
219 211
220 CFX_FloatRect rcRectWnd; // required 212 CFX_FloatRect rcRectWnd; // required
221 CFX_SystemHandler* pSystemHandler; // required 213 CFX_SystemHandler* pSystemHandler; // required
222 IPVT_FontMap* pFontMap; // required for text window 214 IPVT_FontMap* pFontMap; // required for text window
223 IPWL_Provider* pProvider; // required for self coordinate 215 IPWL_Provider* pProvider; // required for self coordinate
224 IPWL_FocusHandler* pFocusHandler; // optional 216 IPWL_FocusHandler* pFocusHandler; // optional
225 uint32_t dwFlags; // optional 217 uint32_t dwFlags; // optional
226 CPWL_Color sBackgroundColor; // optional 218 CPWL_Color sBackgroundColor; // optional
227 FX_HWND hAttachedWnd; // required for no-reader framework 219 FX_HWND hAttachedWnd; // required for no-reader framework
228 int32_t nBorderStyle; // optional 220 BorderStyle nBorderStyle; // optional
229 int32_t dwBorderWidth; // optional 221 int32_t dwBorderWidth; // optional
230 CPWL_Color sBorderColor; // optional 222 CPWL_Color sBorderColor; // optional
231 CPWL_Color sTextColor; // optional 223 CPWL_Color sTextColor; // optional
232 CPWL_Color sTextStrokeColor; // optional 224 CPWL_Color sTextStrokeColor; // optional
233 int32_t nTransparency; // optional 225 int32_t nTransparency; // optional
234 FX_FLOAT fFontSize; // optional 226 FX_FLOAT fFontSize; // optional
235 CPWL_Dash sDash; // optional 227 CPWL_Dash sDash; // optional
236 void* pAttachedData; // optional 228 void* pAttachedData; // optional
237 CPWL_Wnd* pParentWnd; // ignore 229 CPWL_Wnd* pParentWnd; // ignore
238 CPWL_MsgControl* pMsgControl; // ignore 230 CPWL_MsgControl* pMsgControl; // ignore
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 virtual void SetTextStrokeColor(const CPWL_Color& color); 307 virtual void SetTextStrokeColor(const CPWL_Color& color);
316 virtual void SetVisible(FX_BOOL bVisible); 308 virtual void SetVisible(FX_BOOL bVisible);
317 309
318 virtual CFX_FloatRect GetFocusRect() const; 310 virtual CFX_FloatRect GetFocusRect() const;
319 virtual CPWL_Color GetBackgroundColor() const; 311 virtual CPWL_Color GetBackgroundColor() const;
320 virtual CPWL_Color GetBorderColor() const; 312 virtual CPWL_Color GetBorderColor() const;
321 virtual CPWL_Color GetTextColor() const; 313 virtual CPWL_Color GetTextColor() const;
322 virtual CPWL_Color GetTextStrokeColor() const; 314 virtual CPWL_Color GetTextStrokeColor() const;
323 virtual FX_FLOAT GetFontSize() const; 315 virtual FX_FLOAT GetFontSize() const;
324 virtual int32_t GetInnerBorderWidth() const; 316 virtual int32_t GetInnerBorderWidth() const;
325 virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const; 317 virtual CPWL_Color GetBorderLeftTopColor(BorderStyle nBorderStyle) const;
326 virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const; 318 virtual CPWL_Color GetBorderRightBottomColor(BorderStyle nBorderStyle) const;
327 319
328 virtual void SetFontSize(FX_FLOAT fFontSize); 320 virtual void SetFontSize(FX_FLOAT fFontSize);
329 321
330 void SetBackgroundColor(const CPWL_Color& color); 322 void SetBackgroundColor(const CPWL_Color& color);
331 void SetClipRect(const CFX_FloatRect& rect); 323 void SetClipRect(const CFX_FloatRect& rect);
332 void SetBorderStyle(int32_t eBorderStyle); 324 void SetBorderStyle(BorderStyle eBorderStyle);
333 325
334 virtual CFX_FloatRect GetWindowRect() const; 326 virtual CFX_FloatRect GetWindowRect() const;
335 virtual CFX_FloatRect GetClientRect() const; 327 virtual CFX_FloatRect GetClientRect() const;
336 CFX_FloatPoint GetCenterPoint() const; 328 CFX_FloatPoint GetCenterPoint() const;
337 int32_t GetBorderWidth() const; 329 int32_t GetBorderWidth() const;
338 FX_BOOL IsVisible() const { return m_bVisible; } 330 FX_BOOL IsVisible() const { return m_bVisible; }
339 FX_BOOL HasFlag(uint32_t dwFlags) const; 331 FX_BOOL HasFlag(uint32_t dwFlags) const;
340 void AddFlag(uint32_t dwFlags); 332 void AddFlag(uint32_t dwFlags);
341 void RemoveFlag(uint32_t dwFlags); 333 void RemoveFlag(uint32_t dwFlags);
342 const CFX_FloatRect& GetClipRect() const; 334 const CFX_FloatRect& GetClipRect() const;
343 CPWL_Wnd* GetParentWindow() const; 335 CPWL_Wnd* GetParentWindow() const;
344 int32_t GetBorderStyle() const; 336 BorderStyle GetBorderStyle() const;
345 const CPWL_Dash& GetBorderDash() const; 337 const CPWL_Dash& GetBorderDash() const;
346 void* GetAttachedData() const; 338 void* GetAttachedData() const;
347 339
348 FX_BOOL WndHitTest(const CFX_FloatPoint& point) const; 340 FX_BOOL WndHitTest(const CFX_FloatPoint& point) const;
349 FX_BOOL ClientHitTest(const CFX_FloatPoint& point) const; 341 FX_BOOL ClientHitTest(const CFX_FloatPoint& point) const;
350 FX_BOOL IsCaptureMouse() const; 342 FX_BOOL IsCaptureMouse() const;
351 343
352 const CPWL_Wnd* GetFocused() const; 344 const CPWL_Wnd* GetFocused() const;
353 FX_BOOL IsFocused() const; 345 FX_BOOL IsFocused() const;
354 FX_BOOL IsReadOnly() const; 346 FX_BOOL IsReadOnly() const;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 CFX_FloatRect m_rcWindow; 442 CFX_FloatRect m_rcWindow;
451 CFX_FloatRect m_rcClip; 443 CFX_FloatRect m_rcClip;
452 444
453 FX_BOOL m_bCreated; 445 FX_BOOL m_bCreated;
454 FX_BOOL m_bVisible; 446 FX_BOOL m_bVisible;
455 FX_BOOL m_bNotifying; 447 FX_BOOL m_bNotifying;
456 FX_BOOL m_bEnabled; 448 FX_BOOL m_bEnabled;
457 }; 449 };
458 450
459 #endif // FPDFSDK_PDFWINDOW_PWL_WND_H_ 451 #endif // FPDFSDK_PDFWINDOW_PWL_WND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698