| 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_IFWL_CARET_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_CARET_H_ |
| 8 #define XFA_FWL_CORE_IFWL_CARET_H_ | 8 #define XFA_FWL_CORE_IFWL_CARET_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 // IFWL_Widget | 28 // IFWL_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 | 35 |
| 36 void ShowCaret(bool bFlag = true); | 36 void ShowCaret(bool bFlag = true); |
| 37 FWL_Error GetFrequency(uint32_t& elapse); | |
| 38 FWL_Error SetFrequency(uint32_t elapse); | |
| 39 FWL_Error SetColor(CFX_Color crFill); | |
| 40 | 37 |
| 41 protected: | 38 private: |
| 42 class Timer : public IFWL_Timer { | 39 class Timer : public IFWL_Timer { |
| 43 public: | 40 public: |
| 44 explicit Timer(IFWL_Caret* pCaret); | 41 explicit Timer(IFWL_Caret* pCaret); |
| 45 ~Timer() override {} | 42 ~Timer() override {} |
| 46 | 43 |
| 47 void Run(IFWL_TimerInfo* hTimer) override; | 44 void Run(IFWL_TimerInfo* hTimer) override; |
| 48 }; | 45 }; |
| 49 friend class IFWL_Caret::Timer; | 46 friend class IFWL_Caret::Timer; |
| 50 | 47 |
| 51 void DrawCaretBK(CFX_Graphics* pGraphics, | 48 void DrawCaretBK(CFX_Graphics* pGraphics, |
| 52 IFWL_ThemeProvider* pTheme, | 49 IFWL_ThemeProvider* pTheme, |
| 53 const CFX_Matrix* pMatrix); | 50 const CFX_Matrix* pMatrix); |
| 54 | 51 |
| 55 std::unique_ptr<IFWL_Caret::Timer> m_pTimer; | 52 std::unique_ptr<IFWL_Caret::Timer> m_pTimer; |
| 56 IFWL_TimerInfo* m_pTimerInfo; // not owned. | 53 IFWL_TimerInfo* m_pTimerInfo; // not owned. |
| 57 uint32_t m_dwElapse; | |
| 58 CFX_Color m_crFill; | |
| 59 bool m_bSetColor; | |
| 60 }; | 54 }; |
| 61 | 55 |
| 62 #endif // XFA_FWL_CORE_IFWL_CARET_H_ | 56 #endif // XFA_FWL_CORE_IFWL_CARET_H_ |
| OLD | NEW |