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_CLASS_Caret L"FWL_CARET" | 20 #define FWL_CLASS_Caret L"FWL_CARET" |
21 #define FWL_STATE_CAT_HightLight 1 | 21 #define FWL_STATE_CAT_HightLight 1 |
22 | 22 |
23 class IFWL_Caret : public IFWL_Widget { | 23 class IFWL_Caret : public IFWL_Widget { |
24 public: | 24 public: |
25 static IFWL_Caret* Create(const CFWL_WidgetImpProperties& properties, | |
26 IFWL_Widget* pOuter); | |
27 | |
28 IFWL_Caret(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter); | 25 IFWL_Caret(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter); |
29 ~IFWL_Caret() override; | 26 ~IFWL_Caret() override; |
30 | 27 |
31 // IFWL_Widget | 28 // IFWL_Widget |
32 FWL_Error GetClassName(CFX_WideString& wsClass) const override; | 29 FWL_Error GetClassName(CFX_WideString& wsClass) const override; |
33 FWL_Type GetClassID() const override; | 30 FWL_Type GetClassID() const override; |
34 FWL_Error Initialize() override; | 31 FWL_Error Initialize() override; |
35 FWL_Error Finalize() override; | 32 FWL_Error Finalize() override; |
36 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 33 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
37 const CFX_Matrix* pMatrix = nullptr) override; | 34 const CFX_Matrix* pMatrix = nullptr) override; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 CFWL_CaretImpDelegate(IFWL_Caret* pOwner); | 66 CFWL_CaretImpDelegate(IFWL_Caret* pOwner); |
70 void OnProcessMessage(CFWL_Message* pMessage) override; | 67 void OnProcessMessage(CFWL_Message* pMessage) override; |
71 void OnDrawWidget(CFX_Graphics* pGraphics, | 68 void OnDrawWidget(CFX_Graphics* pGraphics, |
72 const CFX_Matrix* pMatrix = nullptr) override; | 69 const CFX_Matrix* pMatrix = nullptr) override; |
73 | 70 |
74 protected: | 71 protected: |
75 IFWL_Caret* m_pOwner; | 72 IFWL_Caret* m_pOwner; |
76 }; | 73 }; |
77 | 74 |
78 #endif // XFA_FWL_CORE_IFWL_CARET_H_ | 75 #endif // XFA_FWL_CORE_IFWL_CARET_H_ |
OLD | NEW |