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_FXEDIT_INCLUDE_FXET_EDIT_H_ | 7 #ifndef FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ |
8 #define FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ | 8 #define FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 12 matching lines...) Expand all Loading... |
23 class CFX_RenderDevice; | 23 class CFX_RenderDevice; |
24 class CFX_SystemHandler; | 24 class CFX_SystemHandler; |
25 class IFX_Edit_UndoItem; | 25 class IFX_Edit_UndoItem; |
26 | 26 |
27 #define FX_EDIT_IsFloatZero(f) (f < 0.0001 && f > -0.0001) | 27 #define FX_EDIT_IsFloatZero(f) (f < 0.0001 && f > -0.0001) |
28 #define FX_EDIT_IsFloatEqual(fa, fb) FX_EDIT_IsFloatZero(fa - fb) | 28 #define FX_EDIT_IsFloatEqual(fa, fb) FX_EDIT_IsFloatZero(fa - fb) |
29 #define FX_EDIT_IsFloatBigger(fa, fb) (fa > fb && !FX_EDIT_IsFloatEqual(fa, fb)) | 29 #define FX_EDIT_IsFloatBigger(fa, fb) (fa > fb && !FX_EDIT_IsFloatEqual(fa, fb)) |
30 #define FX_EDIT_IsFloatSmaller(fa, fb) \ | 30 #define FX_EDIT_IsFloatSmaller(fa, fb) \ |
31 (fa < fb && !FX_EDIT_IsFloatEqual(fa, fb)) | 31 (fa < fb && !FX_EDIT_IsFloatEqual(fa, fb)) |
32 | 32 |
33 enum REFRESH_PLAN_E { RP_ANALYSE, RP_NOANALYSE, RP_OPTIONAL }; | |
34 | |
35 enum EDIT_PROPS_E { | 33 enum EDIT_PROPS_E { |
36 EP_LINELEADING, | 34 EP_LINELEADING, |
37 EP_LINEINDENT, | 35 EP_LINEINDENT, |
38 EP_ALIGNMENT, | 36 EP_ALIGNMENT, |
39 EP_FONTINDEX, | 37 EP_FONTINDEX, |
40 EP_FONTSIZE, | 38 EP_FONTSIZE, |
41 EP_WORDCOLOR, | 39 EP_WORDCOLOR, |
42 EP_SCRIPTTYPE, | 40 EP_SCRIPTTYPE, |
43 EP_UNDERLINE, | 41 EP_UNDERLINE, |
44 EP_CROSSOUT, | 42 EP_CROSSOUT, |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 CPVT_WordRange m_wrSel; | 344 CPVT_WordRange m_wrSel; |
347 CFX_WideString m_swText; | 345 CFX_WideString m_swText; |
348 }; | 346 }; |
349 | 347 |
350 class CFXEU_InsertText : public CFX_Edit_UndoItem { | 348 class CFXEU_InsertText : public CFX_Edit_UndoItem { |
351 public: | 349 public: |
352 CFXEU_InsertText(CFX_Edit* pEdit, | 350 CFXEU_InsertText(CFX_Edit* pEdit, |
353 const CPVT_WordPlace& wpOldPlace, | 351 const CPVT_WordPlace& wpOldPlace, |
354 const CPVT_WordPlace& wpNewPlace, | 352 const CPVT_WordPlace& wpNewPlace, |
355 const CFX_WideString& swText, | 353 const CFX_WideString& swText, |
356 int32_t charset, | 354 int32_t charset); |
357 const CPVT_SecProps* pSecProps, | |
358 const CPVT_WordProps* pWordProps); | |
359 ~CFXEU_InsertText() override; | 355 ~CFXEU_InsertText() override; |
360 | 356 |
361 // CFX_Edit_UndoItem | 357 // CFX_Edit_UndoItem |
362 void Redo() override; | 358 void Redo() override; |
363 void Undo() override; | 359 void Undo() override; |
364 | 360 |
365 private: | 361 private: |
366 CFX_Edit* m_pEdit; | 362 CFX_Edit* m_pEdit; |
367 | 363 |
368 CPVT_WordPlace m_wpOld; | 364 CPVT_WordPlace m_wpOld; |
369 CPVT_WordPlace m_wpNew; | 365 CPVT_WordPlace m_wpNew; |
370 CFX_WideString m_swText; | 366 CFX_WideString m_swText; |
371 int32_t m_nCharset; | 367 int32_t m_nCharset; |
372 CPVT_SecProps m_SecProps; | |
373 CPVT_WordProps m_WordProps; | |
374 }; | 368 }; |
375 | 369 |
376 class CFX_Edit { | 370 class CFX_Edit { |
377 public: | 371 public: |
378 static CFX_ByteString GetEditAppearanceStream( | 372 static CFX_ByteString GetEditAppearanceStream(CFX_Edit* pEdit, |
379 CFX_Edit* pEdit, | 373 const CFX_FloatPoint& ptOffset, |
380 const CFX_FloatPoint& ptOffset, | 374 const CPVT_WordRange* pRange, |
381 const CPVT_WordRange* pRange = nullptr, | 375 FX_BOOL bContinuous, |
382 FX_BOOL bContinuous = TRUE, | 376 uint16_t SubWord); |
383 uint16_t SubWord = 0); | |
384 static CFX_ByteString GetSelectAppearanceStream( | 377 static CFX_ByteString GetSelectAppearanceStream( |
385 CFX_Edit* pEdit, | 378 CFX_Edit* pEdit, |
386 const CFX_FloatPoint& ptOffset, | 379 const CFX_FloatPoint& ptOffset, |
387 const CPVT_WordRange* pRange = nullptr); | 380 const CPVT_WordRange* pRange); |
388 static void DrawEdit(CFX_RenderDevice* pDevice, | 381 static void DrawEdit(CFX_RenderDevice* pDevice, |
389 CFX_Matrix* pUser2Device, | 382 CFX_Matrix* pUser2Device, |
390 CFX_Edit* pEdit, | 383 CFX_Edit* pEdit, |
391 FX_COLORREF crTextFill, | 384 FX_COLORREF crTextFill, |
392 FX_COLORREF crTextStroke, | 385 FX_COLORREF crTextStroke, |
393 const CFX_FloatRect& rcClip, | 386 const CFX_FloatRect& rcClip, |
394 const CFX_FloatPoint& ptOffset, | 387 const CFX_FloatPoint& ptOffset, |
395 const CPVT_WordRange* pRange, | 388 const CPVT_WordRange* pRange, |
396 CFX_SystemHandler* pSystemHandler, | 389 CFX_SystemHandler* pSystemHandler, |
397 void* pFFLData); | 390 void* pFFLData); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 void SetNotify(CPWL_EditCtrl* pNotify); | 427 void SetNotify(CPWL_EditCtrl* pNotify); |
435 void SetOprNotify(CPWL_Edit* pOprNotify); | 428 void SetOprNotify(CPWL_Edit* pOprNotify); |
436 | 429 |
437 // Returns an iterator for the contents. Should not be released. | 430 // Returns an iterator for the contents. Should not be released. |
438 CFX_Edit_Iterator* GetIterator(); | 431 CFX_Edit_Iterator* GetIterator(); |
439 CPDF_VariableText* GetVariableText(); | 432 CPDF_VariableText* GetVariableText(); |
440 IPVT_FontMap* GetFontMap(); | 433 IPVT_FontMap* GetFontMap(); |
441 void Initialize(); | 434 void Initialize(); |
442 | 435 |
443 // Set the bounding box of the text area. | 436 // Set the bounding box of the text area. |
444 void SetPlateRect(const CFX_FloatRect& rect, FX_BOOL bPaint = TRUE); | 437 void SetPlateRect(const CFX_FloatRect& rect); |
445 void SetScrollPos(const CFX_FloatPoint& point); | 438 void SetScrollPos(const CFX_FloatPoint& point); |
446 | 439 |
447 // Set the horizontal text alignment. (nFormat [0:left, 1:middle, 2:right]) | 440 // Set the horizontal text alignment. (nFormat [0:left, 1:middle, 2:right]) |
448 void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE); | 441 void SetAlignmentH(int32_t nFormat, FX_BOOL bPaint); |
449 // Set the vertical text alignment. (nFormat [0:left, 1:middle, 2:right]) | 442 // Set the vertical text alignment. (nFormat [0:left, 1:middle, 2:right]) |
450 void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE); | 443 void SetAlignmentV(int32_t nFormat, FX_BOOL bPaint); |
451 | 444 |
452 // Set the substitution character for hidden text. | 445 // Set the substitution character for hidden text. |
453 void SetPasswordChar(uint16_t wSubWord = '*', FX_BOOL bPaint = TRUE); | 446 void SetPasswordChar(uint16_t wSubWord, FX_BOOL bPaint); |
454 | 447 |
455 // Set the maximum number of words in the text. | 448 // Set the maximum number of words in the text. |
456 void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE); | 449 void SetLimitChar(int32_t nLimitChar); |
457 void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE); | 450 void SetCharArray(int32_t nCharArray); |
458 void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE); | 451 void SetCharSpace(FX_FLOAT fCharSpace); |
459 void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE); | 452 void SetMultiLine(FX_BOOL bMultiLine, FX_BOOL bPaint); |
460 void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); | 453 void SetAutoReturn(FX_BOOL bAuto, FX_BOOL bPaint); |
461 void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE); | 454 void SetAutoFontSize(FX_BOOL bAuto, FX_BOOL bPaint); |
462 void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); | 455 void SetAutoScroll(FX_BOOL bAuto, FX_BOOL bPaint); |
463 void SetAutoFontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); | 456 void SetFontSize(FX_FLOAT fFontSize); |
464 void SetAutoScroll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); | 457 void SetTextOverflow(FX_BOOL bAllowed, FX_BOOL bPaint); |
465 void SetFontSize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE); | |
466 void SetTextOverflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE); | |
467 FX_BOOL IsRichText() const; | 458 FX_BOOL IsRichText() const; |
468 void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE); | 459 void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE); |
469 FX_BOOL SetRichFontSize(FX_FLOAT fFontSize); | 460 FX_BOOL SetRichFontSize(FX_FLOAT fFontSize); |
470 FX_BOOL SetRichFontIndex(int32_t nFontIndex); | 461 FX_BOOL SetRichFontIndex(int32_t nFontIndex); |
471 FX_BOOL SetRichTextColor(FX_COLORREF dwColor); | 462 FX_BOOL SetRichTextColor(FX_COLORREF dwColor); |
472 FX_BOOL SetRichTextScript(CPDF_VariableText::ScriptType nScriptType); | 463 FX_BOOL SetRichTextScript(CPDF_VariableText::ScriptType nScriptType); |
473 FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE); | 464 FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE); |
474 FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE); | 465 FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE); |
475 FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE); | 466 FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE); |
476 FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE); | 467 FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE); |
477 FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace); | 468 FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace); |
478 FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100); | 469 FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100); |
479 FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading); | 470 FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading); |
480 FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent); | 471 FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent); |
481 FX_BOOL SetRichTextAlignment(int32_t nAlignment); | 472 FX_BOOL SetRichTextAlignment(int32_t nAlignment); |
482 void OnMouseDown(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl); | 473 void OnMouseDown(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl); |
483 void OnMouseMove(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl); | 474 void OnMouseMove(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl); |
484 void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl); | 475 void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl); |
485 void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl); | 476 void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl); |
486 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl); | 477 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl); |
487 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl); | 478 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl); |
488 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl); | 479 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl); |
489 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl); | 480 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl); |
490 void SetText(const FX_WCHAR* text, | 481 void SetText(const FX_WCHAR* text); |
491 int32_t charset = DEFAULT_CHARSET, | 482 FX_BOOL InsertWord(uint16_t word, int32_t charset); |
492 const CPVT_SecProps* pSecProps = nullptr, | 483 FX_BOOL InsertReturn(); |
493 const CPVT_WordProps* pWordProps = nullptr); | |
494 FX_BOOL InsertWord(uint16_t word, | |
495 int32_t charset = DEFAULT_CHARSET, | |
496 const CPVT_WordProps* pWordProps = nullptr); | |
497 FX_BOOL InsertReturn(const CPVT_SecProps* pSecProps = nullptr, | |
498 const CPVT_WordProps* pWordProps = nullptr); | |
499 FX_BOOL Backspace(); | 484 FX_BOOL Backspace(); |
500 FX_BOOL Delete(); | 485 FX_BOOL Delete(); |
501 FX_BOOL Clear(); | 486 FX_BOOL Clear(); |
502 FX_BOOL InsertText(const FX_WCHAR* text, | 487 FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset); |
503 int32_t charset = DEFAULT_CHARSET, | |
504 const CPVT_SecProps* pSecProps = nullptr, | |
505 const CPVT_WordProps* pWordProps = nullptr); | |
506 FX_BOOL Redo(); | 488 FX_BOOL Redo(); |
507 FX_BOOL Undo(); | 489 FX_BOOL Undo(); |
508 int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const; | 490 int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const; |
509 CPVT_WordPlace WordIndexToWordPlace(int32_t index) const; | 491 CPVT_WordPlace WordIndexToWordPlace(int32_t index) const; |
510 CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace& place) const; | 492 CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace& place) const; |
511 CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace& place) const; | 493 CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace& place) const; |
512 CPVT_WordPlace GetSectionBeginPlace(const CPVT_WordPlace& place) const; | 494 CPVT_WordPlace GetSectionBeginPlace(const CPVT_WordPlace& place) const; |
513 CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace& place) const; | 495 CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace& place) const; |
514 CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const; | 496 CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const; |
515 int32_t GetCaret() const; | 497 int32_t GetCaret() const; |
(...skipping 29 matching lines...) Expand all Loading... |
545 FX_BOOL CanUndo() const; | 527 FX_BOOL CanUndo() const; |
546 FX_BOOL CanRedo() const; | 528 FX_BOOL CanRedo() const; |
547 FX_BOOL IsModified() const; | 529 FX_BOOL IsModified() const; |
548 CPVT_WordRange GetVisibleWordRange() const; | 530 CPVT_WordRange GetVisibleWordRange() const; |
549 void AddUndoItem(IFX_Edit_UndoItem* pUndoItem); | 531 void AddUndoItem(IFX_Edit_UndoItem* pUndoItem); |
550 | 532 |
551 FX_BOOL Empty(); | 533 FX_BOOL Empty(); |
552 | 534 |
553 CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, | 535 CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, |
554 const FX_WCHAR* text, | 536 const FX_WCHAR* text, |
555 int32_t charset, | 537 int32_t charset); |
556 const CPVT_SecProps* pSecProps, | |
557 const CPVT_WordProps* pWordProps); | |
558 int32_t GetCharSetFromUnicode(uint16_t word, int32_t nOldCharset); | 538 int32_t GetCharSetFromUnicode(uint16_t word, int32_t nOldCharset); |
559 | 539 |
560 int32_t GetTotalLines() const; | 540 int32_t GetTotalLines() const; |
561 | 541 |
562 private: | 542 private: |
563 friend class CFX_Edit_Iterator; | 543 friend class CFX_Edit_Iterator; |
564 friend class CFXEU_InsertWord; | 544 friend class CFXEU_InsertWord; |
565 friend class CFXEU_InsertReturn; | 545 friend class CFXEU_InsertReturn; |
566 friend class CFXEU_Backspace; | 546 friend class CFXEU_Backspace; |
567 friend class CFXEU_Delete; | 547 friend class CFXEU_Delete; |
568 friend class CFXEU_Clear; | 548 friend class CFXEU_Clear; |
569 friend class CFXEU_InsertText; | 549 friend class CFXEU_InsertText; |
570 | 550 |
571 void SetSel(const CPVT_WordPlace& begin, const CPVT_WordPlace& end); | 551 void SetSel(const CPVT_WordPlace& begin, const CPVT_WordPlace& end); |
572 | 552 |
573 void RearrangeAll(); | 553 void RearrangeAll(); |
574 void RearrangePart(const CPVT_WordRange& range); | 554 void RearrangePart(const CPVT_WordRange& range); |
575 void ScrollToCaret(); | 555 void ScrollToCaret(); |
576 void SetScrollInfo(); | 556 void SetScrollInfo(); |
577 void SetScrollPosX(FX_FLOAT fx); | 557 void SetScrollPosX(FX_FLOAT fx); |
578 void SetScrollPosY(FX_FLOAT fy); | 558 void SetScrollPosY(FX_FLOAT fy); |
579 void SetScrollLimit(); | 559 void SetScrollLimit(); |
580 void SetContentChanged(); | 560 void SetContentChanged(); |
581 | 561 |
582 void SetText(const FX_WCHAR* text, | |
583 int32_t charset, | |
584 const CPVT_SecProps* pSecProps, | |
585 const CPVT_WordProps* pWordProps, | |
586 FX_BOOL bAddUndo, | |
587 FX_BOOL bPaint); | |
588 FX_BOOL InsertWord(uint16_t word, | 562 FX_BOOL InsertWord(uint16_t word, |
589 int32_t charset, | 563 int32_t charset, |
590 const CPVT_WordProps* pWordProps, | 564 const CPVT_WordProps* pWordProps, |
591 FX_BOOL bAddUndo, | 565 FX_BOOL bAddUndo, |
592 FX_BOOL bPaint); | 566 FX_BOOL bPaint); |
593 FX_BOOL InsertReturn(const CPVT_SecProps* pSecProps, | 567 FX_BOOL InsertReturn(const CPVT_SecProps* pSecProps, |
594 const CPVT_WordProps* pWordProps, | 568 const CPVT_WordProps* pWordProps, |
595 FX_BOOL bAddUndo, | 569 FX_BOOL bAddUndo, |
596 FX_BOOL bPaint); | 570 FX_BOOL bPaint); |
597 FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint); | 571 FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint); |
598 FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint); | 572 FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint); |
599 FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint); | 573 FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint); |
600 FX_BOOL InsertText(const FX_WCHAR* text, | 574 FX_BOOL InsertText(const FX_WCHAR* text, |
601 int32_t charset, | 575 int32_t charset, |
602 const CPVT_SecProps* pSecProps, | |
603 const CPVT_WordProps* pWordProps, | |
604 FX_BOOL bAddUndo, | 576 FX_BOOL bAddUndo, |
605 FX_BOOL bPaint); | 577 FX_BOOL bPaint); |
606 void PaintInsertText(const CPVT_WordPlace& wpOld, | 578 void PaintInsertText(const CPVT_WordPlace& wpOld, |
607 const CPVT_WordPlace& wpNew); | 579 const CPVT_WordPlace& wpNew); |
608 | 580 |
609 inline CFX_FloatPoint VTToEdit(const CFX_FloatPoint& point) const; | 581 inline CFX_FloatPoint VTToEdit(const CFX_FloatPoint& point) const; |
610 inline CFX_FloatPoint EditToVT(const CFX_FloatPoint& point) const; | 582 inline CFX_FloatPoint EditToVT(const CFX_FloatPoint& point) const; |
611 inline CFX_FloatRect VTToEdit(const CFX_FloatRect& rect) const; | 583 inline CFX_FloatRect VTToEdit(const CFX_FloatRect& rect) const; |
612 inline CFX_FloatRect EditToVT(const CFX_FloatRect& rect) const; | 584 inline CFX_FloatRect EditToVT(const CFX_FloatRect& rect) const; |
613 | 585 |
614 void Refresh(REFRESH_PLAN_E ePlan, | 586 void Refresh(); |
615 const CPVT_WordRange* pRange1 = nullptr, | |
616 const CPVT_WordRange* pRange2 = nullptr); | |
617 void RefreshPushLineRects(const CPVT_WordRange& wr); | 587 void RefreshPushLineRects(const CPVT_WordRange& wr); |
618 void RefreshPushRandomRects(const CPVT_WordRange& wr); | 588 void RefreshPushRandomRects(const CPVT_WordRange& wr); |
619 | 589 |
620 void SetCaret(const CPVT_WordPlace& place); | 590 void SetCaret(const CPVT_WordPlace& place); |
621 void SetCaretInfo(); | 591 void SetCaretInfo(); |
622 void SetCaretOrigin(); | 592 void SetCaretOrigin(); |
623 | 593 |
624 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const; | 594 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const; |
625 CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1, | 595 CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1, |
626 const CPVT_WordRange& wr2); | 596 const CPVT_WordRange& wr2); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 int32_t charset, | 673 int32_t charset, |
704 int32_t nFontIndex) override; | 674 int32_t nFontIndex) override; |
705 int32_t GetDefaultFontIndex() override; | 675 int32_t GetDefaultFontIndex() override; |
706 FX_BOOL IsLatinWord(uint16_t word) override; | 676 FX_BOOL IsLatinWord(uint16_t word) override; |
707 | 677 |
708 private: | 678 private: |
709 IPVT_FontMap* m_pFontMap; | 679 IPVT_FontMap* m_pFontMap; |
710 }; | 680 }; |
711 | 681 |
712 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ | 682 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ |
OLD | NEW |