| OLD | NEW |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #define PNM_LBUTTONUP 0x00000006L | 78 #define PNM_LBUTTONUP 0x00000006L |
| 79 #define PNM_MOUSEMOVE 0x00000007L | 79 #define PNM_MOUSEMOVE 0x00000007L |
| 80 #define PNM_NOTERESET 0x00000008L | 80 #define PNM_NOTERESET 0x00000008L |
| 81 #define PNM_SETCARETINFO 0x00000009L | 81 #define PNM_SETCARETINFO 0x00000009L |
| 82 #define PNM_SELCHANGED 0x0000000AL | 82 #define PNM_SELCHANGED 0x0000000AL |
| 83 #define PNM_NOTEEDITCHANGED 0x0000000BL | 83 #define PNM_NOTEEDITCHANGED 0x0000000BL |
| 84 | 84 |
| 85 #define PWL_CLASSNAME_EDIT "CPWL_Edit" | 85 #define PWL_CLASSNAME_EDIT "CPWL_Edit" |
| 86 | 86 |
| 87 struct CPWL_Dash { | 87 struct CPWL_Dash { |
| 88 CPWL_Dash() : nDash(0), nGap(0), nPhase(0) {} |
| 88 CPWL_Dash(int32_t dash, int32_t gap, int32_t phase) | 89 CPWL_Dash(int32_t dash, int32_t gap, int32_t phase) |
| 89 : nDash(dash), nGap(gap), nPhase(phase) {} | 90 : nDash(dash), nGap(gap), nPhase(phase) {} |
| 90 | 91 |
| 91 int32_t nDash; | 92 int32_t nDash; |
| 92 int32_t nGap; | 93 int32_t nGap; |
| 93 int32_t nPhase; | 94 int32_t nPhase; |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 struct CPWL_Color { | 97 struct CPWL_Color { |
| 97 CPWL_Color(int32_t type = COLORTYPE_TRANSPARENT, | 98 CPWL_Color(int32_t type = COLORTYPE_TRANSPARENT, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 180 |
| 180 class IPWL_FocusHandler { | 181 class IPWL_FocusHandler { |
| 181 public: | 182 public: |
| 182 virtual ~IPWL_FocusHandler() {} | 183 virtual ~IPWL_FocusHandler() {} |
| 183 virtual void OnSetFocus(CPWL_Wnd* pWnd) = 0; | 184 virtual void OnSetFocus(CPWL_Wnd* pWnd) = 0; |
| 184 virtual void OnKillFocus(CPWL_Wnd* pWnd) = 0; | 185 virtual void OnKillFocus(CPWL_Wnd* pWnd) = 0; |
| 185 }; | 186 }; |
| 186 | 187 |
| 187 struct PWL_CREATEPARAM { | 188 struct PWL_CREATEPARAM { |
| 188 public: | 189 public: |
| 189 PWL_CREATEPARAM() | 190 PWL_CREATEPARAM(); |
| 190 : rcRectWnd(0, 0, 0, 0), | 191 PWL_CREATEPARAM(const PWL_CREATEPARAM& other); |
| 191 pSystemHandler(nullptr), | |
| 192 pFontMap(nullptr), | |
| 193 pProvider(nullptr), | |
| 194 pFocusHandler(nullptr), | |
| 195 dwFlags(0), | |
| 196 sBackgroundColor(), | |
| 197 hAttachedWnd(nullptr), | |
| 198 nBorderStyle(BorderStyle::SOLID), | |
| 199 dwBorderWidth(1), | |
| 200 sBorderColor(), | |
| 201 sTextColor(), | |
| 202 sTextStrokeColor(), | |
| 203 nTransparency(255), | |
| 204 fFontSize(PWL_DEFAULT_FONTSIZE), | |
| 205 sDash(3, 0, 0), | |
| 206 pAttachedData(nullptr), | |
| 207 pParentWnd(nullptr), | |
| 208 pMsgControl(nullptr), | |
| 209 eCursorType(FXCT_ARROW), | |
| 210 mtChild(1, 0, 0, 1, 0, 0) {} | |
| 211 | 192 |
| 212 CFX_FloatRect rcRectWnd; // required | 193 CFX_FloatRect rcRectWnd; // required |
| 213 CFX_SystemHandler* pSystemHandler; // required | 194 CFX_SystemHandler* pSystemHandler; // required |
| 214 IPVT_FontMap* pFontMap; // required for text window | 195 IPVT_FontMap* pFontMap; // required for text window |
| 215 IPWL_Provider* pProvider; // required for self coordinate | 196 IPWL_Provider* pProvider; // required for self coordinate |
| 216 IPWL_FocusHandler* pFocusHandler; // optional | 197 IPWL_FocusHandler* pFocusHandler; // optional |
| 217 uint32_t dwFlags; // optional | 198 uint32_t dwFlags; // optional |
| 218 CPWL_Color sBackgroundColor; // optional | 199 CPWL_Color sBackgroundColor; // optional |
| 219 FX_HWND hAttachedWnd; // required for no-reader framework | 200 FX_HWND hAttachedWnd; // required for no-reader framework |
| 220 BorderStyle nBorderStyle; // optional | 201 BorderStyle nBorderStyle; // optional |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 CFX_Matrix GetChildMatrix() const; | 338 CFX_Matrix GetChildMatrix() const; |
| 358 void SetChildMatrix(const CFX_Matrix& mt); | 339 void SetChildMatrix(const CFX_Matrix& mt); |
| 359 CFX_Matrix GetWindowMatrix() const; | 340 CFX_Matrix GetWindowMatrix() const; |
| 360 | 341 |
| 361 virtual CFX_FloatPoint ChildToParent(const CFX_FloatPoint& point) const; | 342 virtual CFX_FloatPoint ChildToParent(const CFX_FloatPoint& point) const; |
| 362 virtual CFX_FloatRect ChildToParent(const CFX_FloatRect& rect) const; | 343 virtual CFX_FloatRect ChildToParent(const CFX_FloatRect& rect) const; |
| 363 virtual CFX_FloatPoint ParentToChild(const CFX_FloatPoint& point) const; | 344 virtual CFX_FloatPoint ParentToChild(const CFX_FloatPoint& point) const; |
| 364 virtual CFX_FloatRect ParentToChild(const CFX_FloatRect& rect) const; | 345 virtual CFX_FloatRect ParentToChild(const CFX_FloatRect& rect) const; |
| 365 | 346 |
| 366 // those methods only implemented by listctrl item | 347 // those methods only implemented by listctrl item |
| 367 virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) { return 0; } | 348 virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth); |
| 368 virtual FX_FLOAT GetItemLeftMargin() { return 0; } | 349 virtual FX_FLOAT GetItemLeftMargin(); |
| 369 virtual FX_FLOAT GetItemRightMargin() { return 0; } | 350 virtual FX_FLOAT GetItemRightMargin(); |
| 370 | 351 |
| 371 void EnableWindow(FX_BOOL bEnable); | 352 void EnableWindow(FX_BOOL bEnable); |
| 372 FX_BOOL IsEnabled(); | 353 FX_BOOL IsEnabled(); |
| 373 virtual void SetCursor(); | 354 virtual void SetCursor(); |
| 374 | 355 |
| 375 protected: | 356 protected: |
| 376 // CPWL_TimerHandler | 357 // CPWL_TimerHandler |
| 377 CFX_SystemHandler* GetSystemHandler() const override; | 358 CFX_SystemHandler* GetSystemHandler() const override; |
| 378 | 359 |
| 379 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); | 360 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 CFX_FloatRect m_rcWindow; | 423 CFX_FloatRect m_rcWindow; |
| 443 CFX_FloatRect m_rcClip; | 424 CFX_FloatRect m_rcClip; |
| 444 | 425 |
| 445 FX_BOOL m_bCreated; | 426 FX_BOOL m_bCreated; |
| 446 FX_BOOL m_bVisible; | 427 FX_BOOL m_bVisible; |
| 447 FX_BOOL m_bNotifying; | 428 FX_BOOL m_bNotifying; |
| 448 FX_BOOL m_bEnabled; | 429 FX_BOOL m_bEnabled; |
| 449 }; | 430 }; |
| 450 | 431 |
| 451 #endif // FPDFSDK_PDFWINDOW_PWL_WND_H_ | 432 #endif // FPDFSDK_PDFWINDOW_PWL_WND_H_ |
| OLD | NEW |