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/include/xfa_ffwidgethandler.h" | 7 #include "xfa/fxfa/include/xfa_ffwidgethandler.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 } | 153 } |
154 | 154 |
155 FX_BOOL CXFA_FFWidgetHandler::OnChar(CXFA_FFWidget* hWidget, | 155 FX_BOOL CXFA_FFWidgetHandler::OnChar(CXFA_FFWidget* hWidget, |
156 uint32_t dwChar, | 156 uint32_t dwChar, |
157 uint32_t dwFlags) { | 157 uint32_t dwFlags) { |
158 FX_BOOL bRet = hWidget->OnChar(dwChar, dwFlags); | 158 FX_BOOL bRet = hWidget->OnChar(dwChar, dwFlags); |
159 m_pDocView->RunInvalidate(); | 159 m_pDocView->RunInvalidate(); |
160 return bRet; | 160 return bRet; |
161 } | 161 } |
162 | 162 |
163 uint32_t CXFA_FFWidgetHandler::OnHitTest(CXFA_FFWidget* hWidget, | 163 FWL_WidgetHit CXFA_FFWidgetHandler::OnHitTest(CXFA_FFWidget* hWidget, |
164 FX_FLOAT fx, | 164 FX_FLOAT fx, |
165 FX_FLOAT fy) { | 165 FX_FLOAT fy) { |
166 if (!(hWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) | 166 if (!(hWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) |
167 return FWL_WGTHITTEST_Unknown; | 167 return FWL_WidgetHit::Unknown; |
168 | 168 |
169 hWidget->Rotate2Normal(fx, fy); | 169 hWidget->Rotate2Normal(fx, fy); |
170 return hWidget->OnHitTest(fx, fy); | 170 return hWidget->OnHitTest(fx, fy); |
171 } | 171 } |
172 | 172 |
173 FX_BOOL CXFA_FFWidgetHandler::OnSetCursor(CXFA_FFWidget* hWidget, | 173 FX_BOOL CXFA_FFWidgetHandler::OnSetCursor(CXFA_FFWidget* hWidget, |
174 FX_FLOAT fx, | 174 FX_FLOAT fx, |
175 FX_FLOAT fy) { | 175 FX_FLOAT fy) { |
176 hWidget->Rotate2Normal(fx, fy); | 176 hWidget->Rotate2Normal(fx, fy); |
177 return hWidget->OnSetCursor(fx, fy); | 177 return hWidget->OnSetCursor(fx, fy); |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 } | 546 } |
547 | 547 |
548 CXFA_Document* CXFA_FFWidgetHandler::GetObjFactory() const { | 548 CXFA_Document* CXFA_FFWidgetHandler::GetObjFactory() const { |
549 return GetXFADoc()->GetParser()->GetFactory(); | 549 return GetXFADoc()->GetParser()->GetFactory(); |
550 } | 550 } |
551 | 551 |
552 CXFA_Document* CXFA_FFWidgetHandler::GetXFADoc() const { | 552 CXFA_Document* CXFA_FFWidgetHandler::GetXFADoc() const { |
553 return ((CXFA_FFDoc*)(m_pDocView->GetDoc()))->GetXFADoc(); | 553 return ((CXFA_FFDoc*)(m_pDocView->GetDoc()))->GetXFADoc(); |
554 } | 554 } |
555 | 555 |
OLD | NEW |