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 FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ | 7 #ifndef FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ |
8 #define FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ | 8 #define FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ |
9 | 9 |
10 #include "../../../core/include/fxcrt/fx_basic.h" | 10 #include "../../../core/include/fxcrt/fx_basic.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 #ifndef DEFAULT_CHARSET | 59 #ifndef DEFAULT_CHARSET |
60 #define DEFAULT_CHARSET 1 | 60 #define DEFAULT_CHARSET 1 |
61 #endif | 61 #endif |
62 | 62 |
63 class IFX_Edit_FontMap | 63 class IFX_Edit_FontMap |
64 { | 64 { |
65 public: | 65 public: |
66 virtual ~IFX_Edit_FontMap() { } | 66 virtual ~IFX_Edit_FontMap() { } |
67 //map a fontindex to pdf font. | 67 //map a fontindex to pdf font. |
68 » virtual CPDF_Font *» » » » » » GetPDFFo
nt(FX_INT32 nFontIndex) = 0; | 68 » virtual CPDF_Font *» » » » » » GetPDFFo
nt(int32_t nFontIndex) = 0; |
69 //get the alias of a pdf font. | 69 //get the alias of a pdf font. |
70 » virtual CFX_ByteString» » » » » GetPDFFontAlias(
FX_INT32 nFontIndex) = 0; | 70 » virtual CFX_ByteString» » » » » GetPDFFontAlias(
int32_t nFontIndex) = 0; |
71 //get the index of a font that can show a word. | 71 //get the index of a font that can show a word. |
72 » virtual FX_INT32» » » » » » GetWordF
ontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex) = 0; | 72 » virtual int32_t»» » » » » GetWordFontIndex
(FX_WORD word, int32_t charset, int32_t nFontIndex) = 0; |
73 //get the charcode of word from unicode | 73 //get the charcode of word from unicode |
74 » virtual FX_INT32» » » » » » CharCode
FromUnicode(FX_INT32 nFontIndex, FX_WORD word) = 0; | 74 » virtual int32_t»» » » » » CharCodeFromUnic
ode(int32_t nFontIndex, FX_WORD word) = 0; |
75 //get the charset of unicode | 75 //get the charset of unicode |
76 » virtual FX_INT32» » » » » » CharSetF
romUnicode(FX_WORD word, FX_INT32 nOldCharset) = 0; | 76 » virtual int32_t»» » » » » CharSetFromUnico
de(FX_WORD word, int32_t nOldCharset) = 0; |
77 }; | 77 }; |
78 | 78 |
79 class IFX_Edit_Notify | 79 class IFX_Edit_Notify |
80 { | 80 { |
81 public: | 81 public: |
82 virtual ~IFX_Edit_Notify() { } | 82 virtual ~IFX_Edit_Notify() { } |
83 //set the horizontal scrollbar information. | 83 //set the horizontal scrollbar information. |
84 virtual void IOnSetSc
rollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, | 84 virtual void IOnSetSc
rollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, |
85
FX_FLOAT fContentMin, FX_FLOAT fContentMax, | 85
FX_FLOAT fContentMin, FX_FLOAT fContentMax, |
86
FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; | 86
FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 //move the current position to the previous section. | 144 //move the current position to the previous section. |
145 virtual FX_BOOL PrevSect
ion() = 0; | 145 virtual FX_BOOL PrevSect
ion() = 0; |
146 | 146 |
147 //get the information of the current word. | 147 //get the information of the current word. |
148 virtual FX_BOOL GetWord(
CPVT_Word & word) const = 0; | 148 virtual FX_BOOL GetWord(
CPVT_Word & word) const = 0; |
149 //get the information of the current line. | 149 //get the information of the current line. |
150 virtual FX_BOOL GetLine(
CPVT_Line & line) const = 0; | 150 virtual FX_BOOL GetLine(
CPVT_Line & line) const = 0; |
151 //get the information of the current section. | 151 //get the information of the current section. |
152 virtual FX_BOOL GetSecti
on(CPVT_Section & section) const = 0; | 152 virtual FX_BOOL GetSecti
on(CPVT_Section & section) const = 0; |
153 //set the current position. | 153 //set the current position. |
154 » virtual void» » » » » » » SetAt(FX
_INT32 nWordIndex) = 0; | 154 » virtual void» » » » » » » SetAt(in
t32_t nWordIndex) = 0; |
155 //set the current position. | 155 //set the current position. |
156 virtual void SetAt(co
nst CPVT_WordPlace & place) = 0; | 156 virtual void SetAt(co
nst CPVT_WordPlace & place) = 0; |
157 //get the current position. | 157 //get the current position. |
158 virtual const CPVT_WordPlace & GetAt() const = 0; | 158 virtual const CPVT_WordPlace & GetAt() const = 0; |
159 | 159 |
160 //get the edit which this iterator belongs to | 160 //get the edit which this iterator belongs to |
161 virtual IFX_Edit* GetEdit(
) const = 0; | 161 virtual IFX_Edit* GetEdit(
) const = 0; |
162 }; | 162 }; |
163 | 163 |
164 class IFX_Edit_UndoItem | 164 class IFX_Edit_UndoItem |
(...skipping 28 matching lines...) Expand all Loading... |
193 | 193 |
194 //initialize the edit. | 194 //initialize the edit. |
195 virtual void Initiali
ze() = 0; | 195 virtual void Initiali
ze() = 0; |
196 | 196 |
197 //set the bounding box of the text area. | 197 //set the bounding box of the text area. |
198 virtual void SetPlate
Rect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE) = 0; | 198 virtual void SetPlate
Rect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE) = 0; |
199 //set the scroll origin | 199 //set the scroll origin |
200 virtual void SetScrol
lPos(const CPDF_Point & point) = 0; | 200 virtual void SetScrol
lPos(const CPDF_Point & point) = 0; |
201 | 201 |
202 //set the horizontal text alignment in text box, nFormat (0:left 1:middl
e 2:right). | 202 //set the horizontal text alignment in text box, nFormat (0:left 1:middl
e 2:right). |
203 » virtual void» » » » » » » SetAlign
mentH(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE) = 0; | 203 » virtual void» » » » » » » SetAlign
mentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0; |
204 //set the vertical text alignment in text box, nFormat (0:top 1:center 2
:bottom). | 204 //set the vertical text alignment in text box, nFormat (0:top 1:center 2
:bottom). |
205 » virtual void» » » » » » » SetAlign
mentV(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE) = 0; | 205 » virtual void» » » » » » » SetAlign
mentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0; |
206 //if the text is shown in secret , set a character for substitute. | 206 //if the text is shown in secret , set a character for substitute. |
207 virtual void SetPassw
ordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) = 0; | 207 virtual void SetPassw
ordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) = 0; |
208 //set the maximal count of words of the text. | 208 //set the maximal count of words of the text. |
209 » virtual void» » » » » » » SetLimit
Char(FX_INT32 nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0; | 209 » virtual void» » » » » » » SetLimit
Char(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0; |
210 //if set the count of charArray , then all words is shown in equal space
. | 210 //if set the count of charArray , then all words is shown in equal space
. |
211 » virtual void» » » » » » » SetCharA
rray(FX_INT32 nCharArray = 0, FX_BOOL bPaint = TRUE) = 0; | 211 » virtual void» » » » » » » SetCharA
rray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) = 0; |
212 //set the space of two characters. | 212 //set the space of two characters. |
213 virtual void SetCharS
pace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) = 0; | 213 virtual void SetCharS
pace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) = 0; |
214 //set the horizontal scale of all characters. | 214 //set the horizontal scale of all characters. |
215 » virtual void» » » » » » » SetHorzS
cale(FX_INT32 nHorzScale = 100, FX_BOOL bPaint = TRUE) = 0; | 215 » virtual void» » » » » » » SetHorzS
cale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE) = 0; |
216 //set the leading of all lines | 216 //set the leading of all lines |
217 virtual void SetLineL
eading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) = 0; | 217 virtual void SetLineL
eading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) = 0; |
218 //if set, CRLF is allowed. | 218 //if set, CRLF is allowed. |
219 virtual void SetMulti
Line(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE) = 0; | 219 virtual void SetMulti
Line(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE) = 0; |
220 //if set, all words auto fit the width of the bounding box. | 220 //if set, all words auto fit the width of the bounding box. |
221 virtual void SetAutoR
eturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; | 221 virtual void SetAutoR
eturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; |
222 //if set, a font size is calculated to full fit the bounding box. | 222 //if set, a font size is calculated to full fit the bounding box. |
223 virtual void SetAutoF
ontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; | 223 virtual void SetAutoF
ontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; |
224 //is set, the text is allowed to scroll. | 224 //is set, the text is allowed to scroll. |
225 virtual void SetAutoS
croll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; | 225 virtual void SetAutoS
croll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; |
226 //set the font size of all words. | 226 //set the font size of all words. |
227 virtual void SetFontS
ize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE) = 0; | 227 virtual void SetFontS
ize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE) = 0; |
228 //the text is allowed to auto-scroll, allow the text overflow? | 228 //the text is allowed to auto-scroll, allow the text overflow? |
229 virtual void SetTextO
verflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE) = 0; | 229 virtual void SetTextO
verflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE) = 0; |
230 | 230 |
231 //query if the edit is richedit. | 231 //query if the edit is richedit. |
232 virtual FX_BOOL IsRichTe
xt() const = 0; | 232 virtual FX_BOOL IsRichTe
xt() const = 0; |
233 //set the edit is richedit. | 233 //set the edit is richedit. |
234 virtual void SetRichT
ext(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE) = 0; | 234 virtual void SetRichT
ext(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE) = 0; |
235 //set the fontsize of selected text. | 235 //set the fontsize of selected text. |
236 virtual FX_BOOL SetRichF
ontSize(FX_FLOAT fFontSize) = 0; | 236 virtual FX_BOOL SetRichF
ontSize(FX_FLOAT fFontSize) = 0; |
237 //set the fontindex of selected text, user can change the font of select
ed text. | 237 //set the fontindex of selected text, user can change the font of select
ed text. |
238 » virtual FX_BOOL»» » » » » » SetRichF
ontIndex(FX_INT32 nFontIndex) = 0; | 238 » virtual FX_BOOL»» » » » » » SetRichF
ontIndex(int32_t nFontIndex) = 0; |
239 //set the textcolor of selected text. | 239 //set the textcolor of selected text. |
240 virtual FX_BOOL SetRichT
extColor(FX_COLORREF dwColor) = 0; | 240 virtual FX_BOOL SetRichT
extColor(FX_COLORREF dwColor) = 0; |
241 //set the text script type of selected text. (0:normal 1:superscript 2:s
ubscript) | 241 //set the text script type of selected text. (0:normal 1:superscript 2:s
ubscript) |
242 » virtual FX_BOOL»» » » » » » SetRichT
extScript(FX_INT32 nScriptType) = 0;» | 242 » virtual FX_BOOL»» » » » » » SetRichT
extScript(int32_t nScriptType) = 0;» |
243 //set the bold font style of selected text. | 243 //set the bold font style of selected text. |
244 virtual FX_BOOL SetRichT
extBold(FX_BOOL bBold = TRUE) = 0; | 244 virtual FX_BOOL SetRichT
extBold(FX_BOOL bBold = TRUE) = 0; |
245 //set the italic font style of selected text. | 245 //set the italic font style of selected text. |
246 virtual FX_BOOL SetRichT
extItalic(FX_BOOL bItalic = TRUE) = 0; | 246 virtual FX_BOOL SetRichT
extItalic(FX_BOOL bItalic = TRUE) = 0; |
247 //set the underline style of selected text. | 247 //set the underline style of selected text. |
248 virtual FX_BOOL SetRichT
extUnderline(FX_BOOL bUnderline = TRUE) = 0; | 248 virtual FX_BOOL SetRichT
extUnderline(FX_BOOL bUnderline = TRUE) = 0; |
249 //set the crossout style of selected text. | 249 //set the crossout style of selected text. |
250 virtual FX_BOOL SetRichT
extCrossout(FX_BOOL bCrossout = TRUE) = 0; | 250 virtual FX_BOOL SetRichT
extCrossout(FX_BOOL bCrossout = TRUE) = 0; |
251 //set the charspace of selected text, in user coordinate. | 251 //set the charspace of selected text, in user coordinate. |
252 virtual FX_BOOL SetRichT
extCharSpace(FX_FLOAT fCharSpace) = 0; | 252 virtual FX_BOOL SetRichT
extCharSpace(FX_FLOAT fCharSpace) = 0; |
253 //set the horizontal scale of selected text, default value is 100. | 253 //set the horizontal scale of selected text, default value is 100. |
254 » virtual FX_BOOL»» » » » » » SetRichT
extHorzScale(FX_INT32 nHorzScale = 100) = 0; | 254 » virtual FX_BOOL»» » » » » » SetRichT
extHorzScale(int32_t nHorzScale = 100) = 0; |
255 //set the leading of selected section, in user coordinate. | 255 //set the leading of selected section, in user coordinate. |
256 virtual FX_BOOL SetRichT
extLineLeading(FX_FLOAT fLineLeading) = 0; | 256 virtual FX_BOOL SetRichT
extLineLeading(FX_FLOAT fLineLeading) = 0; |
257 //set the indent of selected section, in user coordinate. | 257 //set the indent of selected section, in user coordinate. |
258 virtual FX_BOOL SetRichT
extLineIndent(FX_FLOAT fLineIndent) = 0; | 258 virtual FX_BOOL SetRichT
extLineIndent(FX_FLOAT fLineIndent) = 0; |
259 //set the alignment of selected section, nAlignment(0:left 1:middle 2:ri
ght) | 259 //set the alignment of selected section, nAlignment(0:left 1:middle 2:ri
ght) |
260 » virtual FX_BOOL»» » » » » » SetRichT
extAlignment(FX_INT32 nAlignment) = 0; | 260 » virtual FX_BOOL»» » » » » » SetRichT
extAlignment(int32_t nAlignment) = 0; |
261 | 261 |
262 //set the selected range of text. | 262 //set the selected range of text. |
263 //if nStartChar == 0 and nEndChar == -1, select all the text. | 263 //if nStartChar == 0 and nEndChar == -1, select all the text. |
264 » virtual void» » » » » » » SetSel(F
X_INT32 nStartChar,FX_INT32 nEndChar) = 0; | 264 » virtual void» » » » » » » SetSel(i
nt32_t nStartChar,int32_t nEndChar) = 0; |
265 //get the selected range of text. | 265 //get the selected range of text. |
266 » virtual void» » » » » » » GetSel(F
X_INT32 & nStartChar, FX_INT32 & nEndChar) const = 0; | 266 » virtual void» » » » » » » GetSel(i
nt32_t & nStartChar, int32_t & nEndChar) const = 0; |
267 //select all the text. | 267 //select all the text. |
268 virtual void SelectAl
l() = 0; | 268 virtual void SelectAl
l() = 0; |
269 //set text is not selected. | 269 //set text is not selected. |
270 virtual void SelectNo
ne() = 0; | 270 virtual void SelectNo
ne() = 0; |
271 //get the caret position. | 271 //get the caret position. |
272 » virtual FX_INT32» » » » » » GetCaret
() const = 0; | 272 » virtual int32_t»» » » » » GetCaret() const
= 0; |
273 virtual CPVT_WordPlace GetCaretWordPlac
e() const = 0; | 273 virtual CPVT_WordPlace GetCaretWordPlac
e() const = 0; |
274 //get the string of selected text. | 274 //get the string of selected text. |
275 virtual CFX_WideString GetSelText() con
st = 0; | 275 virtual CFX_WideString GetSelText() con
st = 0; |
276 //get the text conent | 276 //get the text conent |
277 virtual CFX_WideString GetText() const
= 0; | 277 virtual CFX_WideString GetText() const
= 0; |
278 //query if any text is selected. | 278 //query if any text is selected. |
279 virtual FX_BOOL IsSelect
ed() const = 0; | 279 virtual FX_BOOL IsSelect
ed() const = 0; |
280 //get the scroll origin | 280 //get the scroll origin |
281 virtual CPDF_Point GetScrol
lPos() const = 0; | 281 virtual CPDF_Point GetScrol
lPos() const = 0; |
282 //get the bounding box of the text area. | 282 //get the bounding box of the text area. |
(...skipping 19 matching lines...) Expand all Loading... |
302 //send the LEFT key message to edit. | 302 //send the LEFT key message to edit. |
303 virtual void OnVK_LEF
T(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 303 virtual void OnVK_LEF
T(FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
304 //send the RIGHT key message to edit. | 304 //send the RIGHT key message to edit. |
305 virtual void OnVK_RIG
HT(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 305 virtual void OnVK_RIG
HT(FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
306 //send the HOME key message to edit. | 306 //send the HOME key message to edit. |
307 virtual void OnVK_HOM
E(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 307 virtual void OnVK_HOM
E(FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
308 //send the END key message to edit. | 308 //send the END key message to edit. |
309 virtual void OnVK_END
(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 309 virtual void OnVK_END
(FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
310 | 310 |
311 //put text into edit. | 311 //put text into edit. |
312 » virtual void» » » » » » » SetText(
FX_LPCWSTR text,FX_INT32 charset = DEFAULT_CHARSET, | 312 » virtual void» » » » » » » SetText(
FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET, |
313
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL) = 0; | 313
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL) = 0; |
314 //insert a word into the edit. | 314 //insert a word into the edit. |
315 » virtual FX_BOOL»» » » » » » InsertWo
rd(FX_WORD word, FX_INT32 charset = DEFAULT_CHARSET, const CPVT_WordProps * pWor
dProps = NULL) = 0; | 315 » virtual FX_BOOL»» » » » » » InsertWo
rd(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWord
Props = NULL) = 0; |
316 //insert a return into the edit. | 316 //insert a return into the edit. |
317 virtual FX_BOOL InsertRe
turn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps =
NULL) = 0; | 317 virtual FX_BOOL InsertRe
turn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps =
NULL) = 0; |
318 //insert text into the edit. | 318 //insert text into the edit. |
319 » virtual FX_BOOL»» » » » » » InsertTe
xt(FX_LPCWSTR text, FX_INT32 charset = DEFAULT_CHARSET, | 319 » virtual FX_BOOL»» » » » » » InsertTe
xt(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET, |
320
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL) = 0; | 320
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL) = 0; |
321 //do backspace operation. | 321 //do backspace operation. |
322 virtual FX_BOOL Backspac
e() = 0; | 322 virtual FX_BOOL Backspac
e() = 0; |
323 //do delete operation. | 323 //do delete operation. |
324 virtual FX_BOOL Delete()
= 0; | 324 virtual FX_BOOL Delete()
= 0; |
325 //delete the selected text. | 325 //delete the selected text. |
326 virtual FX_BOOL Clear()
= 0; | 326 virtual FX_BOOL Clear()
= 0; |
327 | 327 |
328 //do Redo operation. | 328 //do Redo operation. |
329 virtual FX_BOOL Redo() =
0; | 329 virtual FX_BOOL Redo() =
0; |
330 //do Undo operation. | 330 //do Undo operation. |
331 virtual FX_BOOL Undo() =
0; | 331 virtual FX_BOOL Undo() =
0; |
332 //move caret | 332 //move caret |
333 » virtual void» » » » » » » SetCaret
(FX_INT32 nPos) = 0; | 333 » virtual void» » » » » » » SetCaret
(int32_t nPos) = 0; |
334 | 334 |
335 //arrange all words over again | 335 //arrange all words over again |
336 virtual void Paint()
= 0; | 336 virtual void Paint()
= 0; |
337 | 337 |
338 //allow to refresh screen? | 338 //allow to refresh screen? |
339 virtual void EnableRe
fresh(FX_BOOL bRefresh) = 0; | 339 virtual void EnableRe
fresh(FX_BOOL bRefresh) = 0; |
340 | 340 |
341 virtual void RefreshW
ordRange(const CPVT_WordRange& wr) = 0; | 341 virtual void RefreshW
ordRange(const CPVT_WordRange& wr) = 0; |
342 | 342 |
343 //allow undo/redo? | 343 //allow undo/redo? |
344 virtual void EnableUn
do(FX_BOOL bUndo) = 0; | 344 virtual void EnableUn
do(FX_BOOL bUndo) = 0; |
345 | 345 |
346 //allow notify? | 346 //allow notify? |
347 virtual void EnableNo
tify(FX_BOOL bNotify) = 0; | 347 virtual void EnableNo
tify(FX_BOOL bNotify) = 0; |
348 | 348 |
349 //allow opr notify? | 349 //allow opr notify? |
350 virtual void EnableOp
rNotify(FX_BOOL bNotify) = 0; | 350 virtual void EnableOp
rNotify(FX_BOOL bNotify) = 0; |
351 | 351 |
352 //map word place to word index. | 352 //map word place to word index. |
353 » virtual FX_INT32» » » » » » WordPlac
eToWordIndex(const CPVT_WordPlace & place) const = 0; | 353 » virtual int32_t»» » » » » WordPlaceToWordI
ndex(const CPVT_WordPlace & place) const = 0; |
354 //map word index to word place. | 354 //map word index to word place. |
355 » virtual CPVT_WordPlace» » » » » WordIndexToWordP
lace(FX_INT32 index) const = 0; | 355 » virtual CPVT_WordPlace» » » » » WordIndexToWordP
lace(int32_t index) const = 0; |
356 | 356 |
357 //get the beginning position of a line | 357 //get the beginning position of a line |
358 virtual CPVT_WordPlace GetLineBeginPlac
e(const CPVT_WordPlace & place) const = 0; | 358 virtual CPVT_WordPlace GetLineBeginPlac
e(const CPVT_WordPlace & place) const = 0; |
359 | 359 |
360 //get the ending position of a line | 360 //get the ending position of a line |
361 virtual CPVT_WordPlace GetLineEndPlace(
const CPVT_WordPlace & place) const = 0; | 361 virtual CPVT_WordPlace GetLineEndPlace(
const CPVT_WordPlace & place) const = 0; |
362 | 362 |
363 //get the beginning position of a section | 363 //get the beginning position of a section |
364 virtual CPVT_WordPlace GetSectionBeginP
lace(const CPVT_WordPlace & place) const = 0; | 364 virtual CPVT_WordPlace GetSectionBeginP
lace(const CPVT_WordPlace & place) const = 0; |
365 | 365 |
366 //get the ending position of a section | 366 //get the ending position of a section |
367 virtual CPVT_WordPlace GetSectionEndPla
ce(const CPVT_WordPlace & place) const = 0; | 367 virtual CPVT_WordPlace GetSectionEndPla
ce(const CPVT_WordPlace & place) const = 0; |
368 | 368 |
369 //search a wordplace form point | 369 //search a wordplace form point |
370 virtual CPVT_WordPlace SearchWordPlace(
const CPDF_Point& point) const = 0; | 370 virtual CPVT_WordPlace SearchWordPlace(
const CPDF_Point& point) const = 0; |
371 | 371 |
372 //get the font size of non_rich text or default font size of richtext. | 372 //get the font size of non_rich text or default font size of richtext. |
373 virtual FX_FLOAT GetFontS
ize() const = 0; | 373 virtual FX_FLOAT GetFontS
ize() const = 0; |
374 //get the mask character. | 374 //get the mask character. |
375 virtual FX_WORD GetPassw
ordChar() const = 0; | 375 virtual FX_WORD GetPassw
ordChar() const = 0; |
376 //get the count of charArray | 376 //get the count of charArray |
377 » virtual FX_INT32» » » » » » GetCharA
rray() const = 0; | 377 » virtual int32_t»» » » » » GetCharArray() c
onst = 0; |
378 //get the horizontal scale of all characters | 378 //get the horizontal scale of all characters |
379 » virtual FX_INT32» » » » » » GetHorzS
cale() const = 0; | 379 » virtual int32_t»» » » » » GetHorzScale() c
onst = 0; |
380 //get the space of two characters | 380 //get the space of two characters |
381 virtual FX_FLOAT GetCharS
pace() const = 0; | 381 virtual FX_FLOAT GetCharS
pace() const = 0; |
382 //get the latin words of specified range | 382 //get the latin words of specified range |
383 virtual CFX_WideString GetRangeText(con
st CPVT_WordRange & range) const = 0; | 383 virtual CFX_WideString GetRangeText(con
st CPVT_WordRange & range) const = 0; |
384 //is the text full in bounding box | 384 //is the text full in bounding box |
385 virtual FX_BOOL IsTextFu
ll() const = 0; | 385 virtual FX_BOOL IsTextFu
ll() const = 0; |
386 virtual FX_BOOL CanUndo(
) const = 0; | 386 virtual FX_BOOL CanUndo(
) const = 0; |
387 virtual FX_BOOL CanRedo(
) const = 0; | 387 virtual FX_BOOL CanRedo(
) const = 0; |
388 //if the content is changed after settext? | 388 //if the content is changed after settext? |
389 virtual FX_BOOL IsModifi
ed() const = 0; | 389 virtual FX_BOOL IsModifi
ed() const = 0; |
390 //get the total words in edit | 390 //get the total words in edit |
391 » virtual FX_INT32» » » » » » GetTotal
Words() const = 0; | 391 » virtual int32_t»» » » » » GetTotalWords()
const = 0; |
392 | 392 |
393 virtual void AddUndoI
tem(IFX_Edit_UndoItem* pUndoItem) = 0; | 393 virtual void AddUndoI
tem(IFX_Edit_UndoItem* pUndoItem) = 0; |
394 | 394 |
395 static CFX_ByteString GetEditAppearanc
eStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, | 395 static CFX_ByteString GetEditAppearanc
eStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, |
396
const CPVT_WordRange* pRange = NULL, | 396
const CPVT_WordRange* pRange = NULL, |
397
FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0); | 397
FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0); |
398 static CFX_ByteString GetSelectAppeara
nceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange* pR
ange = NULL); | 398 static CFX_ByteString GetSelectAppeara
nceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange* pR
ange = NULL); |
399 static void
DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit,
FX_COLORREF crTextFill, FX_COLORREF crTextStroke, | 399 static void
DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit,
FX_COLORREF crTextFill, FX_COLORREF crTextStroke, |
400
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, con
st CPVT_WordRange* pRange, IFX_SystemHandler* pSystemHandler, void* pFFLData); | 400
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, con
st CPVT_WordRange* pRange, IFX_SystemHandler* pSystemHandler, void* pFFLData); |
401 static void
DrawUnderline(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pE
dit, FX_COLORREF color, | 401 static void
DrawUnderline(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pE
dit, FX_COLORREF color, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 virtual void SetFontM
ap(IFX_Edit_FontMap * pFontMap) = 0; | 442 virtual void SetFontM
ap(IFX_Edit_FontMap * pFontMap) = 0; |
443 virtual void SetNotif
y(IFX_List_Notify * pNotify) = 0; | 443 virtual void SetNotif
y(IFX_List_Notify * pNotify) = 0; |
444 | 444 |
445 virtual void SetPlate
Rect(const CPDF_Rect & rect) = 0; | 445 virtual void SetPlate
Rect(const CPDF_Rect & rect) = 0; |
446 virtual void SetFontS
ize(FX_FLOAT fFontSize) = 0; | 446 virtual void SetFontS
ize(FX_FLOAT fFontSize) = 0; |
447 | 447 |
448 virtual CPDF_Rect GetPlate
Rect() const = 0; | 448 virtual CPDF_Rect GetPlate
Rect() const = 0; |
449 virtual CPDF_Rect GetConte
ntRect() const = 0; | 449 virtual CPDF_Rect GetConte
ntRect() const = 0; |
450 | 450 |
451 virtual FX_FLOAT GetFontS
ize() const = 0; | 451 virtual FX_FLOAT GetFontS
ize() const = 0; |
452 » virtual IFX_Edit*» » » » » » GetItemE
dit(FX_INT32 nIndex) const = 0; | 452 » virtual IFX_Edit*» » » » » » GetItemE
dit(int32_t nIndex) const = 0; |
453 » virtual FX_INT32» » » » » » GetCount
() const = 0; | 453 » virtual int32_t»» » » » » GetCount() const
= 0; |
454 » virtual FX_BOOL»» » » » » » IsItemSe
lected(FX_INT32 nIndex) const = 0; | 454 » virtual FX_BOOL»» » » » » » IsItemSe
lected(int32_t nIndex) const = 0; |
455 virtual FX_FLOAT GetFirst
Height() const = 0; | 455 virtual FX_FLOAT GetFirst
Height() const = 0; |
456 | 456 |
457 virtual void SetMulti
pleSel(FX_BOOL bMultiple) = 0; | 457 virtual void SetMulti
pleSel(FX_BOOL bMultiple) = 0; |
458 virtual FX_BOOL IsMultip
leSel() const = 0; | 458 virtual FX_BOOL IsMultip
leSel() const = 0; |
459 » virtual FX_BOOL»» » » » » » IsValid(
FX_INT32 nItemIndex) const = 0; | 459 » virtual FX_BOOL»» » » » » » IsValid(
int32_t nItemIndex) const = 0; |
460 » virtual FX_INT32» » » » » » FindNext
(FX_INT32 nIndex,FX_WCHAR nChar) const = 0;» | 460 » virtual int32_t»» » » » » FindNext(int32_t
nIndex,FX_WCHAR nChar) const = 0;» |
461 | 461 |
462 virtual void SetScrol
lPos(const CPDF_Point & point) = 0; | 462 virtual void SetScrol
lPos(const CPDF_Point & point) = 0; |
463 » virtual void» » » » » » » ScrollTo
ListItem(FX_INT32 nItemIndex) = 0; | 463 » virtual void» » » » » » » ScrollTo
ListItem(int32_t nItemIndex) = 0; |
464 » virtual CPDF_Rect» » » » » » GetItemR
ect(FX_INT32 nIndex) const = 0; | 464 » virtual CPDF_Rect» » » » » » GetItemR
ect(int32_t nIndex) const = 0; |
465 » virtual FX_INT32» » » » » » GetCaret
() const = 0; | 465 » virtual int32_t»» » » » » GetCaret() const
= 0; |
466 » virtual FX_INT32» » » » » » GetSelec
t() const = 0;» | 466 » virtual int32_t»» » » » » GetSelect() cons
t = 0;» |
467 » virtual FX_INT32» » » » » » GetTopIt
em() const = 0; | 467 » virtual int32_t»» » » » » GetTopItem() con
st = 0; |
468 » virtual FX_INT32» » » » » » GetItemI
ndex(const CPDF_Point & point) const = 0; | 468 » virtual int32_t»» » » » » GetItemIndex(con
st CPDF_Point & point) const = 0; |
469 » virtual FX_INT32» » » » » » GetFirst
Selected() const = 0; | 469 » virtual int32_t»» » » » » GetFirstSelected
() const = 0; |
470 | 470 |
471 virtual void AddStrin
g(FX_LPCWSTR string) = 0; | 471 virtual void AddStrin
g(FX_LPCWSTR string) = 0; |
472 » virtual void» » » » » » » SetTopIt
em(FX_INT32 nIndex) = 0;» | 472 » virtual void» » » » » » » SetTopIt
em(int32_t nIndex) = 0;» |
473 » virtual void» » » » » » » Select(F
X_INT32 nItemIndex) = 0; | 473 » virtual void» » » » » » » Select(i
nt32_t nItemIndex) = 0; |
474 » virtual void» » » » » » » SetCaret
(FX_INT32 nItemIndex) = 0; | 474 » virtual void» » » » » » » SetCaret
(int32_t nItemIndex) = 0; |
475 virtual void Empty()
= 0; | 475 virtual void Empty()
= 0; |
476 virtual void Cancel()
= 0; | 476 virtual void Cancel()
= 0; |
477 virtual CFX_WideString GetText() const
= 0; | 477 virtual CFX_WideString GetText() const
= 0; |
478 | 478 |
479 | 479 |
480 virtual void OnMouseD
own(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 480 virtual void OnMouseD
own(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
481 virtual void OnMouseM
ove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 481 virtual void OnMouseM
ove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
482 virtual void OnVK_UP(
FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 482 virtual void OnVK_UP(
FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
483 virtual void OnVK_DOW
N(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 483 virtual void OnVK_DOW
N(FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
484 virtual void OnVK_LEF
T(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 484 virtual void OnVK_LEF
T(FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
485 virtual void OnVK_RIG
HT(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 485 virtual void OnVK_RIG
HT(FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
486 virtual void OnVK_HOM
E(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 486 virtual void OnVK_HOM
E(FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
487 virtual void OnVK_END
(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 487 virtual void OnVK_END
(FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
488 » virtual void» » » » » » » OnVK(FX_
INT32 nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 488 » virtual void» » » » » » » OnVK(int
32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
489 virtual FX_BOOL OnChar(F
X_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 489 virtual FX_BOOL OnChar(F
X_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl) = 0; |
490 | 490 |
491 protected: | 491 protected: |
492 ~IFX_List() { } | 492 ~IFX_List() { } |
493 }; | 493 }; |
494 | 494 |
495 #endif // FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ | 495 #endif // FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ |
OLD | NEW |