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/fpdfdoc/fpdf_doc.h" | 10 #include "core/include/fpdfdoc/fpdf_doc.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 ~CPWL_Wnd() override; | 287 ~CPWL_Wnd() override; |
288 | 288 |
289 void Create(const PWL_CREATEPARAM& cp); | 289 void Create(const PWL_CREATEPARAM& cp); |
290 virtual CFX_ByteString GetClassName() const; | 290 virtual CFX_ByteString GetClassName() const; |
291 void InvalidateFocusHandler(IPWL_FocusHandler* handler); | 291 void InvalidateFocusHandler(IPWL_FocusHandler* handler); |
292 void InvalidateProvider(IPWL_Provider* provider); | 292 void InvalidateProvider(IPWL_Provider* provider); |
293 void Destroy(); | 293 void Destroy(); |
294 void Move(const CPDF_Rect& rcNew, FX_BOOL bReset, FX_BOOL bRefresh); | 294 void Move(const CPDF_Rect& rcNew, FX_BOOL bReset, FX_BOOL bRefresh); |
295 virtual void InvalidateRect(CPDF_Rect* pRect = NULL); | 295 virtual void InvalidateRect(CPDF_Rect* pRect = NULL); |
296 | 296 |
297 void GetAppearanceStream(CFX_ByteString& sAppStream); | |
298 void DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device); | 297 void DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device); |
299 | 298 |
300 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); | 299 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); |
301 virtual FX_BOOL OnKeyUp(FX_WORD nChar, FX_DWORD nFlag); | 300 virtual FX_BOOL OnKeyUp(FX_WORD nChar, FX_DWORD nFlag); |
302 virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); | 301 virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); |
303 virtual FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag); | 302 virtual FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag); |
304 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); | 303 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); |
305 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); | 304 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); |
306 virtual FX_BOOL OnMButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag); | 305 virtual FX_BOOL OnMButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag); |
307 virtual FX_BOOL OnMButtonDown(const CPDF_Point& point, FX_DWORD nFlag); | 306 virtual FX_BOOL OnMButtonDown(const CPDF_Point& point, FX_DWORD nFlag); |
(...skipping 26 matching lines...) Expand all Loading... |
334 virtual FX_FLOAT GetFontSize() const; | 333 virtual FX_FLOAT GetFontSize() const; |
335 virtual int32_t GetInnerBorderWidth() const; | 334 virtual int32_t GetInnerBorderWidth() const; |
336 virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const; | 335 virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const; |
337 virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const; | 336 virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const; |
338 | 337 |
339 virtual FX_BOOL IsModified() const { return FALSE; } | 338 virtual FX_BOOL IsModified() const { return FALSE; } |
340 | 339 |
341 virtual void SetFontSize(FX_FLOAT fFontSize); | 340 virtual void SetFontSize(FX_FLOAT fFontSize); |
342 | 341 |
343 void SetBackgroundColor(const CPWL_Color& color); | 342 void SetBackgroundColor(const CPWL_Color& color); |
344 void SetBorderColor(const CPWL_Color& color); | |
345 void SetBorderWidth(int32_t nBorderWidth); | |
346 void SetClipRect(const CPDF_Rect& rect); | 343 void SetClipRect(const CPDF_Rect& rect); |
347 void SetBorderStyle(int32_t eBorderStyle); | 344 void SetBorderStyle(int32_t eBorderStyle); |
348 void SetBorderDash(const CPWL_Dash& sDash); | |
349 | 345 |
350 CPDF_Rect GetOriginWindowRect() const; | |
351 virtual CPDF_Rect GetWindowRect() const; | 346 virtual CPDF_Rect GetWindowRect() const; |
352 virtual CPDF_Rect GetClientRect() const; | 347 virtual CPDF_Rect GetClientRect() const; |
353 CPDF_Point GetCenterPoint() const; | 348 CPDF_Point GetCenterPoint() const; |
354 CPDF_Rect GetClientCenterSquare() const; | |
355 CPDF_Rect GetWindowCenterSquare() const; | |
356 int32_t GetBorderWidth() const; | 349 int32_t GetBorderWidth() const; |
357 FX_BOOL IsVisible() const { return m_bVisible; } | 350 FX_BOOL IsVisible() const { return m_bVisible; } |
358 FX_BOOL HasFlag(FX_DWORD dwFlags) const; | 351 FX_BOOL HasFlag(FX_DWORD dwFlags) const; |
359 void AddFlag(FX_DWORD dwFlags); | 352 void AddFlag(FX_DWORD dwFlags); |
360 void RemoveFlag(FX_DWORD dwFlags); | 353 void RemoveFlag(FX_DWORD dwFlags); |
361 CPDF_Rect GetClipRect() const; | 354 const CPDF_Rect& GetClipRect() const; |
362 CPWL_Wnd* GetParentWindow() const; | 355 CPWL_Wnd* GetParentWindow() const; |
363 int32_t GetBorderStyle() const; | 356 int32_t GetBorderStyle() const; |
364 CPWL_Dash GetBorderDash() const; | 357 const CPWL_Dash& GetBorderDash() const; |
365 void* GetAttachedData() const; | 358 void* GetAttachedData() const; |
366 | 359 |
367 FX_BOOL WndHitTest(const CPDF_Point& point) const; | 360 FX_BOOL WndHitTest(const CPDF_Point& point) const; |
368 FX_BOOL ClientHitTest(const CPDF_Point& point) const; | 361 FX_BOOL ClientHitTest(const CPDF_Point& point) const; |
369 FX_BOOL IsCaptureMouse() const; | 362 FX_BOOL IsCaptureMouse() const; |
370 | 363 |
371 const CPWL_Wnd* GetFocused() const; | 364 const CPWL_Wnd* GetFocused() const; |
372 FX_BOOL IsFocused() const; | 365 FX_BOOL IsFocused() const; |
373 FX_BOOL IsReadOnly() const; | 366 FX_BOOL IsReadOnly() const; |
374 CPWL_ScrollBar* GetVScrollBar() const; | 367 CPWL_ScrollBar* GetVScrollBar() const; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 | 413 |
421 virtual void OnSetFocus(); | 414 virtual void OnSetFocus(); |
422 virtual void OnKillFocus(); | 415 virtual void OnKillFocus(); |
423 | 416 |
424 virtual void OnEnabled(); | 417 virtual void OnEnabled(); |
425 virtual void OnDisabled(); | 418 virtual void OnDisabled(); |
426 | 419 |
427 void SetNotifyFlag(FX_BOOL bNotifying = TRUE) { m_bNotifying = bNotifying; } | 420 void SetNotifyFlag(FX_BOOL bNotifying = TRUE) { m_bNotifying = bNotifying; } |
428 | 421 |
429 FX_BOOL IsValid() const; | 422 FX_BOOL IsValid() const; |
430 PWL_CREATEPARAM GetCreationParam() const; | 423 const PWL_CREATEPARAM& GetCreationParam() const; |
431 FX_BOOL IsNotifying() const { return m_bNotifying; } | 424 FX_BOOL IsNotifying() const { return m_bNotifying; } |
432 | 425 |
433 void InvalidateRectMove(const CPDF_Rect& rcOld, const CPDF_Rect& rcNew); | 426 void InvalidateRectMove(const CPDF_Rect& rcOld, const CPDF_Rect& rcNew); |
434 | 427 |
435 void PWLtoWnd(const CPDF_Point& point, int32_t& x, int32_t& y) const; | 428 void PWLtoWnd(const CPDF_Point& point, int32_t& x, int32_t& y) const; |
436 FX_RECT PWLtoWnd(const CPDF_Rect& rect) const; | 429 FX_RECT PWLtoWnd(const CPDF_Rect& rect) const; |
437 FX_HWND GetAttachedHWnd() const; | 430 FX_HWND GetAttachedHWnd() const; |
438 | 431 |
439 FX_BOOL IsWndCaptureMouse(const CPWL_Wnd* pWnd) const; | 432 FX_BOOL IsWndCaptureMouse(const CPWL_Wnd* pWnd) const; |
440 FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd* pWnd) const; | 433 FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd* pWnd) const; |
(...skipping 28 matching lines...) Expand all Loading... |
469 CPDF_Rect m_rcWindow; | 462 CPDF_Rect m_rcWindow; |
470 CPDF_Rect m_rcClip; | 463 CPDF_Rect m_rcClip; |
471 | 464 |
472 FX_BOOL m_bCreated; | 465 FX_BOOL m_bCreated; |
473 FX_BOOL m_bVisible; | 466 FX_BOOL m_bVisible; |
474 FX_BOOL m_bNotifying; | 467 FX_BOOL m_bNotifying; |
475 FX_BOOL m_bEnabled; | 468 FX_BOOL m_bEnabled; |
476 }; | 469 }; |
477 | 470 |
478 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ | 471 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ |
OLD | NEW |