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 | 7 |
8 #include "../../include/formfiller/FFL_FormFiller.h" | 8 #include "../../include/formfiller/FFL_FormFiller.h" |
9 #include "../../include/formfiller/FFL_Notify.h" | 9 #include "../../include/formfiller/FFL_Notify.h" |
10 #include "../../include/formfiller/FFL_CBA_Fontmap.h" | 10 #include "../../include/formfiller/FFL_CBA_Fontmap.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 { | 218 { |
219 if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE)) | 219 if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE)) |
220 { | 220 { |
221 pWnd->OnRButtonUp(WndtoPWL(pPageView, point),nFlags); | 221 pWnd->OnRButtonUp(WndtoPWL(pPageView, point),nFlags); |
222 return TRUE; | 222 return TRUE; |
223 } | 223 } |
224 | 224 |
225 return FALSE; | 225 return FALSE; |
226 } | 226 } |
227 | 227 |
228 FX_BOOL CFFL_FormFiller::OnRButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_An not* pAnnot, FX_UINT nFlags, const CPDF_Point& point) | |
Lei Zhang
2015/06/22 01:24:38
Only called from CFFL_IFormFiller::OnRButtonDblClk
| |
229 { | |
230 if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE)) | |
231 { | |
232 pWnd->OnRButtonDblClk(WndtoPWL(pPageView, point),nFlags); | |
233 return TRUE; | |
234 } | |
235 | |
236 return FALSE; | |
237 } | |
238 | |
239 FX_BOOL CFFL_FormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_U INT nFlags) | 228 FX_BOOL CFFL_FormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_U INT nFlags) |
240 { | 229 { |
241 if (IsValid()) | 230 if (IsValid()) |
242 { | 231 { |
243 CPDFSDK_PageView* pPageView = GetCurPageView(); | 232 CPDFSDK_PageView* pPageView = GetCurPageView(); |
244 ASSERT(pPageView != NULL); | 233 ASSERT(pPageView != NULL); |
245 | 234 |
246 if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE)) | 235 if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE)) |
247 { | 236 { |
248 return pWnd->OnKeyDown(nKeyCode,nFlags); | 237 return pWnd->OnKeyDown(nKeyCode,nFlags); |
(...skipping 12 matching lines...) Expand all Loading... | |
261 | 250 |
262 if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE)) | 251 if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE)) |
263 { | 252 { |
264 return pWnd->OnChar(nChar,nFlags); | 253 return pWnd->OnChar(nChar,nFlags); |
265 } | 254 } |
266 } | 255 } |
267 | 256 |
268 return FALSE; | 257 return FALSE; |
269 } | 258 } |
270 | 259 |
271 void CFFL_FormFiller::OnDeSelected(CPDFSDK_Annot* pAnnot) | |
272 { | |
273 ASSERT(FALSE); | |
274 } | |
275 | |
276 void CFFL_FormFiller::OnSelected(CPDFSDK_Annot* pAnnot) | |
277 { | |
278 ASSERT(FALSE); | |
279 } | |
280 | |
281 FX_BOOL CFFL_FormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) | 260 FX_BOOL CFFL_FormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) |
282 { | 261 { |
283 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 262 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
284 | 263 |
285 CPDF_Page * pPage = pWidget->GetPDFPage(); | 264 CPDF_Page * pPage = pWidget->GetPDFPage(); |
286 CPDFSDK_Document * pDoc = m_pApp->GetCurrentDoc(); | 265 CPDFSDK_Document * pDoc = m_pApp->GetCurrentDoc(); |
287 CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage); | 266 CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage); |
288 ASSERT(pPageView != NULL); | 267 ASSERT(pPageView != NULL); |
289 | 268 |
290 | |
291 | |
292 CPWL_Wnd * pWnd = NULL; | 269 CPWL_Wnd * pWnd = NULL; |
293 if ( (pWnd = GetPDFWindow(pPageView, TRUE))) | 270 if ( (pWnd = GetPDFWindow(pPageView, TRUE))) |
294 { | 271 { |
295 pWnd->SetFocus(); | 272 pWnd->SetFocus(); |
296 } | 273 } |
297 | 274 |
298 m_bValid = TRUE; | 275 m_bValid = TRUE; |
299 | |
300 | |
301 | |
302 | |
303 m_bValid = TRUE; | |
304 FX_RECT rcRect = GetViewBBox(pPageView,pAnnot); | 276 FX_RECT rcRect = GetViewBBox(pPageView,pAnnot); |
305 InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom); | 277 InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom); |
306 | 278 |
307 return TRUE; | 279 return TRUE; |
308 } | 280 } |
309 | 281 |
310 FX_BOOL CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) | 282 FX_BOOL CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) |
311 { | 283 { |
312 if (IsValid()) | 284 if (IsValid()) |
313 { | 285 { |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
890 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Norma l, NULL); | 862 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Norma l, NULL); |
891 } | 863 } |
892 | 864 |
893 | 865 |
894 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFS DK_Annot* pAnnot, | 866 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFS DK_Annot* pAnnot, |
895 CFX_RenderDevic e* pDevice, CPDF_Matrix* pUser2Device, | 867 CFX_RenderDevic e* pDevice, CPDF_Matrix* pUser2Device, |
896 /*const CRect& rcWindow, */FX_DWORD dwFlags) | 868 /*const CRect& rcWindow, */FX_DWORD dwFlags) |
897 { | 869 { |
898 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); | 870 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); |
899 } | 871 } |
OLD | NEW |