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_EDIT_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_EDIT_H_ |
8 #define XFA_FWL_CORE_IFWL_EDIT_H_ | 8 #define XFA_FWL_CORE_IFWL_EDIT_H_ |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 const CFX_Matrix* pMatrix = nullptr) override; | 109 const CFX_Matrix* pMatrix = nullptr) override; |
110 void SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override; | 110 void SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override; |
111 void OnProcessMessage(CFWL_Message* pMessage) override; | 111 void OnProcessMessage(CFWL_Message* pMessage) override; |
112 void OnProcessEvent(CFWL_Event* pEvent) override; | 112 void OnProcessEvent(CFWL_Event* pEvent) override; |
113 void OnDrawWidget(CFX_Graphics* pGraphics, | 113 void OnDrawWidget(CFX_Graphics* pGraphics, |
114 const CFX_Matrix* pMatrix) override; | 114 const CFX_Matrix* pMatrix) override; |
115 | 115 |
116 virtual void SetText(const CFX_WideString& wsText); | 116 virtual void SetText(const CFX_WideString& wsText); |
117 | 117 |
118 int32_t GetTextLength() const; | 118 int32_t GetTextLength() const; |
119 void GetText(CFX_WideString& wsText, int32_t nStart = 0, int32_t nCount = -1); | 119 void GetText(CFX_WideString& wsText, |
| 120 int32_t nStart = 0, |
| 121 int32_t nCount = -1) const; |
120 void ClearText(); | 122 void ClearText(); |
121 | 123 |
122 void AddSelRange(int32_t nStart, int32_t nCount = -1); | 124 void AddSelRange(int32_t nStart, int32_t nCount = -1); |
123 int32_t CountSelRanges(); | 125 int32_t CountSelRanges() const; |
124 int32_t GetSelRange(int32_t nIndex, int32_t& nStart); | 126 int32_t GetSelRange(int32_t nIndex, int32_t& nStart) const; |
125 void ClearSelections(); | 127 void ClearSelections(); |
126 int32_t GetLimit(); | 128 int32_t GetLimit() const; |
127 void SetLimit(int32_t nLimit); | 129 void SetLimit(int32_t nLimit); |
128 void SetAliasChar(FX_WCHAR wAlias); | 130 void SetAliasChar(FX_WCHAR wAlias); |
129 bool Copy(CFX_WideString& wsCopy); | 131 bool Copy(CFX_WideString& wsCopy); |
130 bool Cut(CFX_WideString& wsCut); | 132 bool Cut(CFX_WideString& wsCut); |
131 bool Paste(const CFX_WideString& wsPaste); | 133 bool Paste(const CFX_WideString& wsPaste); |
132 bool Redo(const IFDE_TxtEdtDoRecord* pRecord); | 134 bool Redo(const IFDE_TxtEdtDoRecord* pRecord); |
133 bool Undo(const IFDE_TxtEdtDoRecord* pRecord); | 135 bool Undo(const IFDE_TxtEdtDoRecord* pRecord); |
134 bool Undo(); | 136 bool Undo(); |
135 bool Redo(); | 137 bool Redo(); |
136 bool CanUndo(); | 138 bool CanUndo(); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 std::unique_ptr<IFWL_ScrollBar> m_pHorzScrollBar; | 225 std::unique_ptr<IFWL_ScrollBar> m_pHorzScrollBar; |
224 std::unique_ptr<IFWL_Caret> m_pCaret; | 226 std::unique_ptr<IFWL_Caret> m_pCaret; |
225 CFX_WideString m_wsCache; | 227 CFX_WideString m_wsCache; |
226 CFX_WideString m_wsFont; | 228 CFX_WideString m_wsFont; |
227 std::deque<std::unique_ptr<IFDE_TxtEdtDoRecord>> m_DoRecords; | 229 std::deque<std::unique_ptr<IFDE_TxtEdtDoRecord>> m_DoRecords; |
228 int32_t m_iCurRecord; | 230 int32_t m_iCurRecord; |
229 int32_t m_iMaxRecord; | 231 int32_t m_iMaxRecord; |
230 }; | 232 }; |
231 | 233 |
232 #endif // XFA_FWL_CORE_IFWL_EDIT_H_ | 234 #endif // XFA_FWL_CORE_IFWL_EDIT_H_ |
OLD | NEW |