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 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" | 7 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" |
8 | 8 |
9 #include "core/fpdfdoc/include/cpvt_section.h" | 9 #include "core/fpdfdoc/include/cpvt_section.h" |
10 #include "core/fpdfdoc/include/cpvt_word.h" | 10 #include "core/fpdfdoc/include/cpvt_word.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 void CPWL_EditCtrl::CopyText() {} | 476 void CPWL_EditCtrl::CopyText() {} |
477 | 477 |
478 void CPWL_EditCtrl::PasteText() {} | 478 void CPWL_EditCtrl::PasteText() {} |
479 | 479 |
480 void CPWL_EditCtrl::CutText() {} | 480 void CPWL_EditCtrl::CutText() {} |
481 | 481 |
482 void CPWL_EditCtrl::ShowVScrollBar(FX_BOOL bShow) {} | 482 void CPWL_EditCtrl::ShowVScrollBar(FX_BOOL bShow) {} |
483 | 483 |
484 void CPWL_EditCtrl::InsertText(const FX_WCHAR* csText) { | 484 void CPWL_EditCtrl::InsertText(const FX_WCHAR* csText) { |
485 if (!IsReadOnly()) | 485 if (!IsReadOnly()) |
486 m_pEdit->InsertText(csText); | 486 m_pEdit->InsertText(csText, DEFAULT_CHARSET); |
487 } | 487 } |
488 | 488 |
489 void CPWL_EditCtrl::InsertWord(uint16_t word, int32_t nCharset) { | 489 void CPWL_EditCtrl::InsertWord(uint16_t word, int32_t nCharset) { |
490 if (!IsReadOnly()) | 490 if (!IsReadOnly()) |
491 m_pEdit->InsertWord(word, nCharset); | 491 m_pEdit->InsertWord(word, nCharset); |
492 } | 492 } |
493 | 493 |
494 void CPWL_EditCtrl::InsertReturn() { | 494 void CPWL_EditCtrl::InsertReturn() { |
495 if (!IsReadOnly()) | 495 if (!IsReadOnly()) |
496 m_pEdit->InsertReturn(); | 496 m_pEdit->InsertReturn(); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEndChar); | 592 CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEndChar); |
593 return m_pEdit->GetRangeText(CPVT_WordRange(wpStart, wpEnd)); | 593 return m_pEdit->GetRangeText(CPVT_WordRange(wpStart, wpEnd)); |
594 } | 594 } |
595 | 595 |
596 void CPWL_EditCtrl::SetReadyToInput() { | 596 void CPWL_EditCtrl::SetReadyToInput() { |
597 if (m_bMouseDown) { | 597 if (m_bMouseDown) { |
598 ReleaseCapture(); | 598 ReleaseCapture(); |
599 m_bMouseDown = FALSE; | 599 m_bMouseDown = FALSE; |
600 } | 600 } |
601 } | 601 } |
OLD | NEW |