OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/include/cpdfsdk_widget.h" | 7 #include "fpdfsdk/include/cpdfsdk_widget.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1968 int32_t CPDFSDK_Widget::GetAppearanceAge() const { | 1968 int32_t CPDFSDK_Widget::GetAppearanceAge() const { |
1969 return m_nAppAge; | 1969 return m_nAppAge; |
1970 } | 1970 } |
1971 | 1971 |
1972 int32_t CPDFSDK_Widget::GetValueAge() const { | 1972 int32_t CPDFSDK_Widget::GetValueAge() const { |
1973 return m_nValueAge; | 1973 return m_nValueAge; |
1974 } | 1974 } |
1975 | 1975 |
1976 FX_BOOL CPDFSDK_Widget::HitTest(FX_FLOAT pageX, FX_FLOAT pageY) { | 1976 FX_BOOL CPDFSDK_Widget::HitTest(FX_FLOAT pageX, FX_FLOAT pageY) { |
1977 CPDF_Annot* pAnnot = GetPDFAnnot(); | 1977 CPDF_Annot* pAnnot = GetPDFAnnot(); |
1978 CFX_FloatRect annotRect; | 1978 CFX_FloatRect annotRect = pAnnot->GetRect(); |
1979 pAnnot->GetRect(annotRect); | |
1980 if (!annotRect.Contains(pageX, pageY)) | 1979 if (!annotRect.Contains(pageX, pageY)) |
1981 return FALSE; | 1980 return FALSE; |
1982 | 1981 |
1983 if (!IsVisible()) | 1982 if (!IsVisible()) |
1984 return FALSE; | 1983 return FALSE; |
1985 | 1984 |
1986 if ((GetFieldFlags() & FIELDFLAG_READONLY) == FIELDFLAG_READONLY) | 1985 if ((GetFieldFlags() & FIELDFLAG_READONLY) == FIELDFLAG_READONLY) |
1987 return FALSE; | 1986 return FALSE; |
1988 | 1987 |
1989 return TRUE; | 1988 return TRUE; |
1990 } | 1989 } |
OLD | NEW |