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 <memory> | 10 #include <memory> |
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 if (m_iCurRecord == nCount - 1) { | 1473 if (m_iCurRecord == nCount - 1) { |
1474 if (nCount == m_iMaxRecord) { | 1474 if (nCount == m_iMaxRecord) { |
1475 m_RecordArr.RemoveAt(0); | 1475 m_RecordArr.RemoveAt(0); |
1476 m_iCurRecord--; | 1476 m_iCurRecord--; |
1477 } | 1477 } |
1478 } else { | 1478 } else { |
1479 for (int32_t i = nCount - 1; i > m_iCurRecord; i--) { | 1479 for (int32_t i = nCount - 1; i > m_iCurRecord; i--) { |
1480 m_RecordArr.RemoveAt(i); | 1480 m_RecordArr.RemoveAt(i); |
1481 } | 1481 } |
1482 } | 1482 } |
1483 m_RecordArr.Add(bsDoRecord); | 1483 m_RecordArr.Add(CFX_ByteString(bsDoRecord)); |
1484 return m_iCurRecord = m_RecordArr.GetSize() - 1; | 1484 return m_iCurRecord = m_RecordArr.GetSize() - 1; |
1485 } | 1485 } |
1486 void CFWL_EditImp::Layout() { | 1486 void CFWL_EditImp::Layout() { |
1487 GetClientRect(m_rtClient); | 1487 GetClientRect(m_rtClient); |
1488 m_rtEngine = m_rtClient; | 1488 m_rtEngine = m_rtClient; |
1489 FX_FLOAT* pfWidth = static_cast<FX_FLOAT*>( | 1489 FX_FLOAT* pfWidth = static_cast<FX_FLOAT*>( |
1490 GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth)); | 1490 GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth)); |
1491 if (!pfWidth) | 1491 if (!pfWidth) |
1492 return; | 1492 return; |
1493 FX_FLOAT fWidth = *pfWidth; | 1493 FX_FLOAT fWidth = *pfWidth; |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2190 } | 2190 } |
2191 CFX_RectF rect; | 2191 CFX_RectF rect; |
2192 m_pOwner->GetWidgetRect(rect); | 2192 m_pOwner->GetWidgetRect(rect); |
2193 CFX_RectF rtInvalidate; | 2193 CFX_RectF rtInvalidate; |
2194 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); | 2194 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); |
2195 m_pOwner->Repaint(&rtInvalidate); | 2195 m_pOwner->Repaint(&rtInvalidate); |
2196 } | 2196 } |
2197 return TRUE; | 2197 return TRUE; |
2198 } | 2198 } |
2199 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} | 2199 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} |
OLD | NEW |