| 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/core/ifwl_edit.h" | 7 #include "xfa/fwl/core/ifwl_edit.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1924 } | 1924 } |
| 1925 } | 1925 } |
| 1926 if (iError < 0) | 1926 if (iError < 0) |
| 1927 ProcessInsertError(iError); | 1927 ProcessInsertError(iError); |
| 1928 } | 1928 } |
| 1929 | 1929 |
| 1930 bool IFWL_Edit::OnScroll(IFWL_ScrollBar* pScrollBar, | 1930 bool IFWL_Edit::OnScroll(IFWL_ScrollBar* pScrollBar, |
| 1931 uint32_t dwCode, | 1931 uint32_t dwCode, |
| 1932 FX_FLOAT fPos) { | 1932 FX_FLOAT fPos) { |
| 1933 CFX_SizeF fs; | 1933 CFX_SizeF fs; |
| 1934 pScrollBar->GetRange(fs.x, fs.y); | 1934 pScrollBar->GetRange(&fs.x, &fs.y); |
| 1935 FX_FLOAT iCurPos = pScrollBar->GetPos(); | 1935 FX_FLOAT iCurPos = pScrollBar->GetPos(); |
| 1936 FX_FLOAT fStep = pScrollBar->GetStepSize(); | 1936 FX_FLOAT fStep = pScrollBar->GetStepSize(); |
| 1937 switch (dwCode) { | 1937 switch (dwCode) { |
| 1938 case FWL_SCBCODE_Min: { | 1938 case FWL_SCBCODE_Min: { |
| 1939 fPos = fs.x; | 1939 fPos = fs.x; |
| 1940 break; | 1940 break; |
| 1941 } | 1941 } |
| 1942 case FWL_SCBCODE_Max: { | 1942 case FWL_SCBCODE_Max: { |
| 1943 fPos = fs.y; | 1943 fPos = fs.y; |
| 1944 break; | 1944 break; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1987 UpdateCaret(); | 1987 UpdateCaret(); |
| 1988 } | 1988 } |
| 1989 CFX_RectF rect; | 1989 CFX_RectF rect; |
| 1990 GetWidgetRect(rect); | 1990 GetWidgetRect(rect); |
| 1991 CFX_RectF rtInvalidate; | 1991 CFX_RectF rtInvalidate; |
| 1992 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); | 1992 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); |
| 1993 Repaint(&rtInvalidate); | 1993 Repaint(&rtInvalidate); |
| 1994 } | 1994 } |
| 1995 return true; | 1995 return true; |
| 1996 } | 1996 } |
| OLD | NEW |