| 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_INCLUDE_PDFWINDOW_PWL_WND_H_ | 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ |
| 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ | 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ |
| 9 | 9 |
| 10 #include "../../../core/include/fxcrt/fx_basic.h" | 10 #include "../../../core/include/fxcrt/fx_basic.h" |
| 11 #include "../../../core/include/fpdfdoc/fpdf_doc.h" | 11 #include "../../../core/include/fpdfdoc/fpdf_doc.h" |
| 12 #include "../fx_systemhandler.h" | 12 #include "../fx_systemhandler.h" |
| 13 | 13 |
| 14 class CPWL_MsgControl; | 14 class CPWL_MsgControl; |
| 15 class CPWL_ScrollBar; | 15 class CPWL_ScrollBar; |
| 16 class CPWL_Timer; | 16 class CPWL_Timer; |
| 17 class CPWL_TimerHandler; | 17 class CPWL_TimerHandler; |
| 18 class CPWL_Wnd; | 18 class CPWL_Wnd; |
| 19 class IFX_Edit_FontMap; | 19 class IFX_Edit_FontMap; |
| 20 class IFX_SystemHandler; | 20 class IFX_SystemHandler; |
| 21 class IPWL_Provider; | 21 class IPWL_Provider; |
| 22 class IPWL_SpellCheck; | 22 class IPWL_SpellCheck; |
| 23 | 23 |
| 24 #ifdef FX_READER_DLL | |
| 25 #ifdef PWL_EXPORT | |
| 26 #define PWL_CLASS __declspec(dllexport) | |
| 27 #define PWL_FUNCTION PWL_CLASS | |
| 28 #else | |
| 29 #define PWL_CLASS | |
| 30 #define PWL_FUNCTION | |
| 31 #endif | |
| 32 #else | |
| 33 #define PWL_CLASS | |
| 34 #define PWL_FUNCTION | |
| 35 #endif | |
| 36 | |
| 37 //window styles | 24 //window styles |
| 38 #define PWS_CHILD 0x800000
00L | 25 #define PWS_CHILD 0x800000
00L |
| 39 #define PWS_BORDER 0x400000
00L | 26 #define PWS_BORDER 0x400000
00L |
| 40 #define PWS_BACKGROUND 0x20000000L | 27 #define PWS_BACKGROUND 0x20000000L |
| 41 #define PWS_HSCROLL 0x100000
00L | 28 #define PWS_HSCROLL 0x100000
00L |
| 42 #define PWS_VSCROLL 0x080000
00L | 29 #define PWS_VSCROLL 0x080000
00L |
| 43 #define PWS_VISIBLE 0x040000
00L | 30 #define PWS_VISIBLE 0x040000
00L |
| 44 #define PWS_DISABLE 0x020000
00L | 31 #define PWS_DISABLE 0x020000
00L |
| 45 #define PWS_READONLY 0x01000000L | 32 #define PWS_READONLY 0x01000000L |
| 46 #define PWS_AUTOFONTSIZE 0x00800000L | 33 #define PWS_AUTOFONTSIZE 0x00800000L |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 struct CPWL_Dash | 95 struct CPWL_Dash |
| 109 { | 96 { |
| 110 CPWL_Dash(int32_t dash, int32_t gap, int32_t phase) : nDash(dash), nGap(
gap), nPhase(phase) | 97 CPWL_Dash(int32_t dash, int32_t gap, int32_t phase) : nDash(dash), nGap(
gap), nPhase(phase) |
| 111 {} | 98 {} |
| 112 | 99 |
| 113 int32_t nDash; | 100 int32_t nDash; |
| 114 int32_t nGap; | 101 int32_t nGap; |
| 115 int32_t nPhase; | 102 int32_t nPhase; |
| 116 }; | 103 }; |
| 117 | 104 |
| 118 struct PWL_CLASS CPWL_Color | 105 struct CPWL_Color |
| 119 { | 106 { |
| 120 CPWL_Color(int32_t type = COLORTYPE_TRANSPARENT, FX_FLOAT color1 = 0.0f,
FX_FLOAT color2 = 0.0f, FX_FLOAT color3 = 0.0f, FX_FLOAT color4 = 0.0f) | 107 CPWL_Color(int32_t type = COLORTYPE_TRANSPARENT, FX_FLOAT color1 = 0.0f,
FX_FLOAT color2 = 0.0f, FX_FLOAT color3 = 0.0f, FX_FLOAT color4 = 0.0f) |
| 121 : nColorType(type), fColor1(color1), fColor2(color2), fColor3(co
lor3), fColor4(color4) | 108 : nColorType(type), fColor1(color1), fColor2(color2), fColor3(co
lor3), fColor4(color4) |
| 122 {} | 109 {} |
| 123 | 110 |
| 124 CPWL_Color(int32_t r, int32_t g, int32_t b) : | 111 CPWL_Color(int32_t r, int32_t g, int32_t b) : |
| 125 nColorType(COLORTYPE_RGB), fColor1(r/255.0f), fColor2(g/255.0f),
fColor3(b/255.0f), fColor4(0) | 112 nColorType(COLORTYPE_RGB), fColor1(r/255.0f), fColor2(g/255.0f),
fColor3(b/255.0f), fColor4(0) |
| 126 {} | 113 {} |
| 127 | 114 |
| 128 void ConvertColorType(int32_t other_nColorType); | 115 void ConvertColorType(int32_t other_nColorType); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 int32_t SetPWLTimer(int3
2_t nElapse); | 253 int32_t SetPWLTimer(int3
2_t nElapse); |
| 267 void KillPWLT
imer(); | 254 void KillPWLT
imer(); |
| 268 static void TimerProc(int32_
t idEvent); | 255 static void TimerProc(int32_
t idEvent); |
| 269 | 256 |
| 270 private: | 257 private: |
| 271 int32_t m_nTimerID; | 258 int32_t m_nTimerID; |
| 272 CPWL_TimerHandler* m_pAttached; | 259 CPWL_TimerHandler* m_pAttached; |
| 273 IFX_SystemHandler* m_pSystemHandler
; | 260 IFX_SystemHandler* m_pSystemHandler
; |
| 274 }; | 261 }; |
| 275 | 262 |
| 276 class PWL_CLASS CPWL_TimerHandler | 263 class CPWL_TimerHandler |
| 277 { | 264 { |
| 278 public: | 265 public: |
| 279 CPWL_TimerHandler(); | 266 CPWL_TimerHandler(); |
| 280 virtual ~CPWL_TimerHandler(); | 267 virtual ~CPWL_TimerHandler(); |
| 281 | 268 |
| 282 void BeginTim
er(int32_t nElapse); | 269 void BeginTim
er(int32_t nElapse); |
| 283 void EndTimer
(); | 270 void EndTimer
(); |
| 284 virtual void TimerProc(); | 271 virtual void TimerProc(); |
| 285 virtual IFX_SystemHandler* GetSystemHandler() const
= 0; | 272 virtual IFX_SystemHandler* GetSystemHandler() const
= 0; |
| 286 | 273 |
| 287 private: | 274 private: |
| 288 CPWL_Timer* m_pTimer
; | 275 CPWL_Timer* m_pTimer
; |
| 289 }; | 276 }; |
| 290 | 277 |
| 291 class PWL_CLASS CPWL_Wnd : public CPWL_TimerHandler | 278 class CPWL_Wnd : public CPWL_TimerHandler |
| 292 { | 279 { |
| 293 friend class CPWL_MsgControl; | 280 friend class CPWL_MsgControl; |
| 294 public: | 281 public: |
| 295 CPWL_Wnd(); | 282 CPWL_Wnd(); |
| 296 virtual ~CPWL_Wnd(); | 283 virtual ~CPWL_Wnd(); |
| 297 | 284 |
| 298 void Create(const PWL
_CREATEPARAM & cp); | 285 void Create(const PWL
_CREATEPARAM & cp); |
| 299 virtual CFX_ByteString GetClassName() const; | 286 virtual CFX_ByteString GetClassName() const; |
| 300 void Destroy(); | 287 void Destroy(); |
| 301 void Move(const CPDF_
Rect & rcNew,FX_BOOL bReset,FX_BOOL bRefresh); | 288 void Move(const CPDF_
Rect & rcNew,FX_BOOL bReset,FX_BOOL bRefresh); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 CPDF_Rect m_rcWindow; | 454 CPDF_Rect m_rcWindow; |
| 468 CPDF_Rect m_rcClip; | 455 CPDF_Rect m_rcClip; |
| 469 | 456 |
| 470 FX_BOOL m_bCreated; | 457 FX_BOOL m_bCreated; |
| 471 FX_BOOL m_bVisible; | 458 FX_BOOL m_bVisible; |
| 472 FX_BOOL m_bNotifying; | 459 FX_BOOL m_bNotifying; |
| 473 FX_BOOL m_bEnabled; | 460 FX_BOOL m_bEnabled; |
| 474 }; | 461 }; |
| 475 | 462 |
| 476 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ | 463 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ |
| OLD | NEW |