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_FXET_EDIT_H_ | 7 #ifndef FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_ |
8 #define FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_ | 8 #define FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_ |
9 | 9 |
10 #include "../../../core/include/fpdfdoc/fpdf_vt.h" | 10 #include "../../../core/include/fpdfdoc/fpdf_vt.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 { | 104 { |
105 } | 105 } |
106 | 106 |
107 virtual ~CFX_Edit_LineRectArray() | 107 virtual ~CFX_Edit_LineRectArray() |
108 { | 108 { |
109 Empty(); | 109 Empty(); |
110 } | 110 } |
111 | 111 |
112 void Empty() | 112 void Empty() |
113 { | 113 { |
114 » » for (FX_INT32 i = 0, sz = m_LineRects.GetSize(); i < sz; i++) | 114 » » for (int32_t i = 0, sz = m_LineRects.GetSize(); i < sz; i++) |
115 delete m_LineRects.GetAt(i); | 115 delete m_LineRects.GetAt(i); |
116 | 116 |
117 m_LineRects.RemoveAll(); | 117 m_LineRects.RemoveAll(); |
118 } | 118 } |
119 | 119 |
120 void RemoveAll() | 120 void RemoveAll() |
121 { | 121 { |
122 m_LineRects.RemoveAll(); | 122 m_LineRects.RemoveAll(); |
123 } | 123 } |
124 | 124 |
125 void operator = (CFX_Edit_LineRectArray & rects) | 125 void operator = (CFX_Edit_LineRectArray & rects) |
126 { | 126 { |
127 Empty(); | 127 Empty(); |
128 » » for (FX_INT32 i = 0, sz = rects.GetSize(); i < sz; i++) | 128 » » for (int32_t i = 0, sz = rects.GetSize(); i < sz; i++) |
129 m_LineRects.Add(rects.GetAt(i)); | 129 m_LineRects.Add(rects.GetAt(i)); |
130 | 130 |
131 rects.RemoveAll(); | 131 rects.RemoveAll(); |
132 } | 132 } |
133 | 133 |
134 void Add(const CPVT_WordRange & wrLine,const CPDF_Rect & rcLine) | 134 void Add(const CPVT_WordRange & wrLine,const CPDF_Rect & rcLine) |
135 { | 135 { |
136 if (CFX_Edit_LineRect * pRect = new CFX_Edit_LineRect(wrLine,rcL
ine)) | 136 if (CFX_Edit_LineRect * pRect = new CFX_Edit_LineRect(wrLine,rcL
ine)) |
137 m_LineRects.Add(pRect); | 137 m_LineRects.Add(pRect); |
138 } | 138 } |
139 | 139 |
140 » FX_INT32 GetSize() const | 140 » int32_t GetSize() const |
141 { | 141 { |
142 return m_LineRects.GetSize(); | 142 return m_LineRects.GetSize(); |
143 } | 143 } |
144 | 144 |
145 » CFX_Edit_LineRect * GetAt(FX_INT32 nIndex) const | 145 » CFX_Edit_LineRect * GetAt(int32_t nIndex) const |
146 { | 146 { |
147 if (nIndex < 0 || nIndex >= m_LineRects.GetSize()) | 147 if (nIndex < 0 || nIndex >= m_LineRects.GetSize()) |
148 return NULL; | 148 return NULL; |
149 | 149 |
150 return m_LineRects.GetAt(nIndex); | 150 return m_LineRects.GetAt(nIndex); |
151 } | 151 } |
152 | 152 |
153 CFX_ArrayTemplate<CFX_Edit_LineRect*> m_LineRects; | 153 CFX_ArrayTemplate<CFX_Edit_LineRect*> m_LineRects; |
154 }; | 154 }; |
155 | 155 |
156 class CFX_Edit_RectArray | 156 class CFX_Edit_RectArray |
157 { | 157 { |
158 public: | 158 public: |
159 CFX_Edit_RectArray() | 159 CFX_Edit_RectArray() |
160 { | 160 { |
161 } | 161 } |
162 | 162 |
163 virtual ~CFX_Edit_RectArray() | 163 virtual ~CFX_Edit_RectArray() |
164 { | 164 { |
165 this->Empty(); | 165 this->Empty(); |
166 } | 166 } |
167 | 167 |
168 void Empty() | 168 void Empty() |
169 { | 169 { |
170 » » for (FX_INT32 i = 0, sz = m_Rects.GetSize(); i < sz; i++) | 170 » » for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++) |
171 delete m_Rects.GetAt(i); | 171 delete m_Rects.GetAt(i); |
172 | 172 |
173 this->m_Rects.RemoveAll(); | 173 this->m_Rects.RemoveAll(); |
174 } | 174 } |
175 | 175 |
176 void Add(const CPDF_Rect & rect) | 176 void Add(const CPDF_Rect & rect) |
177 { | 177 { |
178 //check for overlaped area | 178 //check for overlaped area |
179 » » for (FX_INT32 i = 0, sz = m_Rects.GetSize(); i < sz; i++) | 179 » » for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++) |
180 if (CPDF_Rect * pRect = m_Rects.GetAt(i)) | 180 if (CPDF_Rect * pRect = m_Rects.GetAt(i)) |
181 if (pRect->Contains(rect))return; | 181 if (pRect->Contains(rect))return; |
182 | 182 |
183 if (CPDF_Rect * pNewRect = new CPDF_Rect(rect)) | 183 if (CPDF_Rect * pNewRect = new CPDF_Rect(rect)) |
184 m_Rects.Add(pNewRect); | 184 m_Rects.Add(pNewRect); |
185 } | 185 } |
186 | 186 |
187 » FX_INT32 GetSize() const | 187 » int32_t GetSize() const |
188 { | 188 { |
189 return m_Rects.GetSize(); | 189 return m_Rects.GetSize(); |
190 } | 190 } |
191 | 191 |
192 » CPDF_Rect * GetAt(FX_INT32 nIndex) const | 192 » CPDF_Rect * GetAt(int32_t nIndex) const |
193 { | 193 { |
194 if (nIndex < 0 || nIndex >= m_Rects.GetSize()) | 194 if (nIndex < 0 || nIndex >= m_Rects.GetSize()) |
195 return NULL; | 195 return NULL; |
196 | 196 |
197 return m_Rects.GetAt(nIndex); | 197 return m_Rects.GetAt(nIndex); |
198 } | 198 } |
199 | 199 |
200 CFX_ArrayTemplate<CPDF_Rect*> m_Rects; | 200 CFX_ArrayTemplate<CPDF_Rect*> m_Rects; |
201 }; | 201 }; |
202 | 202 |
203 class CFX_Edit_Refresh | 203 class CFX_Edit_Refresh |
204 { | 204 { |
205 public: | 205 public: |
206 CFX_Edit_Refresh(); | 206 CFX_Edit_Refresh(); |
207 virtual ~CFX_Edit_Refresh(); | 207 virtual ~CFX_Edit_Refresh(); |
208 | 208 |
209 void
BeginRefresh(); | 209 void
BeginRefresh(); |
210 void
Push(const CPVT_WordRange & linerange,const CPDF_Rect & rect); | 210 void
Push(const CPVT_WordRange & linerange,const CPDF_Rect & rect); |
211 void
NoAnalyse(); | 211 void
NoAnalyse(); |
212 » void» » » » » » » » »
Analyse(FX_INT32 nAlignment); | 212 » void» » » » » » » » »
Analyse(int32_t nAlignment); |
213 void
AddRefresh(const CPDF_Rect & rect); | 213 void
AddRefresh(const CPDF_Rect & rect); |
214 const CFX_Edit_RectArray * GetRefreshRects(
) const; | 214 const CFX_Edit_RectArray * GetRefreshRects(
) const; |
215 void
EndRefresh(); | 215 void
EndRefresh(); |
216 | 216 |
217 private: | 217 private: |
218 CFX_Edit_LineRectArray m_NewLineRects; | 218 CFX_Edit_LineRectArray m_NewLineRects; |
219 CFX_Edit_LineRectArray m_OldLineRects; | 219 CFX_Edit_LineRectArray m_OldLineRects; |
220 CFX_Edit_RectArray m_Refres
hRects; | 220 CFX_Edit_RectArray m_Refres
hRects; |
221 }; | 221 }; |
222 | 222 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 278 } |
279 | 279 |
280 CPVT_WordPlace BeginPos,EndPos; | 280 CPVT_WordPlace BeginPos,EndPos; |
281 }; | 281 }; |
282 | 282 |
283 /* ------------------------- CFX_Edit_Undo ---------------------------- */ | 283 /* ------------------------- CFX_Edit_Undo ---------------------------- */ |
284 | 284 |
285 class CFX_Edit_Undo | 285 class CFX_Edit_Undo |
286 { | 286 { |
287 public: | 287 public: |
288 » CFX_Edit_Undo(FX_INT32 nBufsize = 10000); | 288 » CFX_Edit_Undo(int32_t nBufsize = 10000); |
289 virtual ~CFX_Edit_Undo(); | 289 virtual ~CFX_Edit_Undo(); |
290 | 290 |
291 void
Undo(); | 291 void
Undo(); |
292 void
Redo(); | 292 void
Redo(); |
293 | 293 |
294 void
AddItem(IFX_Edit_UndoItem* pItem); | 294 void
AddItem(IFX_Edit_UndoItem* pItem); |
295 | 295 |
296 FX_BOOL
CanUndo() const; | 296 FX_BOOL
CanUndo() const; |
297 FX_BOOL
CanRedo() const; | 297 FX_BOOL
CanRedo() const; |
298 FX_BOOL
IsModified() const; | 298 FX_BOOL
IsModified() const; |
299 FX_BOOL
IsWorking() const; | 299 FX_BOOL
IsWorking() const; |
300 | 300 |
301 void
Reset(); | 301 void
Reset(); |
302 | 302 |
303 » IFX_Edit_UndoItem*» » » » » » GetItem(
FX_INT32 nIndex); | 303 » IFX_Edit_UndoItem*» » » » » » GetItem(
int32_t nIndex); |
304 » FX_INT32» » » » » » » »
GetItemCount(){return m_UndoItemStack.GetSize();} | 304 » int32_t»» » » » » » » GetItemC
ount(){return m_UndoItemStack.GetSize();} |
305 » FX_INT32» » » » » » » »
GetCurUndoPos(){return m_nCurUndoPos;} | 305 » int32_t»» » » » » » » GetCurUn
doPos(){return m_nCurUndoPos;} |
306 | 306 |
307 private: | 307 private: |
308 » void» » » » » » » » »
SetBufSize(FX_INT32 nSize){m_nBufSize = nSize;} | 308 » void» » » » » » » » »
SetBufSize(int32_t nSize){m_nBufSize = nSize;} |
309 » FX_INT32» » » » » » » »
GetBufSize(){return m_nBufSize;} | 309 » int32_t»» » » » » » » GetBufSi
ze(){return m_nBufSize;} |
310 | 310 |
311 void
RemoveHeads(); | 311 void
RemoveHeads(); |
312 void
RemoveTails(); | 312 void
RemoveTails(); |
313 | 313 |
314 private: | 314 private: |
315 CFX_ArrayTemplate<IFX_Edit_UndoItem*> m_UndoItemStack; | 315 CFX_ArrayTemplate<IFX_Edit_UndoItem*> m_UndoItemStack; |
316 | 316 |
317 » FX_INT32» » » » » » » »
m_nCurUndoPos; | 317 » int32_t»» » » » » » » m_nCurUn
doPos; |
318 » FX_INT32» » » » » » » »
m_nBufSize; | 318 » int32_t»» » » » » » » m_nBufSi
ze; |
319 FX_BOOL
m_bModified; | 319 FX_BOOL
m_bModified; |
320 FX_BOOL
m_bVirgin; | 320 FX_BOOL
m_bVirgin; |
321 FX_BOOL
m_bWorking; | 321 FX_BOOL
m_bWorking; |
322 }; | 322 }; |
323 | 323 |
324 class CFX_Edit_UndoItem : public IFX_Edit_UndoItem | 324 class CFX_Edit_UndoItem : public IFX_Edit_UndoItem |
325 { | 325 { |
326 public: | 326 public: |
327 CFX_Edit_UndoItem() : m_bFirst(TRUE), m_bLast(TRUE) {} | 327 CFX_Edit_UndoItem() : m_bFirst(TRUE), m_bLast(TRUE) {} |
328 | 328 |
(...skipping 26 matching lines...) Expand all Loading... |
355 CFX_WideString m_sTitle
; | 355 CFX_WideString m_sTitle
; |
356 CFX_ArrayTemplate<CFX_Edit_UndoItem*> m_Items; | 356 CFX_ArrayTemplate<CFX_Edit_UndoItem*> m_Items; |
357 }; | 357 }; |
358 | 358 |
359 /* ------------------------- CFX_Edit_UndoItem derived classes -----------------
----------- */ | 359 /* ------------------------- CFX_Edit_UndoItem derived classes -----------------
----------- */ |
360 | 360 |
361 class CFXEU_InsertWord : public CFX_Edit_UndoItem | 361 class CFXEU_InsertWord : public CFX_Edit_UndoItem |
362 { | 362 { |
363 public: | 363 public: |
364 CFXEU_InsertWord(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, co
nst CPVT_WordPlace & wpNewPlace, | 364 CFXEU_InsertWord(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, co
nst CPVT_WordPlace & wpNewPlace, |
365 » » FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProp
s); | 365 » » FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps
); |
366 virtual ~CFXEU_InsertWord(); | 366 virtual ~CFXEU_InsertWord(); |
367 | 367 |
368 void Redo(); | 368 void Redo(); |
369 void Undo(); | 369 void Undo(); |
370 | 370 |
371 private: | 371 private: |
372 CFX_Edit* m_pEdit; | 372 CFX_Edit* m_pEdit; |
373 | 373 |
374 CPVT_WordPlace m_wpOld; | 374 CPVT_WordPlace m_wpOld; |
375 CPVT_WordPlace m_wpNew; | 375 CPVT_WordPlace m_wpNew; |
376 FX_WORD m_Word; | 376 FX_WORD m_Word; |
377 » FX_INT32» » » » » m_nCharset; | 377 » int32_t»» » » » m_nCharset; |
378 CPVT_WordProps m_WordProps; | 378 CPVT_WordProps m_WordProps; |
379 }; | 379 }; |
380 | 380 |
381 class CFXEU_InsertReturn : public CFX_Edit_UndoItem | 381 class CFXEU_InsertReturn : public CFX_Edit_UndoItem |
382 { | 382 { |
383 public: | 383 public: |
384 CFXEU_InsertReturn(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace,
const CPVT_WordPlace & wpNewPlace, | 384 CFXEU_InsertReturn(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace,
const CPVT_WordPlace & wpNewPlace, |
385 const CPVT_SecProps * p
SecProps, const CPVT_WordProps * pWordProps); | 385 const CPVT_SecProps * p
SecProps, const CPVT_WordProps * pWordProps); |
386 virtual ~CFXEU_InsertReturn(); | 386 virtual ~CFXEU_InsertReturn(); |
387 | 387 |
388 void Redo(); | 388 void Redo(); |
389 void Undo(); | 389 void Undo(); |
390 | 390 |
391 private: | 391 private: |
392 CFX_Edit * m_pEdit; | 392 CFX_Edit * m_pEdit; |
393 | 393 |
394 CPVT_WordPlace m_wpOld; | 394 CPVT_WordPlace m_wpOld; |
395 CPVT_WordPlace m_wpNew; | 395 CPVT_WordPlace m_wpNew; |
396 CPVT_SecProps m_SecProps; | 396 CPVT_SecProps m_SecProps; |
397 CPVT_WordProps m_WordProps; | 397 CPVT_WordProps m_WordProps; |
398 }; | 398 }; |
399 | 399 |
400 class CFXEU_Backspace : public CFX_Edit_UndoItem | 400 class CFXEU_Backspace : public CFX_Edit_UndoItem |
401 { | 401 { |
402 public: | 402 public: |
403 CFXEU_Backspace(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, con
st CPVT_WordPlace & wpNewPlace, | 403 CFXEU_Backspace(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, con
st CPVT_WordPlace & wpNewPlace, |
404 » » » » » » FX_WORD word, FX_INT32 charset, | 404 » » » » » » FX_WORD word, int32_t charset, |
405 const CPVT_SecProps & SecProps,
const CPVT_WordProps & WordProps); | 405 const CPVT_SecProps & SecProps,
const CPVT_WordProps & WordProps); |
406 virtual ~CFXEU_Backspace(); | 406 virtual ~CFXEU_Backspace(); |
407 | 407 |
408 void Redo(); | 408 void Redo(); |
409 void Undo(); | 409 void Undo(); |
410 | 410 |
411 private: | 411 private: |
412 CFX_Edit * m_pEdit; | 412 CFX_Edit * m_pEdit; |
413 | 413 |
414 CPVT_WordPlace m_wpOld; | 414 CPVT_WordPlace m_wpOld; |
415 CPVT_WordPlace m_wpNew; | 415 CPVT_WordPlace m_wpNew; |
416 FX_WORD m_Word; | 416 FX_WORD m_Word; |
417 » FX_INT32» » » » » m_nCharset; | 417 » int32_t»» » » » m_nCharset; |
418 CPVT_SecProps m_SecProps; | 418 CPVT_SecProps m_SecProps; |
419 CPVT_WordProps m_WordProps; | 419 CPVT_WordProps m_WordProps; |
420 }; | 420 }; |
421 | 421 |
422 class CFXEU_Delete : public CFX_Edit_UndoItem | 422 class CFXEU_Delete : public CFX_Edit_UndoItem |
423 { | 423 { |
424 public: | 424 public: |
425 CFXEU_Delete(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const
CPVT_WordPlace & wpNewPlace, | 425 CFXEU_Delete(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const
CPVT_WordPlace & wpNewPlace, |
426 » » » » » » FX_WORD word, FX_INT32 charset, | 426 » » » » » » FX_WORD word, int32_t charset, |
427 const CPVT_SecProps & SecProps,
const CPVT_WordProps & WordProps, FX_BOOL bSecEnd); | 427 const CPVT_SecProps & SecProps,
const CPVT_WordProps & WordProps, FX_BOOL bSecEnd); |
428 virtual ~CFXEU_Delete(); | 428 virtual ~CFXEU_Delete(); |
429 | 429 |
430 void Redo(); | 430 void Redo(); |
431 void Undo(); | 431 void Undo(); |
432 | 432 |
433 private: | 433 private: |
434 CFX_Edit * m_pEdit; | 434 CFX_Edit * m_pEdit; |
435 | 435 |
436 CPVT_WordPlace m_wpOld; | 436 CPVT_WordPlace m_wpOld; |
437 CPVT_WordPlace m_wpNew; | 437 CPVT_WordPlace m_wpNew; |
438 FX_WORD m_Word; | 438 FX_WORD m_Word; |
439 » FX_INT32» » » » » m_nCharset; | 439 » int32_t»» » » » m_nCharset; |
440 CPVT_SecProps m_SecProps; | 440 CPVT_SecProps m_SecProps; |
441 CPVT_WordProps m_WordProps; | 441 CPVT_WordProps m_WordProps; |
442 FX_BOOL m_bSecEnd; | 442 FX_BOOL m_bSecEnd; |
443 }; | 443 }; |
444 | 444 |
445 class CFXEU_Clear : public CFX_Edit_UndoItem | 445 class CFXEU_Clear : public CFX_Edit_UndoItem |
446 { | 446 { |
447 public: | 447 public: |
448 CFXEU_Clear(CFX_Edit * pEdit, const CPVT_WordRange & wrSel, const CFX_Wi
deString & swText); | 448 CFXEU_Clear(CFX_Edit * pEdit, const CPVT_WordRange & wrSel, const CFX_Wi
deString & swText); |
449 virtual ~CFXEU_Clear(); | 449 virtual ~CFXEU_Clear(); |
450 | 450 |
451 void Redo(); | 451 void Redo(); |
452 void Undo(); | 452 void Undo(); |
453 | 453 |
454 private: | 454 private: |
455 CFX_Edit* m_pEdit; | 455 CFX_Edit* m_pEdit; |
456 | 456 |
457 CPVT_WordRange m_wrSel; | 457 CPVT_WordRange m_wrSel; |
458 CFX_WideString m_swText; | 458 CFX_WideString m_swText; |
459 }; | 459 }; |
460 | 460 |
461 class CFXEU_ClearRich : public CFX_Edit_UndoItem | 461 class CFXEU_ClearRich : public CFX_Edit_UndoItem |
462 { | 462 { |
463 public: | 463 public: |
464 CFXEU_ClearRich(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, con
st CPVT_WordPlace & wpNewPlace, | 464 CFXEU_ClearRich(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, con
st CPVT_WordPlace & wpNewPlace, |
465 const CPVT_WordRange & wrSel, | 465 const CPVT_WordRange & wrSel, |
466 » » » » » FX_WORD word, FX_INT32 charset, | 466 » » » » » FX_WORD word, int32_t charset, |
467 const CPVT_SecProps & SecProps, const
CPVT_WordProps & WordProps); | 467 const CPVT_SecProps & SecProps, const
CPVT_WordProps & WordProps); |
468 virtual ~CFXEU_ClearRich(); | 468 virtual ~CFXEU_ClearRich(); |
469 | 469 |
470 void Redo(); | 470 void Redo(); |
471 void Undo(); | 471 void Undo(); |
472 | 472 |
473 private: | 473 private: |
474 CFX_Edit * m_pEdit; | 474 CFX_Edit * m_pEdit; |
475 | 475 |
476 CPVT_WordPlace m_wpOld; | 476 CPVT_WordPlace m_wpOld; |
477 CPVT_WordPlace m_wpNew; | 477 CPVT_WordPlace m_wpNew; |
478 CPVT_WordRange m_wrSel; | 478 CPVT_WordRange m_wrSel; |
479 FX_WORD m_Word; | 479 FX_WORD m_Word; |
480 » FX_INT32» » » » » m_nCharset; | 480 » int32_t»» » » » m_nCharset; |
481 CPVT_SecProps m_SecProps; | 481 CPVT_SecProps m_SecProps; |
482 CPVT_WordProps m_WordProps; | 482 CPVT_WordProps m_WordProps; |
483 }; | 483 }; |
484 | 484 |
485 class CFXEU_InsertText : public CFX_Edit_UndoItem | 485 class CFXEU_InsertText : public CFX_Edit_UndoItem |
486 { | 486 { |
487 public: | 487 public: |
488 CFXEU_InsertText(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, co
nst CPVT_WordPlace & wpNewPlace, | 488 CFXEU_InsertText(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, co
nst CPVT_WordPlace & wpNewPlace, |
489 » » » » » » const CFX_WideString & swText
, FX_INT32 charset, | 489 » » » » » » const CFX_WideString & swText
, int32_t charset, |
490 const CPVT_SecProps * pSecPro
ps, const CPVT_WordProps * pWordProps); | 490 const CPVT_SecProps * pSecPro
ps, const CPVT_WordProps * pWordProps); |
491 virtual ~CFXEU_InsertText(); | 491 virtual ~CFXEU_InsertText(); |
492 | 492 |
493 void Redo(); | 493 void Redo(); |
494 void Undo(); | 494 void Undo(); |
495 | 495 |
496 private: | 496 private: |
497 CFX_Edit * m_pEdit; | 497 CFX_Edit * m_pEdit; |
498 | 498 |
499 CPVT_WordPlace m_wpOld; | 499 CPVT_WordPlace m_wpOld; |
500 CPVT_WordPlace m_wpNew; | 500 CPVT_WordPlace m_wpNew; |
501 CFX_WideString m_swText; | 501 CFX_WideString m_swText; |
502 » FX_INT32» » » » » m_nCharset; | 502 » int32_t»» » » » m_nCharset; |
503 CPVT_SecProps m_SecProps; | 503 CPVT_SecProps m_SecProps; |
504 CPVT_WordProps m_WordProps; | 504 CPVT_WordProps m_WordProps; |
505 }; | 505 }; |
506 | 506 |
507 class CFXEU_SetSecProps : public CFX_Edit_UndoItem | 507 class CFXEU_SetSecProps : public CFX_Edit_UndoItem |
508 { | 508 { |
509 public: | 509 public: |
510 CFXEU_SetSecProps(CFX_Edit * pEdit, const CPVT_WordPlace & place, EDIT_P
ROPS_E ep, | 510 CFXEU_SetSecProps(CFX_Edit * pEdit, const CPVT_WordPlace & place, EDIT_P
ROPS_E ep, |
511 const CPVT_SecProps & oldsecprops, const CPVT_WordProps & oldwor
dprops, | 511 const CPVT_SecProps & oldsecprops, const CPVT_WordProps & oldwor
dprops, |
512 const CPVT_SecProps & newsecprops, const CPVT_WordProps & newwor
dprops, const CPVT_WordRange & range); | 512 const CPVT_SecProps & newsecprops, const CPVT_WordProps & newwor
dprops, const CPVT_WordRange & range); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 void
SetNotify(IFX_Edit_Notify * pNotify); | 571 void
SetNotify(IFX_Edit_Notify * pNotify); |
572 void
SetOprNotify(IFX_Edit_OprNotify* pOprNotify); | 572 void
SetOprNotify(IFX_Edit_OprNotify* pOprNotify); |
573 IFX_Edit_Iterator* GetItera
tor(); | 573 IFX_Edit_Iterator* GetItera
tor(); |
574 IPDF_VariableText * GetVaria
bleText(); | 574 IPDF_VariableText * GetVaria
bleText(); |
575 IFX_Edit_FontMap* GetFontM
ap(); | 575 IFX_Edit_FontMap* GetFontM
ap(); |
576 | 576 |
577 void
Initialize(); | 577 void
Initialize(); |
578 void
SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE); | 578 void
SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE); |
579 void
SetScrollPos(const CPDF_Point & point); | 579 void
SetScrollPos(const CPDF_Point & point); |
580 | 580 |
581 » void» » » » » » » » »
SetAlignmentH(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE); | 581 » void» » » » » » » » »
SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE); |
582 » void» » » » » » » » »
SetAlignmentV(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE); | 582 » void» » » » » » » » »
SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE); |
583 void
SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE); | 583 void
SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE); |
584 » void» » » » » » » » »
SetLimitChar(FX_INT32 nLimitChar = 0, FX_BOOL bPaint = TRUE); | 584 » void» » » » » » » » »
SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE); |
585 » void» » » » » » » » »
SetCharArray(FX_INT32 nCharArray = 0, FX_BOOL bPaint = TRUE); | 585 » void» » » » » » » » »
SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE); |
586 void
SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE); | 586 void
SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE); |
587 » void» » » » » » » » »
SetHorzScale(FX_INT32 nHorzScale = 100, FX_BOOL bPaint = TRUE); | 587 » void» » » » » » » » »
SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE); |
588 void
SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); | 588 void
SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); |
589 void
SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE); | 589 void
SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE); |
590 void
SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); | 590 void
SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); |
591 void
SetAutoFontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); | 591 void
SetAutoFontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); |
592 void
SetAutoScroll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); | 592 void
SetAutoScroll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); |
593 void
SetFontSize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE); | 593 void
SetFontSize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE); |
594 void
SetTextOverflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE); | 594 void
SetTextOverflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE); |
595 | 595 |
596 FX_BOOL
IsRichText() const; | 596 FX_BOOL
IsRichText() const; |
597 void
SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE); | 597 void
SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE); |
598 FX_BOOL
SetRichFontSize(FX_FLOAT fFontSize); | 598 FX_BOOL
SetRichFontSize(FX_FLOAT fFontSize); |
599 » FX_BOOL»» » » » » » » »
SetRichFontIndex(FX_INT32 nFontIndex); | 599 » FX_BOOL»» » » » » » » »
SetRichFontIndex(int32_t nFontIndex); |
600 FX_BOOL
SetRichTextColor(FX_COLORREF dwColor); | 600 FX_BOOL
SetRichTextColor(FX_COLORREF dwColor); |
601 » FX_BOOL»» » » » » » » »
SetRichTextScript(FX_INT32 nScriptType); | 601 » FX_BOOL»» » » » » » » »
SetRichTextScript(int32_t nScriptType); |
602 FX_BOOL
SetRichTextBold(FX_BOOL bBold = TRUE); | 602 FX_BOOL
SetRichTextBold(FX_BOOL bBold = TRUE); |
603 FX_BOOL
SetRichTextItalic(FX_BOOL bItalic = TRUE); | 603 FX_BOOL
SetRichTextItalic(FX_BOOL bItalic = TRUE); |
604 FX_BOOL
SetRichTextUnderline(FX_BOOL bUnderline = TRUE); | 604 FX_BOOL
SetRichTextUnderline(FX_BOOL bUnderline = TRUE); |
605 FX_BOOL
SetRichTextCrossout(FX_BOOL bCrossout = TRUE); | 605 FX_BOOL
SetRichTextCrossout(FX_BOOL bCrossout = TRUE); |
606 FX_BOOL
SetRichTextCharSpace(FX_FLOAT fCharSpace); | 606 FX_BOOL
SetRichTextCharSpace(FX_FLOAT fCharSpace); |
607 » FX_BOOL»» » » » » » » »
SetRichTextHorzScale(FX_INT32 nHorzScale = 100); | 607 » FX_BOOL»» » » » » » » »
SetRichTextHorzScale(int32_t nHorzScale = 100); |
608 FX_BOOL
SetRichTextLineLeading(FX_FLOAT fLineLeading); | 608 FX_BOOL
SetRichTextLineLeading(FX_FLOAT fLineLeading); |
609 FX_BOOL
SetRichTextLineIndent(FX_FLOAT fLineIndent); | 609 FX_BOOL
SetRichTextLineIndent(FX_FLOAT fLineIndent); |
610 » FX_BOOL»» » » » » » » »
SetRichTextAlignment(FX_INT32 nAlignment); | 610 » FX_BOOL»» » » » » » » »
SetRichTextAlignment(int32_t nAlignment); |
611 | 611 |
612 void
OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl); | 612 void
OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl); |
613 void
OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl); | 613 void
OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl); |
614 void
OnVK_UP(FX_BOOL bShift,FX_BOOL bCtrl); | 614 void
OnVK_UP(FX_BOOL bShift,FX_BOOL bCtrl); |
615 void
OnVK_DOWN(FX_BOOL bShift,FX_BOOL bCtrl); | 615 void
OnVK_DOWN(FX_BOOL bShift,FX_BOOL bCtrl); |
616 void
OnVK_LEFT(FX_BOOL bShift,FX_BOOL bCtrl); | 616 void
OnVK_LEFT(FX_BOOL bShift,FX_BOOL bCtrl); |
617 void
OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl); | 617 void
OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl); |
618 void
OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl); | 618 void
OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl); |
619 void
OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl); | 619 void
OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl); |
620 | 620 |
621 » void» » » » » » » » »
SetText(FX_LPCWSTR text,FX_INT32 charset = DEFAULT_CHARSET, | 621 » void» » » » » » » » »
SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET, |
622
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL); | 622
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL); |
623 » FX_BOOL»» » » » » » » »
InsertWord(FX_WORD word, FX_INT32 charset = DEFAULT_CHARSET, const CPVT_WordProp
s * pWordProps = NULL); | 623 » FX_BOOL»» » » » » » » »
InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps
* pWordProps = NULL); |
624 FX_BOOL
InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWord
Props = NULL); | 624 FX_BOOL
InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWord
Props = NULL); |
625 FX_BOOL
Backspace(); | 625 FX_BOOL
Backspace(); |
626 FX_BOOL
Delete(); | 626 FX_BOOL
Delete(); |
627 FX_BOOL
Clear(); | 627 FX_BOOL
Clear(); |
628 FX_BOOL
Empty(); | 628 FX_BOOL
Empty(); |
629 » FX_BOOL»» » » » » » » »
InsertText(FX_LPCWSTR text, FX_INT32 charset = DEFAULT_CHARSET, | 629 » FX_BOOL»» » » » » » » »
InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET, |
630
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL); | 630
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL); |
631 FX_BOOL
Redo(); | 631 FX_BOOL
Redo(); |
632 FX_BOOL
Undo(); | 632 FX_BOOL
Undo(); |
633 » CPVT_WordPlace» » » » » » » DoInsert
Text(const CPVT_WordPlace& place, FX_LPCWSTR text, FX_INT32 charset, | 633 » CPVT_WordPlace» » » » » » » DoInsert
Text(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset, |
634
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordPro
ps); | 634
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordPro
ps); |
635 » FX_INT32» » » » » » » »
GetCharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset); | 635 » int32_t»» » » » » » » GetCharS
etFromUnicode(FX_WORD word, int32_t nOldCharset); |
636 | 636 |
637 » FX_INT32» » » » » » » »
WordPlaceToWordIndex(const CPVT_WordPlace & place) const; | 637 » int32_t»» » » » » » » WordPlac
eToWordIndex(const CPVT_WordPlace & place) const; |
638 » CPVT_WordPlace» » » » » » » WordInde
xToWordPlace(FX_INT32 index) const;» | 638 » CPVT_WordPlace» » » » » » » WordInde
xToWordPlace(int32_t index) const;» |
639 | 639 |
640 CPVT_WordPlace GetLineB
eginPlace(const CPVT_WordPlace & place) const; | 640 CPVT_WordPlace GetLineB
eginPlace(const CPVT_WordPlace & place) const; |
641 CPVT_WordPlace GetLineE
ndPlace(const CPVT_WordPlace & place) const; | 641 CPVT_WordPlace GetLineE
ndPlace(const CPVT_WordPlace & place) const; |
642 CPVT_WordPlace GetSecti
onBeginPlace(const CPVT_WordPlace & place) const; | 642 CPVT_WordPlace GetSecti
onBeginPlace(const CPVT_WordPlace & place) const; |
643 CPVT_WordPlace GetSecti
onEndPlace(const CPVT_WordPlace & place) const; | 643 CPVT_WordPlace GetSecti
onEndPlace(const CPVT_WordPlace & place) const; |
644 CPVT_WordPlace SearchWo
rdPlace(const CPDF_Point& point) const; | 644 CPVT_WordPlace SearchWo
rdPlace(const CPDF_Point& point) const; |
645 | 645 |
646 » FX_INT32» » » » » » » »
GetCaret() const; | 646 » int32_t»» » » » » » » GetCaret
() const; |
647 CPVT_WordPlace GetCaret
WordPlace() const; | 647 CPVT_WordPlace GetCaret
WordPlace() const; |
648 CFX_WideString GetSelTe
xt() const; | 648 CFX_WideString GetSelTe
xt() const; |
649 CFX_WideString GetText(
) const; | 649 CFX_WideString GetText(
) const; |
650 FX_FLOAT
GetFontSize() const; | 650 FX_FLOAT
GetFontSize() const; |
651 FX_WORD
GetPasswordChar() const; | 651 FX_WORD
GetPasswordChar() const; |
652 CPDF_Point
GetScrollPos() const; | 652 CPDF_Point
GetScrollPos() const; |
653 » FX_INT32» » » » » » » »
GetCharArray() const; | 653 » int32_t»» » » » » » » GetCharA
rray() const; |
654 CPDF_Rect
GetPlateRect() const; | 654 CPDF_Rect
GetPlateRect() const; |
655 CPDF_Rect
GetContentRect() const; | 655 CPDF_Rect
GetContentRect() const; |
656 CFX_WideString GetRange
Text(const CPVT_WordRange & range) const; | 656 CFX_WideString GetRange
Text(const CPVT_WordRange & range) const; |
657 » FX_INT32» » » » » » » »
GetHorzScale() const; | 657 » int32_t»» » » » » » » GetHorzS
cale() const; |
658 FX_FLOAT
GetCharSpace() const; | 658 FX_FLOAT
GetCharSpace() const; |
659 » FX_INT32» » » » » » » »
GetTotalWords() const; | 659 » int32_t»» » » » » » » GetTotal
Words() const; |
660 » FX_INT32» » » » » » » »
GetTotalLines() const; | 660 » int32_t»» » » » » » » GetTotal
Lines() const; |
661 | 661 |
662 » void» » » » » » » » »
SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar); | 662 » void» » » » » » » » »
SetSel(int32_t nStartChar,int32_t nEndChar); |
663 » void» » » » » » » » »
GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const; | 663 » void» » » » » » » » »
GetSel(int32_t & nStartChar, int32_t & nEndChar) const; |
664 | 664 |
665 private: | 665 private: |
666 void
SelectAll(); | 666 void
SelectAll(); |
667 void
SelectNone(); | 667 void
SelectNone(); |
668 void
SetSel(const CPVT_WordPlace & begin,const CPVT_WordPlace & end); | 668 void
SetSel(const CPVT_WordPlace & begin,const CPVT_WordPlace & end); |
669 FX_BOOL
IsSelected() const; | 669 FX_BOOL
IsSelected() const; |
670 | 670 |
671 void
RearrangeAll(); | 671 void
RearrangeAll(); |
672 void
RearrangePart(const CPVT_WordRange & range); | 672 void
RearrangePart(const CPVT_WordRange & range); |
673 void
Paint(); | 673 void
Paint(); |
674 void
ScrollToCaret(); | 674 void
ScrollToCaret(); |
675 void
SetScrollInfo(); | 675 void
SetScrollInfo(); |
676 void
SetScrollPosX(FX_FLOAT fx); | 676 void
SetScrollPosX(FX_FLOAT fx); |
677 void
SetScrollPosY(FX_FLOAT fy); | 677 void
SetScrollPosY(FX_FLOAT fy); |
678 void
SetScrollLimit(); | 678 void
SetScrollLimit(); |
679 void
SetContentChanged(); | 679 void
SetContentChanged(); |
680 void
EnableNotify(FX_BOOL bNotify); | 680 void
EnableNotify(FX_BOOL bNotify); |
681 | 681 |
682 » void» » » » » » » » »
SetText(FX_LPCWSTR text,FX_INT32 charset, | 682 » void» » » » » » » » »
SetText(FX_LPCWSTR text,int32_t charset, |
683
const CPVT_SecProps * pSecProps,const CPVT_WordProps * p
WordProps,FX_BOOL bAddUndo, FX_BOOL bPaint); | 683
const CPVT_SecProps * pSecProps,const CPVT_WordProps * p
WordProps,FX_BOOL bAddUndo, FX_BOOL bPaint); |
684 » FX_BOOL»» » » » » » » »
InsertWord(FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps,FX_
BOOL bAddUndo, FX_BOOL bPaint); | 684 » FX_BOOL»» » » » » » » »
InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps,FX_B
OOL bAddUndo, FX_BOOL bPaint); |
685 FX_BOOL
InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,F
X_BOOL bAddUndo, FX_BOOL bPaint); | 685 FX_BOOL
InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,F
X_BOOL bAddUndo, FX_BOOL bPaint); |
686 FX_BOOL
Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint); | 686 FX_BOOL
Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint); |
687 FX_BOOL
Delete(FX_BOOL bAddUndo, FX_BOOL bPaint); | 687 FX_BOOL
Delete(FX_BOOL bAddUndo, FX_BOOL bPaint); |
688 FX_BOOL
Clear(FX_BOOL bAddUndo, FX_BOOL bPaint); | 688 FX_BOOL
Clear(FX_BOOL bAddUndo, FX_BOOL bPaint); |
689 » FX_BOOL»» » » » » » » »
InsertText(FX_LPCWSTR text, FX_INT32 charset, | 689 » FX_BOOL»» » » » » » » »
InsertText(FX_LPCWSTR text, int32_t charset, |
690
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProp
s,FX_BOOL bAddUndo, FX_BOOL bPaint); | 690
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProp
s,FX_BOOL bAddUndo, FX_BOOL bPaint); |
691 FX_BOOL
SetRichTextProps(EDIT_PROPS_E eProps, | 691 FX_BOOL
SetRichTextProps(EDIT_PROPS_E eProps, |
692
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordPro
ps); | 692
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordPro
ps); |
693 FX_BOOL
SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place, | 693 FX_BOOL
SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place, |
694
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordPro
ps, const CPVT_WordRange & wr, FX_BOOL bAddUndo); | 694
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordPro
ps, const CPVT_WordRange & wr, FX_BOOL bAddUndo); |
695 FX_BOOL
SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place, | 695 FX_BOOL
SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place, |
696
const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, FX
_BOOL bAddUndo); | 696
const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, FX
_BOOL bAddUndo); |
697 void
PaintSetProps(EDIT_PROPS_E eProps, const CPVT_WordRange & wr); | 697 void
PaintSetProps(EDIT_PROPS_E eProps, const CPVT_WordRange & wr); |
698 void
PaintInsertText(const CPVT_WordPlace & wpOld, const CPVT_WordPlace & wpNew); | 698 void
PaintInsertText(const CPVT_WordPlace & wpOld, const CPVT_WordPlace & wpNew); |
699 | 699 |
700 inline CPDF_Point VTToEdit
(const CPDF_Point & point) const; | 700 inline CPDF_Point VTToEdit
(const CPDF_Point & point) const; |
701 inline CPDF_Point EditToVT
(const CPDF_Point & point) const; | 701 inline CPDF_Point EditToVT
(const CPDF_Point & point) const; |
702 inline CPDF_Rect VTToEdit
(const CPDF_Rect & rect) const; | 702 inline CPDF_Rect VTToEdit
(const CPDF_Rect & rect) const; |
703 inline CPDF_Rect EditToVT
(const CPDF_Rect & rect) const; | 703 inline CPDF_Rect EditToVT
(const CPDF_Rect & rect) const; |
704 | 704 |
705 void
EnableRefresh(FX_BOOL bRefresh); | 705 void
EnableRefresh(FX_BOOL bRefresh); |
706 void
Refresh(REFRESH_PLAN_E ePlan,const CPVT_WordRange * pRange1 = NULL,const CPVT_Wo
rdRange * pRange2 = NULL); | 706 void
Refresh(REFRESH_PLAN_E ePlan,const CPVT_WordRange * pRange1 = NULL,const CPVT_Wo
rdRange * pRange2 = NULL); |
707 void
RefreshPushLineRects(const CPVT_WordRange & wr); | 707 void
RefreshPushLineRects(const CPVT_WordRange & wr); |
708 void
RefreshPushRandomRects(const CPVT_WordRange & wr); | 708 void
RefreshPushRandomRects(const CPVT_WordRange & wr); |
709 void
RefreshWordRange(const CPVT_WordRange& wr); | 709 void
RefreshWordRange(const CPVT_WordRange& wr); |
710 | 710 |
711 » void» » » » » » » » »
SetCaret(FX_INT32 nPos); | 711 » void» » » » » » » » »
SetCaret(int32_t nPos); |
712 void
SetCaret(const CPVT_WordPlace & place); | 712 void
SetCaret(const CPVT_WordPlace & place); |
713 void
SetCaretInfo(); | 713 void
SetCaretInfo(); |
714 void
SetCaretOrigin(); | 714 void
SetCaretOrigin(); |
715 void
SetCaretChange(); | 715 void
SetCaretChange(); |
716 | 716 |
717 CPVT_WordRange GetWhole
WordRange() const; | 717 CPVT_WordRange GetWhole
WordRange() const; |
718 CPVT_WordRange GetVisib
leWordRange() const; | 718 CPVT_WordRange GetVisib
leWordRange() const; |
719 CPVT_WordRange GetLatin
WordsRange(const CPVT_WordPlace & place) const; | 719 CPVT_WordRange GetLatin
WordsRange(const CPVT_WordPlace & place) const; |
720 CPVT_WordRange CombineW
ordRange(const CPVT_WordRange & wr1, const CPVT_WordRange & wr2); | 720 CPVT_WordRange CombineW
ordRange(const CPVT_WordRange & wr1, const CPVT_WordRange & wr2); |
721 CPVT_WordRange GetSelec
tWordRange() const; | 721 CPVT_WordRange GetSelec
tWordRange() const; |
(...skipping 27 matching lines...) Expand all Loading... |
749 CPVT_WordPlace m_wpOldC
aret; | 749 CPVT_WordPlace m_wpOldC
aret; |
750 CFX_Edit_Select m_SelSta
te; | 750 CFX_Edit_Select m_SelSta
te; |
751 | 751 |
752 CPDF_Point
m_ptScrollPos; | 752 CPDF_Point
m_ptScrollPos; |
753 CPDF_Point
m_ptRefreshScrollPos; | 753 CPDF_Point
m_ptRefreshScrollPos; |
754 FX_BOOL
m_bEnableScroll; | 754 FX_BOOL
m_bEnableScroll; |
755 IFX_Edit_Iterator * m_pItera
tor; | 755 IFX_Edit_Iterator * m_pItera
tor; |
756 CFX_Edit_Refresh m_Refres
h; | 756 CFX_Edit_Refresh m_Refres
h; |
757 CPDF_Point
m_ptCaret; | 757 CPDF_Point
m_ptCaret; |
758 CFX_Edit_Undo m_Undo; | 758 CFX_Edit_Undo m_Undo; |
759 » FX_INT32» » » » » » » »
m_nAlignment; | 759 » int32_t»» » » » » » » m_nAlign
ment; |
760 FX_BOOL
m_bNotifyFlag; | 760 FX_BOOL
m_bNotifyFlag; |
761 FX_BOOL
m_bEnableOverflow; | 761 FX_BOOL
m_bEnableOverflow; |
762 FX_BOOL
m_bEnableRefresh; | 762 FX_BOOL
m_bEnableRefresh; |
763 CPDF_Rect
m_rcOldContent; | 763 CPDF_Rect
m_rcOldContent; |
764 FX_BOOL
m_bEnableUndo; | 764 FX_BOOL
m_bEnableUndo; |
765 FX_BOOL
m_bNotify; | 765 FX_BOOL
m_bNotify; |
766 FX_BOOL
m_bOprNotify; | 766 FX_BOOL
m_bOprNotify; |
767 CFX_Edit_GroupUndoItem* m_pGroupUndoItem
; | 767 CFX_Edit_GroupUndoItem* m_pGroupUndoItem
; |
768 }; | 768 }; |
769 | 769 |
770 /* ------------------------- CFX_Edit_Iterator ---------------------------- */ | 770 /* ------------------------- CFX_Edit_Iterator ---------------------------- */ |
771 | 771 |
772 class CFX_Edit_Iterator : public IFX_Edit_Iterator | 772 class CFX_Edit_Iterator : public IFX_Edit_Iterator |
773 { | 773 { |
774 public: | 774 public: |
775 CFX_Edit_Iterator(CFX_Edit * pEdit,IPDF_VariableText_Iterator * pVTItera
tor); | 775 CFX_Edit_Iterator(CFX_Edit * pEdit,IPDF_VariableText_Iterator * pVTItera
tor); |
776 virtual ~CFX_Edit_Iterator(); | 776 virtual ~CFX_Edit_Iterator(); |
777 | 777 |
778 FX_BOOL
NextWord(); | 778 FX_BOOL
NextWord(); |
779 FX_BOOL
NextLine(); | 779 FX_BOOL
NextLine(); |
780 FX_BOOL
NextSection(); | 780 FX_BOOL
NextSection(); |
781 FX_BOOL
PrevWord(); | 781 FX_BOOL
PrevWord(); |
782 FX_BOOL
PrevLine(); | 782 FX_BOOL
PrevLine(); |
783 FX_BOOL
PrevSection(); | 783 FX_BOOL
PrevSection(); |
784 | 784 |
785 FX_BOOL
GetWord(CPVT_Word & word) const; | 785 FX_BOOL
GetWord(CPVT_Word & word) const; |
786 FX_BOOL
GetLine(CPVT_Line & line) const; | 786 FX_BOOL
GetLine(CPVT_Line & line) const; |
787 FX_BOOL
GetSection(CPVT_Section & section) const; | 787 FX_BOOL
GetSection(CPVT_Section & section) const; |
788 » void» » » » » » » » »
SetAt(FX_INT32 nWordIndex); | 788 » void» » » » » » » » »
SetAt(int32_t nWordIndex); |
789 void
SetAt(const CPVT_WordPlace & place); | 789 void
SetAt(const CPVT_WordPlace & place); |
790 const CPVT_WordPlace & GetAt() const; | 790 const CPVT_WordPlace & GetAt() const; |
791 IFX_Edit*
GetEdit() const; | 791 IFX_Edit*
GetEdit() const; |
792 | 792 |
793 private: | 793 private: |
794 CFX_Edit *
m_pEdit; | 794 CFX_Edit *
m_pEdit; |
795 IPDF_VariableText_Iterator* m_pVTIterator; | 795 IPDF_VariableText_Iterator* m_pVTIterator; |
796 }; | 796 }; |
797 | 797 |
798 class CFX_Edit_Provider : public IPDF_VariableText_Provider | 798 class CFX_Edit_Provider : public IPDF_VariableText_Provider |
799 { | 799 { |
800 public: | 800 public: |
801 CFX_Edit_Provider(IFX_Edit_FontMap* pFontMap); | 801 CFX_Edit_Provider(IFX_Edit_FontMap* pFontMap); |
802 virtual ~CFX_Edit_Provider(); | 802 virtual ~CFX_Edit_Provider(); |
803 | 803 |
804 IFX_Edit_FontMap* GetFontMap(); | 804 IFX_Edit_FontMap* GetFontMap(); |
805 | 805 |
806 » FX_INT32» » » » » GetCharWidth(FX_INT32 nF
ontIndex, FX_WORD word, FX_INT32 nWordStyle); | 806 » int32_t»» » » » GetCharWidth(int32_t nFontIndex,
FX_WORD word, int32_t nWordStyle); |
807 » FX_INT32» » » » » GetTypeAscent(FX_INT32 n
FontIndex); | 807 » int32_t»» » » » GetTypeAscent(int32_t nFontIndex
); |
808 » FX_INT32» » » » » GetTypeDescent(FX_INT32
nFontIndex); | 808 » int32_t»» » » » GetTypeDescent(int32_t nFontInde
x); |
809 » FX_INT32» » » » » GetWordFontIndex(FX_WORD
word, FX_INT32 charset, FX_INT32 nFontIndex); | 809 » int32_t»» » » » GetWordFontIndex(FX_WORD word, i
nt32_t charset, int32_t nFontIndex); |
810 » FX_INT32» » » » » GetDefaultFontIndex(); | 810 » int32_t»» » » » GetDefaultFontIndex(); |
811 FX_BOOL IsLatinWord(FX_WORD word
); | 811 FX_BOOL IsLatinWord(FX_WORD word
); |
812 | 812 |
813 private: | 813 private: |
814 IFX_Edit_FontMap* m_pFontMap; | 814 IFX_Edit_FontMap* m_pFontMap; |
815 }; | 815 }; |
816 | 816 |
817 #endif // FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_ | 817 #endif // FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_ |
OLD | NEW |