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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 #define FWL_EVT_EDT_CheckWord L"FWL_EVTHASH_ED
T_CheckWord" | 71 #define FWL_EVT_EDT_CheckWord L"FWL_EVTHASH_ED
T_CheckWord" |
72 #define FWL_EVTHASH_EDT_CheckWord 2897181520 | 72 #define FWL_EVTHASH_EDT_CheckWord 2897181520 |
73 #define FWL_EVT_EDT_GetSuggestWords L"FWL_EVTHASH_ED
T_GetSuggestWords" | 73 #define FWL_EVT_EDT_GetSuggestWords L"FWL_EVTHASH_ED
T_GetSuggestWords" |
74 #define FWL_EVTHASH_EDT_GetSuggestWords 315782791 | 74 #define FWL_EVTHASH_EDT_GetSuggestWords 315782791 |
75 #define FWL_EVT_EDT_TextFull L"FWL_EVTHASH_ED
T_TextFull" | 75 #define FWL_EVT_EDT_TextFull L"FWL_EVTHASH_ED
T_TextFull" |
76 #define FWL_EVTHASH_EDT_TextFull 2158580174 | 76 #define FWL_EVTHASH_EDT_TextFull 2158580174 |
77 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtAddDoRecord, FWL_EVTHASH_EDT_AddDoRecord) | 77 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtAddDoRecord, FWL_EVTHASH_EDT_AddDoRecord) |
78 CFX_ByteString m_wsDoRecord; | 78 CFX_ByteString m_wsDoRecord; |
79 END_FWL_EVENT_DEF | 79 END_FWL_EVENT_DEF |
80 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextChanged, FWL_EVTHASH_EDT_TextChanged) | 80 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextChanged, FWL_EVTHASH_EDT_TextChanged) |
81 FX_INT32 nChangeType; | 81 int32_t nChangeType; |
82 CFX_WideString wsInsert; | 82 CFX_WideString wsInsert; |
83 CFX_WideString wsDelete; | 83 CFX_WideString wsDelete; |
84 CFX_WideString wsPrevText; | 84 CFX_WideString wsPrevText; |
85 END_FWL_EVENT_DEF | 85 END_FWL_EVENT_DEF |
86 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextFull, FWL_EVTHASH_EDT_TextFull) | 86 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextFull, FWL_EVTHASH_EDT_TextFull) |
87 END_FWL_EVENT_DEF | 87 END_FWL_EVENT_DEF |
88 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtPreSelfAdaption, FWL_EVTHASH_EDT_PreSelfAdaption) | 88 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtPreSelfAdaption, FWL_EVTHASH_EDT_PreSelfAdaption) |
89 FX_BOOL bHSelfAdaption; | 89 FX_BOOL bHSelfAdaption; |
90 FX_BOOL bVSelfAdaption; | 90 FX_BOOL bVSelfAdaption; |
91 CFX_RectF rtAfterChange; | 91 CFX_RectF rtAfterChange; |
(...skipping 22 matching lines...) Expand all Loading... |
114 typedef struct _FWL_HEDTFIND { | 114 typedef struct _FWL_HEDTFIND { |
115 FX_LPVOID pData; | 115 FX_LPVOID pData; |
116 }* FWL_HEDTFIND; | 116 }* FWL_HEDTFIND; |
117 class IFWL_Edit : public IFWL_Widget | 117 class IFWL_Edit : public IFWL_Widget |
118 { | 118 { |
119 public: | 119 public: |
120 static IFWL_Edit* Create(); | 120 static IFWL_Edit* Create(); |
121 FWL_ERR Initialize(IFWL_Widget *pOuter = NULL); | 121 FWL_ERR Initialize(IFWL_Widget *pOuter = NULL); |
122 FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, I
FWL_Widget *pOuter = NULL); | 122 FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, I
FWL_Widget *pOuter = NULL); |
123 FWL_ERR SetText(const CFX_WideString &wsText); | 123 FWL_ERR SetText(const CFX_WideString &wsText); |
124 FX_INT32» GetTextLength() const; | 124 int32_t» GetTextLength() const; |
125 FWL_ERR» » GetText(CFX_WideString &wsText, FX_INT32 nStart = 0, FX_
INT32 nCount = -1) const; | 125 FWL_ERR» » GetText(CFX_WideString &wsText, int32_t nStart = 0, int3
2_t nCount = -1) const; |
126 FWL_ERR ClearText(); | 126 FWL_ERR ClearText(); |
127 FX_INT32» GetCaretPos() const; | 127 int32_t» GetCaretPos() const; |
128 FX_INT32» SetCaretPos(FX_INT32 nIndex, FX_BOOL bBefore = TRUE); | 128 int32_t» SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); |
129 FWL_ERR» » AddSelRange(FX_INT32 nStart, FX_INT32 nCount = -1); | 129 FWL_ERR» » AddSelRange(int32_t nStart, int32_t nCount = -1); |
130 FX_INT32» CountSelRanges(); | 130 int32_t» CountSelRanges(); |
131 FX_INT32» GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart); | 131 int32_t» GetSelRange(int32_t nIndex, int32_t &nStart); |
132 FWL_ERR ClearSelections(); | 132 FWL_ERR ClearSelections(); |
133 FX_INT32» GetLimit(); | 133 int32_t» GetLimit(); |
134 FWL_ERR» » SetLimit(FX_INT32 nLimit); | 134 FWL_ERR» » SetLimit(int32_t nLimit); |
135 FWL_ERR SetAliasChar(FX_WCHAR wAlias); | 135 FWL_ERR SetAliasChar(FX_WCHAR wAlias); |
136 FWL_ERR SetFormatString(const CFX_WideString &wsFormat); | 136 FWL_ERR SetFormatString(const CFX_WideString &wsFormat); |
137 FWL_ERR Insert(FX_INT32 nStart, FX_LPCWSTR lpText, FX_INT32 nLen); | 137 FWL_ERR Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLen); |
138 FWL_ERR DeleteSelections(); | 138 FWL_ERR DeleteSelections(); |
139 FWL_ERR DeleteRange(FX_INT32 nStart, FX_INT32 nCount = -1); | 139 FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1); |
140 FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace); | 140 FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace); |
141 FWL_ERR Replace(FX_INT32 nStart, FX_INT32 nLen, const CFX_WideStringC &wsRep
lace); | 141 FWL_ERR Replace(int32_t nStart, int32_t nLen, const CFX_WideStringC &wsRepla
ce); |
142 FWL_ERR» DoClipboard(FX_INT32 iCmd); | 142 FWL_ERR» DoClipboard(int32_t iCmd); |
143 FX_BOOL Copy(CFX_WideString &wsCopy); | 143 FX_BOOL Copy(CFX_WideString &wsCopy); |
144 FX_BOOL Cut(CFX_WideString &wsCut); | 144 FX_BOOL Cut(CFX_WideString &wsCut); |
145 FX_BOOL Paste(const CFX_WideString &wsPaste); | 145 FX_BOOL Paste(const CFX_WideString &wsPaste); |
146 FX_BOOL Delete(); | 146 FX_BOOL Delete(); |
147 FX_BOOL Redo(FX_BSTR bsRecord); | 147 FX_BOOL Redo(FX_BSTR bsRecord); |
148 FX_BOOL Undo(FX_BSTR bsRecord); | 148 FX_BOOL Undo(FX_BSTR bsRecord); |
149 FX_BOOL Undo(); | 149 FX_BOOL Undo(); |
150 FX_BOOL Redo(); | 150 FX_BOOL Redo(); |
151 FX_BOOL CanUndo(); | 151 FX_BOOL CanUndo(); |
152 FX_BOOL CanRedo(); | 152 FX_BOOL CanRedo(); |
153 FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); | 153 FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); |
154 FWL_ERR SetOuter(IFWL_Widget *pOuter); | 154 FWL_ERR SetOuter(IFWL_Widget *pOuter); |
155 FWL_ERR» SetNumberRange(FX_INT32 iMin, FX_INT32 iMax); | 155 FWL_ERR» SetNumberRange(int32_t iMin, int32_t iMax); |
156 FWL_ERR SetBackColor(FX_DWORD dwColor); | 156 FWL_ERR SetBackColor(FX_DWORD dwColor); |
157 FWL_ERR SetFont(const CFX_WideString &wsFont, FX_FLOAT fSize); | 157 FWL_ERR SetFont(const CFX_WideString &wsFont, FX_FLOAT fSize); |
158 void SetScrollOffset(FX_FLOAT fScrollOffset); | 158 void SetScrollOffset(FX_FLOAT fScrollOffset); |
159 FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSuggest); | 159 FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSuggest); |
160 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace); | 160 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace); |
161 protected: | 161 protected: |
162 IFWL_Edit(); | 162 IFWL_Edit(); |
163 virtual ~IFWL_Edit(); | 163 virtual ~IFWL_Edit(); |
164 }; | 164 }; |
165 #endif | 165 #endif |
OLD | NEW |