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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 const CFX_FloatPoint& ptFoot, | 559 const CFX_FloatPoint& ptFoot, |
560 const CPVT_WordPlace& place) { | 560 const CPVT_WordPlace& place) { |
561 PWL_CARET_INFO cInfo; | 561 PWL_CARET_INFO cInfo; |
562 cInfo.bVisible = bVisible; | 562 cInfo.bVisible = bVisible; |
563 cInfo.ptHead = ptHead; | 563 cInfo.ptHead = ptHead; |
564 cInfo.ptFoot = ptFoot; | 564 cInfo.ptFoot = ptFoot; |
565 | 565 |
566 OnNotify(this, PNM_SETCARETINFO, (intptr_t)&cInfo, (intptr_t) nullptr); | 566 OnNotify(this, PNM_SETCARETINFO, (intptr_t)&cInfo, (intptr_t) nullptr); |
567 } | 567 } |
568 | 568 |
569 void CPWL_EditCtrl::IOnCaretChange(const CPVT_SecProps& secProps, | |
570 const CPVT_WordProps& wordProps) {} | |
571 | |
572 void CPWL_EditCtrl::IOnContentChange(const CFX_FloatRect& rcContent) { | 569 void CPWL_EditCtrl::IOnContentChange(const CFX_FloatRect& rcContent) { |
573 if (IsValid()) { | 570 if (IsValid()) { |
574 if (m_pEditNotify) { | 571 if (m_pEditNotify) { |
575 m_pEditNotify->OnContentChange(rcContent); | 572 m_pEditNotify->OnContentChange(rcContent); |
576 } | 573 } |
577 } | 574 } |
578 } | 575 } |
579 | 576 |
580 void CPWL_EditCtrl::IOnInvalidateRect(CFX_FloatRect* pRect) { | 577 void CPWL_EditCtrl::IOnInvalidateRect(CFX_FloatRect* pRect) { |
581 InvalidateRect(pRect); | 578 InvalidateRect(pRect); |
(...skipping 18 matching lines...) Expand all Loading... |
600 CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEndChar); | 597 CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEndChar); |
601 return m_pEdit->GetRangeText(CPVT_WordRange(wpStart, wpEnd)); | 598 return m_pEdit->GetRangeText(CPVT_WordRange(wpStart, wpEnd)); |
602 } | 599 } |
603 | 600 |
604 void CPWL_EditCtrl::SetReadyToInput() { | 601 void CPWL_EditCtrl::SetReadyToInput() { |
605 if (m_bMouseDown) { | 602 if (m_bMouseDown) { |
606 ReleaseCapture(); | 603 ReleaseCapture(); |
607 m_bMouseDown = FALSE; | 604 m_bMouseDown = FALSE; |
608 } | 605 } |
609 } | 606 } |
OLD | NEW |