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_BASEWIDGET_IFWL_EDIT_H_ | 7 #ifndef XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ |
8 #define XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ | 8 #define XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 class IFWL_EditDP : public IFWL_DataProvider {}; | 96 class IFWL_EditDP : public IFWL_DataProvider {}; |
97 | 97 |
98 class IFWL_Edit : public IFWL_Widget { | 98 class IFWL_Edit : public IFWL_Widget { |
99 public: | 99 public: |
100 static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties, | 100 static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties, |
101 IFWL_Widget* pOuter); | 101 IFWL_Widget* pOuter); |
102 static IFWL_Edit* CreateComboEdit(const CFWL_WidgetImpProperties& properties, | 102 static IFWL_Edit* CreateComboEdit(const CFWL_WidgetImpProperties& properties, |
103 IFWL_Widget* pOuter); | 103 IFWL_Widget* pOuter); |
104 | 104 |
105 FWL_ERR SetText(const CFX_WideString& wsText); | 105 FWL_Error SetText(const CFX_WideString& wsText); |
106 int32_t GetTextLength() const; | 106 int32_t GetTextLength() const; |
107 FWL_ERR GetText(CFX_WideString& wsText, | 107 FWL_Error GetText(CFX_WideString& wsText, |
108 int32_t nStart = 0, | 108 int32_t nStart = 0, |
109 int32_t nCount = -1) const; | 109 int32_t nCount = -1) const; |
110 FWL_ERR ClearText(); | 110 FWL_Error ClearText(); |
111 int32_t GetCaretPos() const; | 111 int32_t GetCaretPos() const; |
112 int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); | 112 int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); |
113 FWL_ERR AddSelRange(int32_t nStart, int32_t nCount = -1); | 113 FWL_Error AddSelRange(int32_t nStart, int32_t nCount = -1); |
114 int32_t CountSelRanges(); | 114 int32_t CountSelRanges(); |
115 int32_t GetSelRange(int32_t nIndex, int32_t& nStart); | 115 int32_t GetSelRange(int32_t nIndex, int32_t& nStart); |
116 FWL_ERR ClearSelections(); | 116 FWL_Error ClearSelections(); |
117 int32_t GetLimit(); | 117 int32_t GetLimit(); |
118 FWL_ERR SetLimit(int32_t nLimit); | 118 FWL_Error SetLimit(int32_t nLimit); |
119 FWL_ERR SetAliasChar(FX_WCHAR wAlias); | 119 FWL_Error SetAliasChar(FX_WCHAR wAlias); |
120 FWL_ERR SetFormatString(const CFX_WideString& wsFormat); | 120 FWL_Error SetFormatString(const CFX_WideString& wsFormat); |
121 FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen); | 121 FWL_Error Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen); |
122 FWL_ERR DeleteSelections(); | 122 FWL_Error DeleteSelections(); |
123 FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1); | 123 FWL_Error DeleteRange(int32_t nStart, int32_t nCount = -1); |
124 FWL_ERR ReplaceSelections(const CFX_WideStringC& wsReplace); | 124 FWL_Error ReplaceSelections(const CFX_WideStringC& wsReplace); |
125 FWL_ERR Replace(int32_t nStart, | 125 FWL_Error Replace(int32_t nStart, |
126 int32_t nLen, | 126 int32_t nLen, |
127 const CFX_WideStringC& wsReplace); | 127 const CFX_WideStringC& wsReplace); |
128 FWL_ERR DoClipboard(int32_t iCmd); | 128 FWL_Error DoClipboard(int32_t iCmd); |
129 FX_BOOL Copy(CFX_WideString& wsCopy); | 129 FX_BOOL Copy(CFX_WideString& wsCopy); |
130 FX_BOOL Cut(CFX_WideString& wsCut); | 130 FX_BOOL Cut(CFX_WideString& wsCut); |
131 FX_BOOL Paste(const CFX_WideString& wsPaste); | 131 FX_BOOL Paste(const CFX_WideString& wsPaste); |
132 FX_BOOL Delete(); | 132 FX_BOOL Delete(); |
133 FX_BOOL Redo(const CFX_ByteStringC& bsRecord); | 133 FX_BOOL Redo(const CFX_ByteStringC& bsRecord); |
134 FX_BOOL Undo(const CFX_ByteStringC& bsRecord); | 134 FX_BOOL Undo(const CFX_ByteStringC& bsRecord); |
135 FX_BOOL Undo(); | 135 FX_BOOL Undo(); |
136 FX_BOOL Redo(); | 136 FX_BOOL Redo(); |
137 FX_BOOL CanUndo(); | 137 FX_BOOL CanUndo(); |
138 FX_BOOL CanRedo(); | 138 FX_BOOL CanRedo(); |
139 FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); | 139 FWL_Error SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); |
140 FWL_ERR SetOuter(IFWL_Widget* pOuter); | 140 FWL_Error SetOuter(IFWL_Widget* pOuter); |
141 FWL_ERR SetNumberRange(int32_t iMin, int32_t iMax); | 141 FWL_Error SetNumberRange(int32_t iMin, int32_t iMax); |
142 FWL_ERR SetBackColor(uint32_t dwColor); | 142 FWL_Error SetBackColor(uint32_t dwColor); |
143 FWL_ERR SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize); | 143 FWL_Error SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize); |
144 void SetScrollOffset(FX_FLOAT fScrollOffset); | 144 void SetScrollOffset(FX_FLOAT fScrollOffset); |
145 FX_BOOL GetSuggestWords(CFX_PointF pointf, | 145 FX_BOOL GetSuggestWords(CFX_PointF pointf, |
146 std::vector<CFX_ByteString>& sSuggest); | 146 std::vector<CFX_ByteString>& sSuggest); |
147 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, | 147 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, |
148 const CFX_ByteStringC& bsReplace); | 148 const CFX_ByteStringC& bsReplace); |
149 | 149 |
150 protected: | 150 protected: |
151 IFWL_Edit(); | 151 IFWL_Edit(); |
152 }; | 152 }; |
153 | 153 |
154 #endif // XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ | 154 #endif // XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ |
OLD | NEW |