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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 END_FWL_EVENT_DEF | 84 END_FWL_EVENT_DEF |
85 | 85 |
86 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtGetSuggestWords, | 86 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtGetSuggestWords, |
87 CFWL_EventType::GetSuggestedWords) | 87 CFWL_EventType::GetSuggestedWords) |
88 FX_BOOL bSuggestWords; | 88 FX_BOOL bSuggestWords; |
89 CFX_ByteString bsWord; | 89 CFX_ByteString bsWord; |
90 std::vector<CFX_ByteString> bsArraySuggestWords; | 90 std::vector<CFX_ByteString> bsArraySuggestWords; |
91 END_FWL_EVENT_DEF | 91 END_FWL_EVENT_DEF |
92 | 92 |
93 class CFWL_WidgetImpProperties; | 93 class CFWL_WidgetImpProperties; |
| 94 class IFDE_TxtEdtDoRecord; |
94 | 95 |
95 class IFWL_EditDP : public IFWL_DataProvider {}; | 96 class IFWL_EditDP : public IFWL_DataProvider {}; |
96 | 97 |
97 class IFWL_Edit : public IFWL_Widget { | 98 class IFWL_Edit : public IFWL_Widget { |
98 public: | 99 public: |
99 static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties, | 100 static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties, |
100 IFWL_Widget* pOuter); | 101 IFWL_Widget* pOuter); |
101 static IFWL_Edit* CreateComboEdit(const CFWL_WidgetImpProperties& properties, | 102 static IFWL_Edit* CreateComboEdit(const CFWL_WidgetImpProperties& properties, |
102 IFWL_Widget* pOuter); | 103 IFWL_Widget* pOuter); |
103 | 104 |
(...skipping 17 matching lines...) Expand all Loading... |
121 FWL_Error DeleteSelections(); | 122 FWL_Error DeleteSelections(); |
122 FWL_Error DeleteRange(int32_t nStart, int32_t nCount = -1); | 123 FWL_Error DeleteRange(int32_t nStart, int32_t nCount = -1); |
123 FWL_Error Replace(int32_t nStart, | 124 FWL_Error Replace(int32_t nStart, |
124 int32_t nLen, | 125 int32_t nLen, |
125 const CFX_WideStringC& wsReplace); | 126 const CFX_WideStringC& wsReplace); |
126 FWL_Error DoClipboard(int32_t iCmd); | 127 FWL_Error DoClipboard(int32_t iCmd); |
127 FX_BOOL Copy(CFX_WideString& wsCopy); | 128 FX_BOOL Copy(CFX_WideString& wsCopy); |
128 FX_BOOL Cut(CFX_WideString& wsCut); | 129 FX_BOOL Cut(CFX_WideString& wsCut); |
129 FX_BOOL Paste(const CFX_WideString& wsPaste); | 130 FX_BOOL Paste(const CFX_WideString& wsPaste); |
130 FX_BOOL Delete(); | 131 FX_BOOL Delete(); |
131 FX_BOOL Redo(const CFX_ByteStringC& bsRecord); | 132 FX_BOOL Redo(const IFDE_TxtEdtDoRecord* pRecord); |
132 FX_BOOL Undo(const CFX_ByteStringC& bsRecord); | 133 FX_BOOL Undo(const IFDE_TxtEdtDoRecord* pRecord); |
133 FX_BOOL Undo(); | 134 FX_BOOL Undo(); |
134 FX_BOOL Redo(); | 135 FX_BOOL Redo(); |
135 FX_BOOL CanUndo(); | 136 FX_BOOL CanUndo(); |
136 FX_BOOL CanRedo(); | 137 FX_BOOL CanRedo(); |
137 FWL_Error SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); | 138 FWL_Error SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); |
138 FWL_Error SetOuter(IFWL_Widget* pOuter); | 139 FWL_Error SetOuter(IFWL_Widget* pOuter); |
139 FWL_Error SetNumberRange(int32_t iMin, int32_t iMax); | 140 FWL_Error SetNumberRange(int32_t iMin, int32_t iMax); |
140 FWL_Error SetBackColor(uint32_t dwColor); | 141 FWL_Error SetBackColor(uint32_t dwColor); |
141 FWL_Error SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize); | 142 FWL_Error SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize); |
142 void SetScrollOffset(FX_FLOAT fScrollOffset); | 143 void SetScrollOffset(FX_FLOAT fScrollOffset); |
143 FX_BOOL GetSuggestWords(CFX_PointF pointf, | 144 FX_BOOL GetSuggestWords(CFX_PointF pointf, |
144 std::vector<CFX_ByteString>& sSuggest); | 145 std::vector<CFX_ByteString>& sSuggest); |
145 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, | 146 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, |
146 const CFX_ByteStringC& bsReplace); | 147 const CFX_ByteStringC& bsReplace); |
147 | 148 |
148 protected: | 149 protected: |
149 IFWL_Edit(); | 150 IFWL_Edit(); |
150 }; | 151 }; |
151 | 152 |
152 #endif // XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ | 153 #endif // XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ |
OLD | NEW |