| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 pParentWnd(NULL), | 226 pParentWnd(NULL), |
| 227 pMsgControl(NULL), | 227 pMsgControl(NULL), |
| 228 eCursorType(FXCT_ARROW), | 228 eCursorType(FXCT_ARROW), |
| 229 mtChild(1, 0, 0, 1, 0, 0) {} | 229 mtChild(1, 0, 0, 1, 0, 0) {} |
| 230 | 230 |
| 231 CFX_FloatRect rcRectWnd; // required | 231 CFX_FloatRect rcRectWnd; // required |
| 232 IFX_SystemHandler* pSystemHandler; // required | 232 IFX_SystemHandler* pSystemHandler; // required |
| 233 IFX_Edit_FontMap* pFontMap; // required for text window | 233 IFX_Edit_FontMap* pFontMap; // required for text window |
| 234 IPWL_Provider* pProvider; // required for self coordinate | 234 IPWL_Provider* pProvider; // required for self coordinate |
| 235 IPWL_FocusHandler* pFocusHandler; // optional | 235 IPWL_FocusHandler* pFocusHandler; // optional |
| 236 FX_DWORD dwFlags; // optional | 236 uint32_t dwFlags; // optional |
| 237 CPWL_Color sBackgroundColor; // optional | 237 CPWL_Color sBackgroundColor; // optional |
| 238 FX_HWND hAttachedWnd; // required for no-reader framework | 238 FX_HWND hAttachedWnd; // required for no-reader framework |
| 239 IPWL_SpellCheck* pSpellCheck; // required for spellchecking | 239 IPWL_SpellCheck* pSpellCheck; // required for spellchecking |
| 240 int32_t nBorderStyle; // optional | 240 int32_t nBorderStyle; // optional |
| 241 int32_t dwBorderWidth; // optional | 241 int32_t dwBorderWidth; // optional |
| 242 CPWL_Color sBorderColor; // optional | 242 CPWL_Color sBorderColor; // optional |
| 243 CPWL_Color sTextColor; // optional | 243 CPWL_Color sTextColor; // optional |
| 244 CPWL_Color sTextStrokeColor; // optional | 244 CPWL_Color sTextStrokeColor; // optional |
| 245 int32_t nTransparency; // optional | 245 int32_t nTransparency; // optional |
| 246 FX_FLOAT fFontSize; // optional | 246 FX_FLOAT fFontSize; // optional |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 void Create(const PWL_CREATEPARAM& cp); | 291 void Create(const PWL_CREATEPARAM& cp); |
| 292 virtual CFX_ByteString GetClassName() const; | 292 virtual CFX_ByteString GetClassName() const; |
| 293 void InvalidateFocusHandler(IPWL_FocusHandler* handler); | 293 void InvalidateFocusHandler(IPWL_FocusHandler* handler); |
| 294 void InvalidateProvider(IPWL_Provider* provider); | 294 void InvalidateProvider(IPWL_Provider* provider); |
| 295 void Destroy(); | 295 void Destroy(); |
| 296 void Move(const CFX_FloatRect& rcNew, FX_BOOL bReset, FX_BOOL bRefresh); | 296 void Move(const CFX_FloatRect& rcNew, FX_BOOL bReset, FX_BOOL bRefresh); |
| 297 virtual void InvalidateRect(CFX_FloatRect* pRect = NULL); | 297 virtual void InvalidateRect(CFX_FloatRect* pRect = NULL); |
| 298 | 298 |
| 299 void DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device); | 299 void DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device); |
| 300 | 300 |
| 301 virtual FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag); | 301 virtual FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag); |
| 302 virtual FX_BOOL OnKeyUp(uint16_t nChar, FX_DWORD nFlag); | 302 virtual FX_BOOL OnKeyUp(uint16_t nChar, uint32_t nFlag); |
| 303 virtual FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag); | 303 virtual FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag); |
| 304 virtual FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag); | 304 virtual FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, uint32_t nFlag); |
| 305 virtual FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag); | 305 virtual FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag); |
| 306 virtual FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag); | 306 virtual FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag); |
| 307 virtual FX_BOOL OnMButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag); | 307 virtual FX_BOOL OnMButtonDblClk(const CFX_FloatPoint& point, uint32_t nFlag); |
| 308 virtual FX_BOOL OnMButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag); | 308 virtual FX_BOOL OnMButtonDown(const CFX_FloatPoint& point, uint32_t nFlag); |
| 309 virtual FX_BOOL OnMButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag); | 309 virtual FX_BOOL OnMButtonUp(const CFX_FloatPoint& point, uint32_t nFlag); |
| 310 virtual FX_BOOL OnRButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag); | 310 virtual FX_BOOL OnRButtonDown(const CFX_FloatPoint& point, uint32_t nFlag); |
| 311 virtual FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag); | 311 virtual FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag); |
| 312 virtual FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag); | 312 virtual FX_BOOL OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag); |
| 313 virtual FX_BOOL OnMouseWheel(short zDelta, | 313 virtual FX_BOOL OnMouseWheel(short zDelta, |
| 314 const CFX_FloatPoint& point, | 314 const CFX_FloatPoint& point, |
| 315 FX_DWORD nFlag); | 315 uint32_t nFlag); |
| 316 | 316 |
| 317 virtual void SetFocus(); | 317 virtual void SetFocus(); |
| 318 virtual void KillFocus(); | 318 virtual void KillFocus(); |
| 319 void SetCapture(); | 319 void SetCapture(); |
| 320 void ReleaseCapture(); | 320 void ReleaseCapture(); |
| 321 | 321 |
| 322 virtual void OnNotify(CPWL_Wnd* pWnd, | 322 virtual void OnNotify(CPWL_Wnd* pWnd, |
| 323 FX_DWORD msg, | 323 uint32_t msg, |
| 324 intptr_t wParam = 0, | 324 intptr_t wParam = 0, |
| 325 intptr_t lParam = 0); | 325 intptr_t lParam = 0); |
| 326 virtual void SetTextColor(const CPWL_Color& color); | 326 virtual void SetTextColor(const CPWL_Color& color); |
| 327 virtual void SetTextStrokeColor(const CPWL_Color& color); | 327 virtual void SetTextStrokeColor(const CPWL_Color& color); |
| 328 virtual void SetVisible(FX_BOOL bVisible); | 328 virtual void SetVisible(FX_BOOL bVisible); |
| 329 | 329 |
| 330 virtual CFX_FloatRect GetFocusRect() const; | 330 virtual CFX_FloatRect GetFocusRect() const; |
| 331 virtual CPWL_Color GetBackgroundColor() const; | 331 virtual CPWL_Color GetBackgroundColor() const; |
| 332 virtual CPWL_Color GetBorderColor() const; | 332 virtual CPWL_Color GetBorderColor() const; |
| 333 virtual CPWL_Color GetTextColor() const; | 333 virtual CPWL_Color GetTextColor() const; |
| 334 virtual CPWL_Color GetTextStrokeColor() const; | 334 virtual CPWL_Color GetTextStrokeColor() const; |
| 335 virtual FX_FLOAT GetFontSize() const; | 335 virtual FX_FLOAT GetFontSize() const; |
| 336 virtual int32_t GetInnerBorderWidth() const; | 336 virtual int32_t GetInnerBorderWidth() const; |
| 337 virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const; | 337 virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const; |
| 338 virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const; | 338 virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const; |
| 339 | 339 |
| 340 virtual void SetFontSize(FX_FLOAT fFontSize); | 340 virtual void SetFontSize(FX_FLOAT fFontSize); |
| 341 | 341 |
| 342 void SetBackgroundColor(const CPWL_Color& color); | 342 void SetBackgroundColor(const CPWL_Color& color); |
| 343 void SetClipRect(const CFX_FloatRect& rect); | 343 void SetClipRect(const CFX_FloatRect& rect); |
| 344 void SetBorderStyle(int32_t eBorderStyle); | 344 void SetBorderStyle(int32_t eBorderStyle); |
| 345 | 345 |
| 346 virtual CFX_FloatRect GetWindowRect() const; | 346 virtual CFX_FloatRect GetWindowRect() const; |
| 347 virtual CFX_FloatRect GetClientRect() const; | 347 virtual CFX_FloatRect GetClientRect() const; |
| 348 CFX_FloatPoint GetCenterPoint() const; | 348 CFX_FloatPoint GetCenterPoint() const; |
| 349 int32_t GetBorderWidth() const; | 349 int32_t GetBorderWidth() const; |
| 350 FX_BOOL IsVisible() const { return m_bVisible; } | 350 FX_BOOL IsVisible() const { return m_bVisible; } |
| 351 FX_BOOL HasFlag(FX_DWORD dwFlags) const; | 351 FX_BOOL HasFlag(uint32_t dwFlags) const; |
| 352 void AddFlag(FX_DWORD dwFlags); | 352 void AddFlag(uint32_t dwFlags); |
| 353 void RemoveFlag(FX_DWORD dwFlags); | 353 void RemoveFlag(uint32_t dwFlags); |
| 354 const CFX_FloatRect& GetClipRect() const; | 354 const CFX_FloatRect& GetClipRect() const; |
| 355 CPWL_Wnd* GetParentWindow() const; | 355 CPWL_Wnd* GetParentWindow() const; |
| 356 int32_t GetBorderStyle() const; | 356 int32_t GetBorderStyle() const; |
| 357 const CPWL_Dash& GetBorderDash() const; | 357 const CPWL_Dash& GetBorderDash() const; |
| 358 void* GetAttachedData() const; | 358 void* GetAttachedData() const; |
| 359 | 359 |
| 360 FX_BOOL WndHitTest(const CFX_FloatPoint& point) const; | 360 FX_BOOL WndHitTest(const CFX_FloatPoint& point) const; |
| 361 FX_BOOL ClientHitTest(const CFX_FloatPoint& point) const; | 361 FX_BOOL ClientHitTest(const CFX_FloatPoint& point) const; |
| 362 FX_BOOL IsCaptureMouse() const; | 362 FX_BOOL IsCaptureMouse() const; |
| 363 | 363 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 const CFX_FloatRect& rcNew); | 427 const CFX_FloatRect& rcNew); |
| 428 | 428 |
| 429 void PWLtoWnd(const CFX_FloatPoint& point, int32_t& x, int32_t& y) const; | 429 void PWLtoWnd(const CFX_FloatPoint& point, int32_t& x, int32_t& y) const; |
| 430 FX_RECT PWLtoWnd(const CFX_FloatRect& rect) const; | 430 FX_RECT PWLtoWnd(const CFX_FloatRect& rect) const; |
| 431 FX_HWND GetAttachedHWnd() const; | 431 FX_HWND GetAttachedHWnd() const; |
| 432 | 432 |
| 433 FX_BOOL IsWndCaptureMouse(const CPWL_Wnd* pWnd) const; | 433 FX_BOOL IsWndCaptureMouse(const CPWL_Wnd* pWnd) const; |
| 434 FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd* pWnd) const; | 434 FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd* pWnd) const; |
| 435 const CPWL_Wnd* GetRootWnd() const; | 435 const CPWL_Wnd* GetRootWnd() const; |
| 436 | 436 |
| 437 FX_BOOL IsCTRLpressed(FX_DWORD nFlag) const; | 437 FX_BOOL IsCTRLpressed(uint32_t nFlag) const; |
| 438 FX_BOOL IsSHIFTpressed(FX_DWORD nFlag) const; | 438 FX_BOOL IsSHIFTpressed(uint32_t nFlag) const; |
| 439 FX_BOOL IsALTpressed(FX_DWORD nFlag) const; | 439 FX_BOOL IsALTpressed(uint32_t nFlag) const; |
| 440 FX_BOOL IsINSERTpressed(FX_DWORD nFlag) const; | 440 FX_BOOL IsINSERTpressed(uint32_t nFlag) const; |
| 441 | 441 |
| 442 private: | 442 private: |
| 443 void AddChild(CPWL_Wnd* pWnd); | 443 void AddChild(CPWL_Wnd* pWnd); |
| 444 void RemoveChild(CPWL_Wnd* pWnd); | 444 void RemoveChild(CPWL_Wnd* pWnd); |
| 445 | 445 |
| 446 void CreateScrollBar(const PWL_CREATEPARAM& cp); | 446 void CreateScrollBar(const PWL_CREATEPARAM& cp); |
| 447 void CreateVScrollBar(const PWL_CREATEPARAM& cp); | 447 void CreateVScrollBar(const PWL_CREATEPARAM& cp); |
| 448 | 448 |
| 449 void AdjustStyle(); | 449 void AdjustStyle(); |
| 450 void CreateMsgControl(); | 450 void CreateMsgControl(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 463 CFX_FloatRect m_rcWindow; | 463 CFX_FloatRect m_rcWindow; |
| 464 CFX_FloatRect m_rcClip; | 464 CFX_FloatRect m_rcClip; |
| 465 | 465 |
| 466 FX_BOOL m_bCreated; | 466 FX_BOOL m_bCreated; |
| 467 FX_BOOL m_bVisible; | 467 FX_BOOL m_bVisible; |
| 468 FX_BOOL m_bNotifying; | 468 FX_BOOL m_bNotifying; |
| 469 FX_BOOL m_bEnabled; | 469 FX_BOOL m_bEnabled; |
| 470 }; | 470 }; |
| 471 | 471 |
| 472 #endif // FPDFSDK_PDFWINDOW_PWL_WND_H_ | 472 #endif // FPDFSDK_PDFWINDOW_PWL_WND_H_ |
| OLD | NEW |