| 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> |
| 11 | 11 |
| 12 #include "xfa/fwl/core/ifwl_timer.h" | 12 #include "xfa/fwl/core/ifwl_timer.h" |
| 13 #include "xfa/fwl/core/ifwl_widget.h" | 13 #include "xfa/fwl/core/ifwl_widget.h" |
| 14 #include "xfa/fxgraphics/cfx_color.h" | 14 #include "xfa/fxgraphics/cfx_color.h" |
| 15 | 15 |
| 16 class CFWL_WidgetImpProperties; | 16 class CFWL_WidgetImpProperties; |
| 17 class IFWL_Widget; | 17 class IFWL_Widget; |
| 18 class CFWL_CaretImpDelegate; | 18 class CFWL_CaretImpDelegate; |
| 19 | 19 |
| 20 #define FWL_STATE_CAT_HightLight 1 | 20 #define FWL_STATE_CAT_HightLight 1 |
| 21 | 21 |
| 22 class IFWL_Caret : public IFWL_Widget { | 22 class IFWL_Caret : public IFWL_Widget { |
| 23 public: | 23 public: |
| 24 IFWL_Caret(const IFWL_App* app, | 24 IFWL_Caret(const IFWL_App* app, |
| 25 const CFWL_WidgetImpProperties& properties, | 25 const CFWL_WidgetImpProperties& properties, |
| 26 IFWL_Widget* pOuter); | 26 IFWL_Widget* pOuter); |
| 27 ~IFWL_Caret() override; | 27 ~IFWL_Caret() override; |
| 28 | 28 |
| 29 // IFWL_Widget | 29 // IFWL_Widget |
| 30 void Initialize() override; | |
| 31 void Finalize() override; | |
| 32 FWL_Type GetClassID() const override; | 30 FWL_Type GetClassID() const override; |
| 33 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 31 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
| 34 const CFX_Matrix* pMatrix = nullptr) override; | 32 const CFX_Matrix* pMatrix = nullptr) override; |
| 35 | 33 |
| 36 void ShowCaret(FX_BOOL bFlag = TRUE); | 34 void ShowCaret(FX_BOOL bFlag = TRUE); |
| 37 FWL_Error GetFrequency(uint32_t& elapse); | 35 FWL_Error GetFrequency(uint32_t& elapse); |
| 38 FWL_Error SetFrequency(uint32_t elapse); | 36 FWL_Error SetFrequency(uint32_t elapse); |
| 39 FWL_Error SetColor(CFX_Color crFill); | 37 FWL_Error SetColor(CFX_Color crFill); |
| 40 | 38 |
| 41 protected: | 39 protected: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 66 CFWL_CaretImpDelegate(IFWL_Caret* pOwner); | 64 CFWL_CaretImpDelegate(IFWL_Caret* pOwner); |
| 67 void OnProcessMessage(CFWL_Message* pMessage) override; | 65 void OnProcessMessage(CFWL_Message* pMessage) override; |
| 68 void OnDrawWidget(CFX_Graphics* pGraphics, | 66 void OnDrawWidget(CFX_Graphics* pGraphics, |
| 69 const CFX_Matrix* pMatrix = nullptr) override; | 67 const CFX_Matrix* pMatrix = nullptr) override; |
| 70 | 68 |
| 71 protected: | 69 protected: |
| 72 IFWL_Caret* m_pOwner; | 70 IFWL_Caret* m_pOwner; |
| 73 }; | 71 }; |
| 74 | 72 |
| 75 #endif // XFA_FWL_CORE_IFWL_CARET_H_ | 73 #endif // XFA_FWL_CORE_IFWL_CARET_H_ |
| OLD | NEW |