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 XFA_FWL_CORE_CFWL_CARET_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_CARET_H_ |
8 #define XFA_FWL_CORE_CFWL_CARET_H_ | 8 #define XFA_FWL_CORE_CFWL_CARET_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // CFWL_Widget | 28 // CFWL_Widget |
29 FWL_Type GetClassID() const override; | 29 FWL_Type GetClassID() const override; |
30 void DrawWidget(CFX_Graphics* pGraphics, | 30 void DrawWidget(CFX_Graphics* pGraphics, |
31 const CFX_Matrix* pMatrix = nullptr) override; | 31 const CFX_Matrix* pMatrix = nullptr) override; |
32 void OnProcessMessage(CFWL_Message* pMessage) override; | 32 void OnProcessMessage(CFWL_Message* pMessage) override; |
33 void OnDrawWidget(CFX_Graphics* pGraphics, | 33 void OnDrawWidget(CFX_Graphics* pGraphics, |
34 const CFX_Matrix* pMatrix) override; | 34 const CFX_Matrix* pMatrix) override; |
35 void Update() override; | 35 void Update() override; |
36 | 36 |
37 void ShowCaret(bool bFlag = true); | 37 void ShowCaret(); |
| 38 void HideCaret(); |
38 | 39 |
39 private: | 40 private: |
40 class Timer : public CFWL_Timer { | 41 class Timer : public CFWL_Timer { |
41 public: | 42 public: |
42 explicit Timer(CFWL_Caret* pCaret); | 43 explicit Timer(CFWL_Caret* pCaret); |
43 ~Timer() override {} | 44 ~Timer() override {} |
44 | 45 |
45 void Run(CFWL_TimerInfo* hTimer) override; | 46 void Run(CFWL_TimerInfo* hTimer) override; |
46 }; | 47 }; |
47 friend class CFWL_Caret::Timer; | 48 friend class CFWL_Caret::Timer; |
48 | 49 |
49 void DrawCaretBK(CFX_Graphics* pGraphics, | 50 void DrawCaretBK(CFX_Graphics* pGraphics, |
50 IFWL_ThemeProvider* pTheme, | 51 IFWL_ThemeProvider* pTheme, |
51 const CFX_Matrix* pMatrix); | 52 const CFX_Matrix* pMatrix); |
52 | 53 |
53 std::unique_ptr<CFWL_Caret::Timer> m_pTimer; | 54 std::unique_ptr<CFWL_Caret::Timer> m_pTimer; |
54 CFWL_TimerInfo* m_pTimerInfo; // not owned. | 55 CFWL_TimerInfo* m_pTimerInfo; // not owned. |
55 }; | 56 }; |
56 | 57 |
57 #endif // XFA_FWL_CORE_CFWL_CARET_H_ | 58 #endif // XFA_FWL_CORE_CFWL_CARET_H_ |
OLD | NEW |