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_ffimageedit.h" | 7 #include "xfa/fxfa/app/xfa_ffimageedit.h" |
8 | 8 |
9 #include "xfa/fwl/core/cfwl_app.h" | 9 #include "xfa/fwl/core/cfwl_app.h" |
10 #include "xfa/fwl/core/cfwl_msgmouse.h" | 10 #include "xfa/fwl/core/cfwl_msgmouse.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags, | 86 bool CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags, |
87 FX_FLOAT fx, | 87 FX_FLOAT fx, |
88 FX_FLOAT fy) { | 88 FX_FLOAT fy) { |
89 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) | 89 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) |
90 return false; | 90 return false; |
91 | 91 |
92 if (!PtInActiveRect(fx, fy)) | 92 if (!PtInActiveRect(fx, fy)) |
93 return false; | 93 return false; |
94 | 94 |
95 SetButtonDown(true); | 95 SetButtonDown(true); |
96 CFWL_MsgMouse ms; | 96 |
| 97 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); |
97 ms.m_dwCmd = FWL_MouseCommand::LeftButtonDown; | 98 ms.m_dwCmd = FWL_MouseCommand::LeftButtonDown; |
98 ms.m_dwFlags = dwFlags; | 99 ms.m_dwFlags = dwFlags; |
99 ms.m_fx = fx; | 100 ms.m_fx = fx; |
100 ms.m_fy = fy; | 101 ms.m_fy = fy; |
101 ms.m_pDstTarget = m_pNormalWidget; | |
102 FWLToClient(ms.m_fx, ms.m_fy); | 102 FWLToClient(ms.m_fx, ms.m_fy); |
103 TranslateFWLMessage(&ms); | 103 TranslateFWLMessage(&ms); |
104 return true; | 104 return true; |
105 } | 105 } |
106 | 106 |
107 void CXFA_FFImageEdit::SetFWLRect() { | 107 void CXFA_FFImageEdit::SetFWLRect() { |
108 if (!m_pNormalWidget) { | 108 if (!m_pNormalWidget) { |
109 return; | 109 return; |
110 } | 110 } |
111 CFX_RectF rtUIMargin; | 111 CFX_RectF rtUIMargin; |
(...skipping 18 matching lines...) Expand all Loading... |
130 | 130 |
131 void CXFA_FFImageEdit::OnProcessEvent(CFWL_Event* pEvent) { | 131 void CXFA_FFImageEdit::OnProcessEvent(CFWL_Event* pEvent) { |
132 CXFA_FFField::OnProcessEvent(pEvent); | 132 CXFA_FFField::OnProcessEvent(pEvent); |
133 m_pOldDelegate->OnProcessEvent(pEvent); | 133 m_pOldDelegate->OnProcessEvent(pEvent); |
134 } | 134 } |
135 | 135 |
136 void CXFA_FFImageEdit::OnDrawWidget(CFX_Graphics* pGraphics, | 136 void CXFA_FFImageEdit::OnDrawWidget(CFX_Graphics* pGraphics, |
137 const CFX_Matrix* pMatrix) { | 137 const CFX_Matrix* pMatrix) { |
138 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); | 138 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); |
139 } | 139 } |
OLD | NEW |