| 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent); | 463 FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent); |
| 464 FX_BOOL SetRichTextAlignment(int32_t nAlignment); | 464 FX_BOOL SetRichTextAlignment(int32_t nAlignment); |
| 465 void OnMouseDown(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl); | 465 void OnMouseDown(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl); |
| 466 void OnMouseMove(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl); | 466 void OnMouseMove(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl); |
| 467 void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl); | 467 void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl); |
| 468 void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl); | 468 void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl); |
| 469 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl); | 469 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl); |
| 470 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl); | 470 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl); |
| 471 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl); | 471 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl); |
| 472 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl); | 472 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl); |
| 473 void SetText(const FX_WCHAR* text); | 473 void SetText(const CFX_WideString& sText); |
| 474 FX_BOOL InsertWord(uint16_t word, int32_t charset); | 474 FX_BOOL InsertWord(uint16_t word, int32_t charset); |
| 475 FX_BOOL InsertReturn(); | 475 FX_BOOL InsertReturn(); |
| 476 FX_BOOL Backspace(); | 476 FX_BOOL Backspace(); |
| 477 FX_BOOL Delete(); | 477 FX_BOOL Delete(); |
| 478 FX_BOOL Clear(); | 478 FX_BOOL Clear(); |
| 479 FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset); | 479 FX_BOOL InsertText(const CFX_WideString& sText, int32_t charset); |
| 480 FX_BOOL Redo(); | 480 FX_BOOL Redo(); |
| 481 FX_BOOL Undo(); | 481 FX_BOOL Undo(); |
| 482 int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const; | 482 int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const; |
| 483 CPVT_WordPlace WordIndexToWordPlace(int32_t index) const; | 483 CPVT_WordPlace WordIndexToWordPlace(int32_t index) const; |
| 484 CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace& place) const; | 484 CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace& place) const; |
| 485 CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace& place) const; | 485 CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace& place) const; |
| 486 CPVT_WordPlace GetSectionBeginPlace(const CPVT_WordPlace& place) const; | 486 CPVT_WordPlace GetSectionBeginPlace(const CPVT_WordPlace& place) const; |
| 487 CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace& place) const; | 487 CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace& place) const; |
| 488 CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const; | 488 CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const; |
| 489 int32_t GetCaret() const; | 489 int32_t GetCaret() const; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 518 FX_BOOL IsTextOverflow() const; | 518 FX_BOOL IsTextOverflow() const; |
| 519 FX_BOOL CanUndo() const; | 519 FX_BOOL CanUndo() const; |
| 520 FX_BOOL CanRedo() const; | 520 FX_BOOL CanRedo() const; |
| 521 FX_BOOL IsModified() const; | 521 FX_BOOL IsModified() const; |
| 522 CPVT_WordRange GetVisibleWordRange() const; | 522 CPVT_WordRange GetVisibleWordRange() const; |
| 523 void AddUndoItem(IFX_Edit_UndoItem* pUndoItem); | 523 void AddUndoItem(IFX_Edit_UndoItem* pUndoItem); |
| 524 | 524 |
| 525 FX_BOOL Empty(); | 525 FX_BOOL Empty(); |
| 526 | 526 |
| 527 CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, | 527 CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, |
| 528 const FX_WCHAR* text, | 528 const CFX_WideString& sText, |
| 529 int32_t charset); | 529 int32_t charset); |
| 530 int32_t GetCharSetFromUnicode(uint16_t word, int32_t nOldCharset); | 530 int32_t GetCharSetFromUnicode(uint16_t word, int32_t nOldCharset); |
| 531 | 531 |
| 532 int32_t GetTotalLines() const; | 532 int32_t GetTotalLines() const; |
| 533 | 533 |
| 534 private: | 534 private: |
| 535 friend class CFX_Edit_Iterator; | 535 friend class CFX_Edit_Iterator; |
| 536 friend class CFXEU_InsertWord; | 536 friend class CFXEU_InsertWord; |
| 537 friend class CFXEU_InsertReturn; | 537 friend class CFXEU_InsertReturn; |
| 538 friend class CFXEU_Backspace; | 538 friend class CFXEU_Backspace; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 556 const CPVT_WordProps* pWordProps, | 556 const CPVT_WordProps* pWordProps, |
| 557 FX_BOOL bAddUndo, | 557 FX_BOOL bAddUndo, |
| 558 FX_BOOL bPaint); | 558 FX_BOOL bPaint); |
| 559 FX_BOOL InsertReturn(const CPVT_SecProps* pSecProps, | 559 FX_BOOL InsertReturn(const CPVT_SecProps* pSecProps, |
| 560 const CPVT_WordProps* pWordProps, | 560 const CPVT_WordProps* pWordProps, |
| 561 FX_BOOL bAddUndo, | 561 FX_BOOL bAddUndo, |
| 562 FX_BOOL bPaint); | 562 FX_BOOL bPaint); |
| 563 FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint); | 563 FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint); |
| 564 FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint); | 564 FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint); |
| 565 FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint); | 565 FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint); |
| 566 FX_BOOL InsertText(const FX_WCHAR* text, | 566 FX_BOOL InsertText(const CFX_WideString& sText, |
| 567 int32_t charset, | 567 int32_t charset, |
| 568 FX_BOOL bAddUndo, | 568 FX_BOOL bAddUndo, |
| 569 FX_BOOL bPaint); | 569 FX_BOOL bPaint); |
| 570 void PaintInsertText(const CPVT_WordPlace& wpOld, | 570 void PaintInsertText(const CPVT_WordPlace& wpOld, |
| 571 const CPVT_WordPlace& wpNew); | 571 const CPVT_WordPlace& wpNew); |
| 572 | 572 |
| 573 inline CFX_FloatPoint VTToEdit(const CFX_FloatPoint& point) const; | 573 inline CFX_FloatPoint VTToEdit(const CFX_FloatPoint& point) const; |
| 574 inline CFX_FloatPoint EditToVT(const CFX_FloatPoint& point) const; | 574 inline CFX_FloatPoint EditToVT(const CFX_FloatPoint& point) const; |
| 575 inline CFX_FloatRect VTToEdit(const CFX_FloatRect& rect) const; | 575 inline CFX_FloatRect VTToEdit(const CFX_FloatRect& rect) const; |
| 576 inline CFX_FloatRect EditToVT(const CFX_FloatRect& rect) const; | 576 inline CFX_FloatRect EditToVT(const CFX_FloatRect& rect) const; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 int32_t charset, | 665 int32_t charset, |
| 666 int32_t nFontIndex) override; | 666 int32_t nFontIndex) override; |
| 667 int32_t GetDefaultFontIndex() override; | 667 int32_t GetDefaultFontIndex() override; |
| 668 FX_BOOL IsLatinWord(uint16_t word) override; | 668 FX_BOOL IsLatinWord(uint16_t word) override; |
| 669 | 669 |
| 670 private: | 670 private: |
| 671 IPVT_FontMap* m_pFontMap; | 671 IPVT_FontMap* m_pFontMap; |
| 672 }; | 672 }; |
| 673 | 673 |
| 674 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ | 674 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ |
| OLD | NEW |