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 _FWL_EDIT_H | 7 #ifndef _FWL_EDIT_H |
8 #define _FWL_EDIT_H | 8 #define _FWL_EDIT_H |
9 class CFWL_WidgetImpProperties; | 9 class CFWL_WidgetImpProperties; |
10 class IFWL_Widget; | 10 class IFWL_Widget; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 CFX_ByteStringArray bsArraySuggestWords; | 105 CFX_ByteStringArray bsArraySuggestWords; |
106 END_FWL_EVENT_DEF | 106 END_FWL_EVENT_DEF |
107 class IFWL_EditDP : public IFWL_DataProvider {}; | 107 class IFWL_EditDP : public IFWL_DataProvider {}; |
108 #define FWL_EDT_FIND_FLAGS_Prev (0L << 0) | 108 #define FWL_EDT_FIND_FLAGS_Prev (0L << 0) |
109 #define FWL_EDT_FIND_FLAGS_Next (1L << 0) | 109 #define FWL_EDT_FIND_FLAGS_Next (1L << 0) |
110 #define FWL_EDT_FIND_FLAGS_WholeWord (1L << 1) | 110 #define FWL_EDT_FIND_FLAGS_WholeWord (1L << 1) |
111 #define FWL_EDT_FIND_FLAGS_NoCase (1L << 2) | 111 #define FWL_EDT_FIND_FLAGS_NoCase (1L << 2) |
112 typedef struct _FWL_HEDTFIND { void* pData; } * FWL_HEDTFIND; | 112 typedef struct _FWL_HEDTFIND { void* pData; } * FWL_HEDTFIND; |
113 class IFWL_Edit : public IFWL_Widget { | 113 class IFWL_Edit : public IFWL_Widget { |
114 public: | 114 public: |
115 static IFWL_Edit* Create(); | 115 IFWL_Edit(); |
| 116 |
116 FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties, | 117 FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties, |
117 IFWL_Widget* pOuter); | 118 IFWL_Widget* pOuter); |
118 FWL_ERR SetText(const CFX_WideString& wsText); | 119 FWL_ERR SetText(const CFX_WideString& wsText); |
119 int32_t GetTextLength() const; | 120 int32_t GetTextLength() const; |
120 FWL_ERR GetText(CFX_WideString& wsText, | 121 FWL_ERR GetText(CFX_WideString& wsText, |
121 int32_t nStart = 0, | 122 int32_t nStart = 0, |
122 int32_t nCount = -1) const; | 123 int32_t nCount = -1) const; |
123 FWL_ERR ClearText(); | 124 FWL_ERR ClearText(); |
124 int32_t GetCaretPos() const; | 125 int32_t GetCaretPos() const; |
125 int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); | 126 int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); |
(...skipping 25 matching lines...) Expand all Loading... |
151 FX_BOOL CanRedo(); | 152 FX_BOOL CanRedo(); |
152 FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); | 153 FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); |
153 FWL_ERR SetOuter(IFWL_Widget* pOuter); | 154 FWL_ERR SetOuter(IFWL_Widget* pOuter); |
154 FWL_ERR SetNumberRange(int32_t iMin, int32_t iMax); | 155 FWL_ERR SetNumberRange(int32_t iMin, int32_t iMax); |
155 FWL_ERR SetBackColor(FX_DWORD dwColor); | 156 FWL_ERR SetBackColor(FX_DWORD dwColor); |
156 FWL_ERR SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize); | 157 FWL_ERR SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize); |
157 void SetScrollOffset(FX_FLOAT fScrollOffset); | 158 void SetScrollOffset(FX_FLOAT fScrollOffset); |
158 FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest); | 159 FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest); |
159 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, | 160 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, |
160 const CFX_ByteStringC& bsReplace); | 161 const CFX_ByteStringC& bsReplace); |
161 | |
162 protected: | |
163 IFWL_Edit(); | |
164 }; | 162 }; |
165 #endif | 163 #endif |
OLD | NEW |