| 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_FX_EDIT_H_ | 7 #ifndef FPDFSDK_FXEDIT_INCLUDE_FX_EDIT_H_ |
| 8 #define FPDFSDK_FXEDIT_INCLUDE_FX_EDIT_H_ | 8 #define FPDFSDK_FXEDIT_INCLUDE_FX_EDIT_H_ |
| 9 | 9 |
| 10 #include "core/fpdfdoc/include/cpdf_variabletext.h" | 10 #include "core/fpdfdoc/include/cpdf_variabletext.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 359 |
| 360 // send the HOME key message to edit. | 360 // send the HOME key message to edit. |
| 361 virtual void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) = 0; | 361 virtual void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) = 0; |
| 362 | 362 |
| 363 // send the END key message to edit. | 363 // send the END key message to edit. |
| 364 virtual void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) = 0; | 364 virtual void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) = 0; |
| 365 | 365 |
| 366 // put text into edit. | 366 // put text into edit. |
| 367 virtual void SetText(const FX_WCHAR* text, | 367 virtual void SetText(const FX_WCHAR* text, |
| 368 int32_t charset = DEFAULT_CHARSET, | 368 int32_t charset = DEFAULT_CHARSET, |
| 369 const CPVT_SecProps* pSecProps = NULL, | 369 const CPVT_SecProps* pSecProps = nullptr, |
| 370 const CPVT_WordProps* pWordProps = NULL) = 0; | 370 const CPVT_WordProps* pWordProps = nullptr) = 0; |
| 371 | 371 |
| 372 // insert a word into the edit. | 372 // insert a word into the edit. |
| 373 virtual FX_BOOL InsertWord(uint16_t word, | 373 virtual FX_BOOL InsertWord(uint16_t word, |
| 374 int32_t charset = DEFAULT_CHARSET, | 374 int32_t charset = DEFAULT_CHARSET, |
| 375 const CPVT_WordProps* pWordProps = NULL) = 0; | 375 const CPVT_WordProps* pWordProps = nullptr) = 0; |
| 376 | 376 |
| 377 // insert a return into the edit. | 377 // insert a return into the edit. |
| 378 virtual FX_BOOL InsertReturn(const CPVT_SecProps* pSecProps = NULL, | 378 virtual FX_BOOL InsertReturn(const CPVT_SecProps* pSecProps = nullptr, |
| 379 const CPVT_WordProps* pWordProps = NULL) = 0; | 379 const CPVT_WordProps* pWordProps = nullptr) = 0; |
| 380 | 380 |
| 381 // insert text into the edit. | 381 // insert text into the edit. |
| 382 virtual FX_BOOL InsertText(const FX_WCHAR* text, | 382 virtual FX_BOOL InsertText(const FX_WCHAR* text, |
| 383 int32_t charset = DEFAULT_CHARSET, | 383 int32_t charset = DEFAULT_CHARSET, |
| 384 const CPVT_SecProps* pSecProps = NULL, | 384 const CPVT_SecProps* pSecProps = nullptr, |
| 385 const CPVT_WordProps* pWordProps = NULL) = 0; | 385 const CPVT_WordProps* pWordProps = nullptr) = 0; |
| 386 | 386 |
| 387 // do backspace operation. | 387 // do backspace operation. |
| 388 virtual FX_BOOL Backspace() = 0; | 388 virtual FX_BOOL Backspace() = 0; |
| 389 | 389 |
| 390 // do delete operation. | 390 // do delete operation. |
| 391 virtual FX_BOOL Delete() = 0; | 391 virtual FX_BOOL Delete() = 0; |
| 392 | 392 |
| 393 // delete the selected text. | 393 // delete the selected text. |
| 394 virtual FX_BOOL Clear() = 0; | 394 virtual FX_BOOL Clear() = 0; |
| 395 | 395 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 virtual FX_BOOL IsModified() const = 0; | 469 virtual FX_BOOL IsModified() const = 0; |
| 470 | 470 |
| 471 // get the total words in edit | 471 // get the total words in edit |
| 472 virtual int32_t GetTotalWords() const = 0; | 472 virtual int32_t GetTotalWords() const = 0; |
| 473 | 473 |
| 474 virtual void AddUndoItem(IFX_Edit_UndoItem* pUndoItem) = 0; | 474 virtual void AddUndoItem(IFX_Edit_UndoItem* pUndoItem) = 0; |
| 475 | 475 |
| 476 static CFX_ByteString GetEditAppearanceStream( | 476 static CFX_ByteString GetEditAppearanceStream( |
| 477 IFX_Edit* pEdit, | 477 IFX_Edit* pEdit, |
| 478 const CFX_FloatPoint& ptOffset, | 478 const CFX_FloatPoint& ptOffset, |
| 479 const CPVT_WordRange* pRange = NULL, | 479 const CPVT_WordRange* pRange = nullptr, |
| 480 FX_BOOL bContinuous = TRUE, | 480 FX_BOOL bContinuous = TRUE, |
| 481 uint16_t SubWord = 0); | 481 uint16_t SubWord = 0); |
| 482 static CFX_ByteString GetSelectAppearanceStream( | 482 static CFX_ByteString GetSelectAppearanceStream( |
| 483 IFX_Edit* pEdit, | 483 IFX_Edit* pEdit, |
| 484 const CFX_FloatPoint& ptOffset, | 484 const CFX_FloatPoint& ptOffset, |
| 485 const CPVT_WordRange* pRange = NULL); | 485 const CPVT_WordRange* pRange = nullptr); |
| 486 static void DrawEdit(CFX_RenderDevice* pDevice, | 486 static void DrawEdit(CFX_RenderDevice* pDevice, |
| 487 CFX_Matrix* pUser2Device, | 487 CFX_Matrix* pUser2Device, |
| 488 IFX_Edit* pEdit, | 488 IFX_Edit* pEdit, |
| 489 FX_COLORREF crTextFill, | 489 FX_COLORREF crTextFill, |
| 490 FX_COLORREF crTextStroke, | 490 FX_COLORREF crTextStroke, |
| 491 const CFX_FloatRect& rcClip, | 491 const CFX_FloatRect& rcClip, |
| 492 const CFX_FloatPoint& ptOffset, | 492 const CFX_FloatPoint& ptOffset, |
| 493 const CPVT_WordRange* pRange, | 493 const CPVT_WordRange* pRange, |
| 494 CFX_SystemHandler* pSystemHandler, | 494 CFX_SystemHandler* pSystemHandler, |
| 495 void* pFFLData); | 495 void* pFFLData); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 protected: | 616 protected: |
| 617 virtual ~IFX_List() {} | 617 virtual ~IFX_List() {} |
| 618 }; | 618 }; |
| 619 | 619 |
| 620 CFX_ByteString GetPDFWordString(IPVT_FontMap* pFontMap, | 620 CFX_ByteString GetPDFWordString(IPVT_FontMap* pFontMap, |
| 621 int32_t nFontIndex, | 621 int32_t nFontIndex, |
| 622 uint16_t Word, | 622 uint16_t Word, |
| 623 uint16_t SubWord); | 623 uint16_t SubWord); |
| 624 | 624 |
| 625 #endif // FPDFSDK_FXEDIT_INCLUDE_FX_EDIT_H_ | 625 #endif // FPDFSDK_FXEDIT_INCLUDE_FX_EDIT_H_ |
| OLD | NEW |