| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 if (IsShowScrollBar(FALSE)) { | 289 if (IsShowScrollBar(FALSE)) { |
| 290 FX_FLOAT* pfWidth = static_cast<FX_FLOAT*>( | 290 FX_FLOAT* pfWidth = static_cast<FX_FLOAT*>( |
| 291 GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth)); | 291 GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth)); |
| 292 rect.height += *pfWidth; | 292 rect.height += *pfWidth; |
| 293 rect.height += kEditMargin; | 293 rect.height += kEditMargin; |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 } | 296 } |
| 297 return FWL_ERR_Succeeded; | 297 return FWL_ERR_Succeeded; |
| 298 } | 298 } |
| 299 FWL_ERR CFWL_EditImp::SetStates(uint32_t dwStates, FX_BOOL bSet) { | 299 |
| 300 void CFWL_EditImp::SetStates(uint32_t dwStates, FX_BOOL bSet) { |
| 300 if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Invisible) || | 301 if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Invisible) || |
| 301 (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)) { | 302 (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)) { |
| 302 ShowCaret(FALSE); | 303 ShowCaret(FALSE); |
| 303 } | 304 } |
| 304 return CFWL_WidgetImp::SetStates(dwStates, bSet); | 305 CFWL_WidgetImp::SetStates(dwStates, bSet); |
| 305 } | 306 } |
| 307 |
| 306 FWL_ERR CFWL_EditImp::SetWidgetRect(const CFX_RectF& rect) { | 308 FWL_ERR CFWL_EditImp::SetWidgetRect(const CFX_RectF& rect) { |
| 307 return CFWL_WidgetImp::SetWidgetRect(rect); | 309 return CFWL_WidgetImp::SetWidgetRect(rect); |
| 308 } | 310 } |
| 309 FWL_ERR CFWL_EditImp::Update() { | 311 FWL_ERR CFWL_EditImp::Update() { |
| 310 if (IsLocked()) { | 312 if (IsLocked()) { |
| 311 return FWL_ERR_Indefinite; | 313 return FWL_ERR_Indefinite; |
| 312 } | 314 } |
| 313 if (!m_pProperties->m_pThemeProvider) { | 315 if (!m_pProperties->m_pThemeProvider) { |
| 314 m_pProperties->m_pThemeProvider = GetAvailableTheme(); | 316 m_pProperties->m_pThemeProvider = GetAvailableTheme(); |
| 315 } | 317 } |
| (...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 } | 2155 } |
| 2154 CFX_RectF rect; | 2156 CFX_RectF rect; |
| 2155 m_pOwner->GetWidgetRect(rect); | 2157 m_pOwner->GetWidgetRect(rect); |
| 2156 CFX_RectF rtInvalidate; | 2158 CFX_RectF rtInvalidate; |
| 2157 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); | 2159 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); |
| 2158 m_pOwner->Repaint(&rtInvalidate); | 2160 m_pOwner->Repaint(&rtInvalidate); |
| 2159 } | 2161 } |
| 2160 return TRUE; | 2162 return TRUE; |
| 2161 } | 2163 } |
| 2162 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} | 2164 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} |
| OLD | NEW |