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/fxfa/app/xfa_ffsignature.h" | 7 #include "xfa/fxfa/app/xfa_ffsignature.h" |
8 | 8 |
9 #include "xfa/fxfa/app/xfa_fffield.h" | 9 #include "xfa/fxfa/app/xfa_fffield.h" |
10 #include "xfa/fxfa/include/xfa_ffdoc.h" | 10 #include "xfa/fxfa/include/xfa_ffdoc.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 FX_BOOL CXFA_FFSignature::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) { | 90 FX_BOOL CXFA_FFSignature::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) { |
91 return FALSE; | 91 return FALSE; |
92 } | 92 } |
93 FX_BOOL CXFA_FFSignature::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { | 93 FX_BOOL CXFA_FFSignature::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { |
94 return FALSE; | 94 return FALSE; |
95 } | 95 } |
96 FX_BOOL CXFA_FFSignature::OnChar(uint32_t dwChar, uint32_t dwFlags) { | 96 FX_BOOL CXFA_FFSignature::OnChar(uint32_t dwChar, uint32_t dwFlags) { |
97 return FALSE; | 97 return FALSE; |
98 } | 98 } |
99 uint32_t CXFA_FFSignature::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { | 99 FWL_WidgetHit CXFA_FFSignature::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { |
100 if (m_pNormalWidget) { | 100 if (m_pNormalWidget) { |
101 FX_FLOAT ffx = fx, ffy = fy; | 101 FX_FLOAT ffx = fx, ffy = fy; |
102 FWLToClient(ffx, ffy); | 102 FWLToClient(ffx, ffy); |
103 uint32_t dwWidgetHit = m_pNormalWidget->HitTest(ffx, ffy); | 103 if (m_pNormalWidget->HitTest(ffx, ffy) != FWL_WidgetHit::Unknown) |
104 if (dwWidgetHit != FWL_WGTHITTEST_Unknown) { | 104 return FWL_WidgetHit::Client; |
105 return FWL_WGTHITTEST_Client; | |
106 } | |
107 } | 105 } |
108 CFX_RectF rtBox; | 106 CFX_RectF rtBox; |
109 GetRectWithoutRotate(rtBox); | 107 GetRectWithoutRotate(rtBox); |
110 if (!rtBox.Contains(fx, fy)) { | 108 if (!rtBox.Contains(fx, fy)) |
111 return FWL_WGTHITTEST_Unknown; | 109 return FWL_WidgetHit::Unknown; |
112 } | 110 if (m_rtCaption.Contains(fx, fy)) |
113 if (m_rtCaption.Contains(fx, fy)) { | 111 return FWL_WidgetHit::Titlebar; |
114 return FWL_WGTHITTEST_Titlebar; | 112 return FWL_WidgetHit::Client; |
115 } | |
116 return FWL_WGTHITTEST_Client; | |
117 } | 113 } |
118 FX_BOOL CXFA_FFSignature::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) { | 114 FX_BOOL CXFA_FFSignature::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) { |
119 return FALSE; | 115 return FALSE; |
120 } | 116 } |
OLD | NEW |