| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 FWL_WidgetHit 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_WidgetHit::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); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void CXFA_FFWidgetHandler::RenderWidget(CXFA_FFWidget* hWidget, | 180 void CXFA_FFWidgetHandler::RenderWidget(CXFA_FFWidget* hWidget, |
| 181 CFX_Graphics* pGS, | 181 CFX_Graphics* pGS, |
| 182 CFX_Matrix* pMatrix, | 182 CFX_Matrix* pMatrix, |
| 183 FX_BOOL bHighlight) { | 183 FX_BOOL bHighlight) { |
| 184 hWidget->RenderWidget(pGS, pMatrix, | 184 hWidget->RenderWidget(pGS, pMatrix, |
| 185 bHighlight ? XFA_WIDGETSTATUS_Highlight : 0, 0); | 185 bHighlight ? XFA_WidgetStatus_Highlight : 0, 0); |
| 186 } | 186 } |
| 187 | 187 |
| 188 FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc, | 188 FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc, |
| 189 XFA_EVENTTYPE eEventType) { | 189 XFA_EVENTTYPE eEventType) { |
| 190 if (!pWidgetAcc || eEventType == XFA_EVENT_Unknown) | 190 if (!pWidgetAcc || eEventType == XFA_EVENT_Unknown) |
| 191 return FALSE; | 191 return FALSE; |
| 192 if (pWidgetAcc->GetClassID() == XFA_ELEMENT_Draw) | 192 if (pWidgetAcc->GetClassID() == XFA_ELEMENT_Draw) |
| 193 return FALSE; | 193 return FALSE; |
| 194 | 194 |
| 195 switch (eEventType) { | 195 switch (eEventType) { |
| (...skipping 350 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 |