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_EDIT_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_EDIT_H_ |
8 #define XFA_FWL_CORE_CFWL_EDIT_H_ | 8 #define XFA_FWL_CORE_CFWL_EDIT_H_ |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 int32_t nPageIndex, | 112 int32_t nPageIndex, |
113 int32_t nPurpose); | 113 int32_t nPurpose); |
114 bool On_PageUnload(CFDE_TxtEdtEngine* pEdit, | 114 bool On_PageUnload(CFDE_TxtEdtEngine* pEdit, |
115 int32_t nPageIndex, | 115 int32_t nPageIndex, |
116 int32_t nPurpose); | 116 int32_t nPurpose); |
117 void On_AddDoRecord(CFDE_TxtEdtEngine* pEdit, IFDE_TxtEdtDoRecord* pRecord); | 117 void On_AddDoRecord(CFDE_TxtEdtEngine* pEdit, IFDE_TxtEdtDoRecord* pRecord); |
118 bool On_Validate(CFDE_TxtEdtEngine* pEdit, CFX_WideString& wsText); | 118 bool On_Validate(CFDE_TxtEdtEngine* pEdit, CFX_WideString& wsText); |
119 void SetScrollOffset(FX_FLOAT fScrollOffset); | 119 void SetScrollOffset(FX_FLOAT fScrollOffset); |
120 | 120 |
121 protected: | 121 protected: |
122 void ShowCaret(bool bVisible, CFX_RectF* pRect = nullptr); | 122 void ShowCaret(CFX_RectF* pRect); |
| 123 void HideCaret(CFX_RectF* pRect); |
123 const CFX_RectF& GetRTClient() const { return m_rtClient; } | 124 const CFX_RectF& GetRTClient() const { return m_rtClient; } |
124 CFDE_TxtEdtEngine* GetTxtEdtEngine() { return &m_EdtEngine; } | 125 CFDE_TxtEdtEngine* GetTxtEdtEngine() { return &m_EdtEngine; } |
125 | 126 |
126 private: | 127 private: |
127 void DrawTextBk(CFX_Graphics* pGraphics, | 128 void DrawTextBk(CFX_Graphics* pGraphics, |
128 IFWL_ThemeProvider* pTheme, | 129 IFWL_ThemeProvider* pTheme, |
129 const CFX_Matrix* pMatrix = nullptr); | 130 const CFX_Matrix* pMatrix = nullptr); |
130 void DrawContent(CFX_Graphics* pGraphics, | 131 void DrawContent(CFX_Graphics* pGraphics, |
131 IFWL_ThemeProvider* pTheme, | 132 IFWL_ThemeProvider* pTheme, |
132 const CFX_Matrix* pMatrix = nullptr); | 133 const CFX_Matrix* pMatrix = nullptr); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 std::unique_ptr<CFWL_ScrollBar> m_pHorzScrollBar; | 188 std::unique_ptr<CFWL_ScrollBar> m_pHorzScrollBar; |
188 std::unique_ptr<CFWL_Caret> m_pCaret; | 189 std::unique_ptr<CFWL_Caret> m_pCaret; |
189 CFX_WideString m_wsCache; | 190 CFX_WideString m_wsCache; |
190 CFX_WideString m_wsFont; | 191 CFX_WideString m_wsFont; |
191 std::deque<std::unique_ptr<IFDE_TxtEdtDoRecord>> m_DoRecords; | 192 std::deque<std::unique_ptr<IFDE_TxtEdtDoRecord>> m_DoRecords; |
192 int32_t m_iCurRecord; | 193 int32_t m_iCurRecord; |
193 int32_t m_iMaxRecord; | 194 int32_t m_iMaxRecord; |
194 }; | 195 }; |
195 | 196 |
196 #endif // XFA_FWL_CORE_CFWL_EDIT_H_ | 197 #endif // XFA_FWL_CORE_CFWL_EDIT_H_ |
OLD | NEW |