| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 CFX_FloatPoint point2(1, 1); | 53 CFX_FloatPoint point2(1, 1); |
| 54 | 54 |
| 55 mt.Transform(point1.x, point1.y); | 55 mt.Transform(point1.x, point1.y); |
| 56 mt.Transform(point2.x, point2.y); | 56 mt.Transform(point2.x, point2.y); |
| 57 | 57 |
| 58 return point2.y == point1.y; | 58 return point2.y == point1.y; |
| 59 } | 59 } |
| 60 | 60 |
| 61 void CPWL_EditCtrl::SetCursor() { | 61 void CPWL_EditCtrl::SetCursor() { |
| 62 if (IsValid()) { | 62 if (IsValid()) { |
| 63 if (IFX_SystemHandler* pSH = GetSystemHandler()) { | 63 if (CFX_SystemHandler* pSH = GetSystemHandler()) { |
| 64 if (IsWndHorV()) | 64 if (IsWndHorV()) |
| 65 pSH->SetCursor(FXCT_VBEAM); | 65 pSH->SetCursor(FXCT_VBEAM); |
| 66 else | 66 else |
| 67 pSH->SetCursor(FXCT_HBEAM); | 67 pSH->SetCursor(FXCT_HBEAM); |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 void CPWL_EditCtrl::RePosChildWnd() { | 72 void CPWL_EditCtrl::RePosChildWnd() { |
| 73 m_pEdit->SetPlateRect(GetClientRect()); | 73 m_pEdit->SetPlateRect(GetClientRect()); |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEndChar); | 622 CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEndChar); |
| 623 return m_pEdit->GetRangeText(CPVT_WordRange(wpStart, wpEnd)); | 623 return m_pEdit->GetRangeText(CPVT_WordRange(wpStart, wpEnd)); |
| 624 } | 624 } |
| 625 | 625 |
| 626 void CPWL_EditCtrl::SetReadyToInput() { | 626 void CPWL_EditCtrl::SetReadyToInput() { |
| 627 if (m_bMouseDown) { | 627 if (m_bMouseDown) { |
| 628 ReleaseCapture(); | 628 ReleaseCapture(); |
| 629 m_bMouseDown = FALSE; | 629 m_bMouseDown = FALSE; |
| 630 } | 630 } |
| 631 } | 631 } |
| OLD | NEW |