| 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 "xfa/fwl/basewidget/fwl_editimp.h" | 7 #include "xfa/fwl/basewidget/fwl_editimp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 if (m_rtClient.IsEmpty()) { | 315 if (m_rtClient.IsEmpty()) { |
| 316 return FWL_ERR_Indefinite; | 316 return FWL_ERR_Indefinite; |
| 317 } | 317 } |
| 318 UpdateEditEngine(); | 318 UpdateEditEngine(); |
| 319 UpdateVAlignment(); | 319 UpdateVAlignment(); |
| 320 UpdateScroll(); | 320 UpdateScroll(); |
| 321 InitCaret(); | 321 InitCaret(); |
| 322 return FWL_ERR_Succeeded; | 322 return FWL_ERR_Succeeded; |
| 323 } | 323 } |
| 324 | 324 |
| 325 uint32_t CFWL_EditImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { | 325 FWL_WidgetHit CFWL_EditImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { |
| 326 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_OuterScrollbar) { | 326 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_OuterScrollbar) { |
| 327 if (IsShowScrollBar(TRUE)) { | 327 if (IsShowScrollBar(TRUE)) { |
| 328 CFX_RectF rect; | 328 CFX_RectF rect; |
| 329 m_pVertScrollBar->GetWidgetRect(rect); | 329 m_pVertScrollBar->GetWidgetRect(rect); |
| 330 if (rect.Contains(fx, fy)) | 330 if (rect.Contains(fx, fy)) |
| 331 return FWL_WGTHITTEST_VScrollBar; | 331 return FWL_WidgetHit::VScrollBar; |
| 332 } | 332 } |
| 333 if (IsShowScrollBar(FALSE)) { | 333 if (IsShowScrollBar(FALSE)) { |
| 334 CFX_RectF rect; | 334 CFX_RectF rect; |
| 335 m_pHorzScrollBar->GetWidgetRect(rect); | 335 m_pHorzScrollBar->GetWidgetRect(rect); |
| 336 if (rect.Contains(fx, fy)) | 336 if (rect.Contains(fx, fy)) |
| 337 return FWL_WGTHITTEST_HScrollBar; | 337 return FWL_WidgetHit::HScrollBar; |
| 338 } | 338 } |
| 339 } | 339 } |
| 340 if (m_rtClient.Contains(fx, fy)) | 340 if (m_rtClient.Contains(fx, fy)) |
| 341 return FWL_WGTHITTEST_Edit; | 341 return FWL_WidgetHit::Edit; |
| 342 return FWL_WGTHITTEST_Unknown; | 342 return FWL_WidgetHit::Unknown; |
| 343 } | 343 } |
| 344 | 344 |
| 345 void CFWL_EditImp::AddSpellCheckObj(CFX_Path& PathData, | 345 void CFWL_EditImp::AddSpellCheckObj(CFX_Path& PathData, |
| 346 int32_t nStart, | 346 int32_t nStart, |
| 347 int32_t nCount, | 347 int32_t nCount, |
| 348 FX_FLOAT fOffSetX, | 348 FX_FLOAT fOffSetX, |
| 349 FX_FLOAT fOffSetY) { | 349 FX_FLOAT fOffSetY) { |
| 350 FX_FLOAT fStartX = 0.0f; | 350 FX_FLOAT fStartX = 0.0f; |
| 351 FX_FLOAT fEndX = 0.0f; | 351 FX_FLOAT fEndX = 0.0f; |
| 352 FX_FLOAT fY = 0.0f; | 352 FX_FLOAT fY = 0.0f; |
| (...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 } | 2153 } |
| 2154 CFX_RectF rect; | 2154 CFX_RectF rect; |
| 2155 m_pOwner->GetWidgetRect(rect); | 2155 m_pOwner->GetWidgetRect(rect); |
| 2156 CFX_RectF rtInvalidate; | 2156 CFX_RectF rtInvalidate; |
| 2157 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); | 2157 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); |
| 2158 m_pOwner->Repaint(&rtInvalidate); | 2158 m_pOwner->Repaint(&rtInvalidate); |
| 2159 } | 2159 } |
| 2160 return TRUE; | 2160 return TRUE; |
| 2161 } | 2161 } |
| 2162 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} | 2162 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} |
| OLD | NEW |