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_fffield.h" | 7 #include "xfa/fxfa/app/xfa_fffield.h" |
8 | 8 |
9 #include "xfa/fwl/basewidget/ifwl_edit.h" | 9 #include "xfa/fwl/basewidget/ifwl_edit.h" |
10 #include "xfa/fwl/core/cfwl_message.h" | 10 #include "xfa/fwl/core/cfwl_message.h" |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 rtUi.height = fFontSize; | 342 rtUi.height = fFontSize; |
343 } | 343 } |
344 } | 344 } |
345 m_pNormalWidget->SetWidgetRect(rtUi); | 345 m_pNormalWidget->SetWidgetRect(rtUi); |
346 } | 346 } |
347 FX_BOOL CXFA_FFField::OnMouseEnter() { | 347 FX_BOOL CXFA_FFField::OnMouseEnter() { |
348 if (!m_pNormalWidget) { | 348 if (!m_pNormalWidget) { |
349 return FALSE; | 349 return FALSE; |
350 } | 350 } |
351 CFWL_MsgMouse ms; | 351 CFWL_MsgMouse ms; |
352 ms.m_dwCmd = FWL_MSGMOUSECMD_MouseEnter; | 352 ms.m_dwCmd = FWL_MouseCommand::Enter; |
353 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 353 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
354 ms.m_pSrcTarget = NULL; | 354 ms.m_pSrcTarget = NULL; |
355 TranslateFWLMessage(&ms); | 355 TranslateFWLMessage(&ms); |
356 return TRUE; | 356 return TRUE; |
357 } | 357 } |
358 FX_BOOL CXFA_FFField::OnMouseExit() { | 358 FX_BOOL CXFA_FFField::OnMouseExit() { |
359 if (!m_pNormalWidget) { | 359 if (!m_pNormalWidget) { |
360 return FALSE; | 360 return FALSE; |
361 } | 361 } |
362 CFWL_MsgMouse ms; | 362 CFWL_MsgMouse ms; |
363 ms.m_dwCmd = FWL_MSGMOUSECMD_MouseLeave; | 363 ms.m_dwCmd = FWL_MouseCommand::Leave; |
364 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 364 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
365 TranslateFWLMessage(&ms); | 365 TranslateFWLMessage(&ms); |
366 return TRUE; | 366 return TRUE; |
367 } | 367 } |
368 void CXFA_FFField::FWLToClient(FX_FLOAT& fx, FX_FLOAT& fy) { | 368 void CXFA_FFField::FWLToClient(FX_FLOAT& fx, FX_FLOAT& fy) { |
369 if (!m_pNormalWidget) { | 369 if (!m_pNormalWidget) { |
370 return; | 370 return; |
371 } | 371 } |
372 CFX_RectF rtWidget; | 372 CFX_RectF rtWidget; |
373 m_pNormalWidget->GetWidgetRect(rtWidget); | 373 m_pNormalWidget->GetWidgetRect(rtWidget); |
374 fx -= rtWidget.left; | 374 fx -= rtWidget.left; |
375 fy -= rtWidget.top; | 375 fy -= rtWidget.top; |
376 } | 376 } |
377 FX_BOOL CXFA_FFField::OnLButtonDown(uint32_t dwFlags, | 377 FX_BOOL CXFA_FFField::OnLButtonDown(uint32_t dwFlags, |
378 FX_FLOAT fx, | 378 FX_FLOAT fx, |
379 FX_FLOAT fy) { | 379 FX_FLOAT fy) { |
380 if (!m_pNormalWidget) { | 380 if (!m_pNormalWidget) { |
381 return FALSE; | 381 return FALSE; |
382 } | 382 } |
383 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open || | 383 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open || |
384 !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 384 !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
385 return FALSE; | 385 return FALSE; |
386 } | 386 } |
387 if (!PtInActiveRect(fx, fy)) { | 387 if (!PtInActiveRect(fx, fy)) { |
388 return FALSE; | 388 return FALSE; |
389 } | 389 } |
390 SetButtonDown(TRUE); | 390 SetButtonDown(TRUE); |
391 CFWL_MsgMouse ms; | 391 CFWL_MsgMouse ms; |
392 ms.m_dwCmd = FWL_MSGMOUSECMD_LButtonDown; | 392 ms.m_dwCmd = FWL_MouseCommand::LeftButtonDown; |
393 ms.m_dwFlags = dwFlags; | 393 ms.m_dwFlags = dwFlags; |
394 ms.m_fx = fx; | 394 ms.m_fx = fx; |
395 ms.m_fy = fy; | 395 ms.m_fy = fy; |
396 FWLToClient(ms.m_fx, ms.m_fy); | 396 FWLToClient(ms.m_fx, ms.m_fy); |
397 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 397 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
398 TranslateFWLMessage(&ms); | 398 TranslateFWLMessage(&ms); |
399 return TRUE; | 399 return TRUE; |
400 } | 400 } |
401 FX_BOOL CXFA_FFField::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 401 FX_BOOL CXFA_FFField::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
402 if (!m_pNormalWidget) { | 402 if (!m_pNormalWidget) { |
403 return FALSE; | 403 return FALSE; |
404 } | 404 } |
405 if (!IsButtonDown()) { | 405 if (!IsButtonDown()) { |
406 return FALSE; | 406 return FALSE; |
407 } | 407 } |
408 SetButtonDown(FALSE); | 408 SetButtonDown(FALSE); |
409 CFWL_MsgMouse ms; | 409 CFWL_MsgMouse ms; |
410 ms.m_dwCmd = FWL_MSGMOUSECMD_LButtonUp; | 410 ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp; |
411 ms.m_dwFlags = dwFlags; | 411 ms.m_dwFlags = dwFlags; |
412 ms.m_fx = fx; | 412 ms.m_fx = fx; |
413 ms.m_fy = fy; | 413 ms.m_fy = fy; |
414 FWLToClient(ms.m_fx, ms.m_fy); | 414 FWLToClient(ms.m_fx, ms.m_fy); |
415 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 415 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
416 TranslateFWLMessage(&ms); | 416 TranslateFWLMessage(&ms); |
417 return TRUE; | 417 return TRUE; |
418 } | 418 } |
419 FX_BOOL CXFA_FFField::OnLButtonDblClk(uint32_t dwFlags, | 419 FX_BOOL CXFA_FFField::OnLButtonDblClk(uint32_t dwFlags, |
420 FX_FLOAT fx, | 420 FX_FLOAT fx, |
421 FX_FLOAT fy) { | 421 FX_FLOAT fy) { |
422 if (!m_pNormalWidget) { | 422 if (!m_pNormalWidget) { |
423 return FALSE; | 423 return FALSE; |
424 } | 424 } |
425 CFWL_MsgMouse ms; | 425 CFWL_MsgMouse ms; |
426 ms.m_dwCmd = FWL_MSGMOUSECMD_LButtonDblClk; | 426 ms.m_dwCmd = FWL_MouseCommand::LeftButtonDblClk; |
427 ms.m_dwFlags = dwFlags; | 427 ms.m_dwFlags = dwFlags; |
428 ms.m_fx = fx; | 428 ms.m_fx = fx; |
429 ms.m_fy = fy; | 429 ms.m_fy = fy; |
430 FWLToClient(ms.m_fx, ms.m_fy); | 430 FWLToClient(ms.m_fx, ms.m_fy); |
431 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 431 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
432 TranslateFWLMessage(&ms); | 432 TranslateFWLMessage(&ms); |
433 return TRUE; | 433 return TRUE; |
434 } | 434 } |
435 FX_BOOL CXFA_FFField::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 435 FX_BOOL CXFA_FFField::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
436 if (!m_pNormalWidget) { | 436 if (!m_pNormalWidget) { |
437 return FALSE; | 437 return FALSE; |
438 } | 438 } |
439 CFWL_MsgMouse ms; | 439 CFWL_MsgMouse ms; |
440 ms.m_dwCmd = FWL_MSGMOUSECMD_MouseMove; | 440 ms.m_dwCmd = FWL_MouseCommand::Move; |
441 ms.m_dwFlags = dwFlags; | 441 ms.m_dwFlags = dwFlags; |
442 ms.m_fx = fx; | 442 ms.m_fx = fx; |
443 ms.m_fy = fy; | 443 ms.m_fy = fy; |
444 FWLToClient(ms.m_fx, ms.m_fy); | 444 FWLToClient(ms.m_fx, ms.m_fy); |
445 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 445 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
446 TranslateFWLMessage(&ms); | 446 TranslateFWLMessage(&ms); |
447 return TRUE; | 447 return TRUE; |
448 } | 448 } |
449 FX_BOOL CXFA_FFField::OnMouseWheel(uint32_t dwFlags, | 449 FX_BOOL CXFA_FFField::OnMouseWheel(uint32_t dwFlags, |
450 int16_t zDelta, | 450 int16_t zDelta, |
(...skipping 22 matching lines...) Expand all Loading... |
473 } | 473 } |
474 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open || | 474 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open || |
475 !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 475 !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
476 return FALSE; | 476 return FALSE; |
477 } | 477 } |
478 if (!PtInActiveRect(fx, fy)) { | 478 if (!PtInActiveRect(fx, fy)) { |
479 return FALSE; | 479 return FALSE; |
480 } | 480 } |
481 SetButtonDown(TRUE); | 481 SetButtonDown(TRUE); |
482 CFWL_MsgMouse ms; | 482 CFWL_MsgMouse ms; |
483 ms.m_dwCmd = FWL_MSGMOUSECMD_RButtonDown; | 483 ms.m_dwCmd = FWL_MouseCommand::RightButtonDown; |
484 ms.m_dwFlags = dwFlags; | 484 ms.m_dwFlags = dwFlags; |
485 ms.m_fx = fx; | 485 ms.m_fx = fx; |
486 ms.m_fy = fy; | 486 ms.m_fy = fy; |
487 FWLToClient(ms.m_fx, ms.m_fy); | 487 FWLToClient(ms.m_fx, ms.m_fy); |
488 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 488 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
489 TranslateFWLMessage(&ms); | 489 TranslateFWLMessage(&ms); |
490 return TRUE; | 490 return TRUE; |
491 } | 491 } |
492 FX_BOOL CXFA_FFField::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 492 FX_BOOL CXFA_FFField::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
493 if (!m_pNormalWidget) { | 493 if (!m_pNormalWidget) { |
494 return FALSE; | 494 return FALSE; |
495 } | 495 } |
496 if (!IsButtonDown()) { | 496 if (!IsButtonDown()) { |
497 return FALSE; | 497 return FALSE; |
498 } | 498 } |
499 SetButtonDown(FALSE); | 499 SetButtonDown(FALSE); |
500 CFWL_MsgMouse ms; | 500 CFWL_MsgMouse ms; |
501 ms.m_dwCmd = FWL_MSGMOUSECMD_RButtonUp; | 501 ms.m_dwCmd = FWL_MouseCommand::RightButtonUp; |
502 ms.m_dwFlags = dwFlags; | 502 ms.m_dwFlags = dwFlags; |
503 ms.m_fx = fx; | 503 ms.m_fx = fx; |
504 ms.m_fy = fy; | 504 ms.m_fy = fy; |
505 FWLToClient(ms.m_fx, ms.m_fy); | 505 FWLToClient(ms.m_fx, ms.m_fy); |
506 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 506 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
507 TranslateFWLMessage(&ms); | 507 TranslateFWLMessage(&ms); |
508 return TRUE; | 508 return TRUE; |
509 } | 509 } |
510 FX_BOOL CXFA_FFField::OnRButtonDblClk(uint32_t dwFlags, | 510 FX_BOOL CXFA_FFField::OnRButtonDblClk(uint32_t dwFlags, |
511 FX_FLOAT fx, | 511 FX_FLOAT fx, |
512 FX_FLOAT fy) { | 512 FX_FLOAT fy) { |
513 if (!m_pNormalWidget) { | 513 if (!m_pNormalWidget) { |
514 return FALSE; | 514 return FALSE; |
515 } | 515 } |
516 CFWL_MsgMouse ms; | 516 CFWL_MsgMouse ms; |
517 ms.m_dwCmd = FWL_MSGMOUSECMD_RButtonDblClk; | 517 ms.m_dwCmd = FWL_MouseCommand::RightButtonDblClk; |
518 ms.m_dwFlags = dwFlags; | 518 ms.m_dwFlags = dwFlags; |
519 ms.m_fx = fx; | 519 ms.m_fx = fx; |
520 ms.m_fy = fy; | 520 ms.m_fy = fy; |
521 FWLToClient(ms.m_fx, ms.m_fy); | 521 FWLToClient(ms.m_fx, ms.m_fy); |
522 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 522 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
523 TranslateFWLMessage(&ms); | 523 TranslateFWLMessage(&ms); |
524 return TRUE; | 524 return TRUE; |
525 } | 525 } |
526 | 526 |
527 FX_BOOL CXFA_FFField::OnSetFocus(CXFA_FFWidget* pOldWidget) { | 527 FX_BOOL CXFA_FFField::OnSetFocus(CXFA_FFWidget* pOldWidget) { |
(...skipping 20 matching lines...) Expand all Loading... |
548 m_dwStatus &= ~XFA_WIDGETSTATUS_Focused; | 548 m_dwStatus &= ~XFA_WIDGETSTATUS_Focused; |
549 AddInvalidateRect(); | 549 AddInvalidateRect(); |
550 CXFA_FFWidget::OnKillFocus(pNewWidget); | 550 CXFA_FFWidget::OnKillFocus(pNewWidget); |
551 return TRUE; | 551 return TRUE; |
552 } | 552 } |
553 FX_BOOL CXFA_FFField::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) { | 553 FX_BOOL CXFA_FFField::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) { |
554 if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 554 if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
555 return FALSE; | 555 return FALSE; |
556 } | 556 } |
557 CFWL_MsgKey ms; | 557 CFWL_MsgKey ms; |
558 ms.m_dwCmd = FWL_MSGKEYCMD_KeyDown; | 558 ms.m_dwCmd = FWL_KeyCommand::KeyDown; |
559 ms.m_dwFlags = dwFlags; | 559 ms.m_dwFlags = dwFlags; |
560 ms.m_dwKeyCode = dwKeyCode; | 560 ms.m_dwKeyCode = dwKeyCode; |
561 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 561 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
562 ms.m_pSrcTarget = NULL; | 562 ms.m_pSrcTarget = NULL; |
563 TranslateFWLMessage(&ms); | 563 TranslateFWLMessage(&ms); |
564 return TRUE; | 564 return TRUE; |
565 } | 565 } |
566 FX_BOOL CXFA_FFField::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { | 566 FX_BOOL CXFA_FFField::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { |
567 if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 567 if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
568 return FALSE; | 568 return FALSE; |
569 } | 569 } |
570 CFWL_MsgKey ms; | 570 CFWL_MsgKey ms; |
571 ms.m_dwCmd = FWL_MSGKEYCMD_KeyUp; | 571 ms.m_dwCmd = FWL_KeyCommand::KeyUp; |
572 ms.m_dwFlags = dwFlags; | 572 ms.m_dwFlags = dwFlags; |
573 ms.m_dwKeyCode = dwKeyCode; | 573 ms.m_dwKeyCode = dwKeyCode; |
574 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 574 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
575 ms.m_pSrcTarget = NULL; | 575 ms.m_pSrcTarget = NULL; |
576 TranslateFWLMessage(&ms); | 576 TranslateFWLMessage(&ms); |
577 return TRUE; | 577 return TRUE; |
578 } | 578 } |
579 FX_BOOL CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) { | 579 FX_BOOL CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) { |
580 if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 580 if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
581 return FALSE; | 581 return FALSE; |
582 } | 582 } |
583 if (dwChar == FWL_VKEY_Tab) { | 583 if (dwChar == FWL_VKEY_Tab) { |
584 return TRUE; | 584 return TRUE; |
585 } | 585 } |
586 if (!m_pNormalWidget) { | 586 if (!m_pNormalWidget) { |
587 return FALSE; | 587 return FALSE; |
588 } | 588 } |
589 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) { | 589 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) { |
590 return FALSE; | 590 return FALSE; |
591 } | 591 } |
592 CFWL_MsgKey ms; | 592 CFWL_MsgKey ms; |
593 ms.m_dwCmd = FWL_MSGKEYCMD_Char; | 593 ms.m_dwCmd = FWL_KeyCommand::Char; |
594 ms.m_dwFlags = dwFlags; | 594 ms.m_dwFlags = dwFlags; |
595 ms.m_dwKeyCode = dwChar; | 595 ms.m_dwKeyCode = dwChar; |
596 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 596 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
597 ms.m_pSrcTarget = NULL; | 597 ms.m_pSrcTarget = NULL; |
598 TranslateFWLMessage(&ms); | 598 TranslateFWLMessage(&ms); |
599 return TRUE; | 599 return TRUE; |
600 } | 600 } |
601 FWL_WidgetHit CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { | 601 FWL_WidgetHit CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { |
602 if (m_pNormalWidget) { | 602 if (m_pNormalWidget) { |
603 FX_FLOAT ffx = fx, ffy = fy; | 603 FX_FLOAT ffx = fx, ffy = fy; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 GetApp()->GetWidgetMgrDelegate()->OnProcessMessageToForm(pMessage); | 786 GetApp()->GetWidgetMgrDelegate()->OnProcessMessageToForm(pMessage); |
787 } | 787 } |
788 int32_t CXFA_FFField::OnProcessMessage(CFWL_Message* pMessage) { | 788 int32_t CXFA_FFField::OnProcessMessage(CFWL_Message* pMessage) { |
789 return FWL_ERR_Succeeded; | 789 return FWL_ERR_Succeeded; |
790 } | 790 } |
791 | 791 |
792 FWL_ERR CXFA_FFField::OnProcessEvent(CFWL_Event* pEvent) { | 792 FWL_ERR CXFA_FFField::OnProcessEvent(CFWL_Event* pEvent) { |
793 switch (pEvent->GetClassID()) { | 793 switch (pEvent->GetClassID()) { |
794 case CFWL_EventType::Mouse: { | 794 case CFWL_EventType::Mouse: { |
795 CFWL_EvtMouse* event = (CFWL_EvtMouse*)pEvent; | 795 CFWL_EvtMouse* event = (CFWL_EvtMouse*)pEvent; |
796 if (event->m_dwCmd == FWL_MSGMOUSECMD_MouseEnter) { | 796 if (event->m_dwCmd == FWL_MouseCommand::Enter) { |
797 CXFA_EventParam eParam; | 797 CXFA_EventParam eParam; |
798 eParam.m_eType = XFA_EVENT_MouseEnter; | 798 eParam.m_eType = XFA_EVENT_MouseEnter; |
799 eParam.m_pTarget = m_pDataAcc; | 799 eParam.m_pTarget = m_pDataAcc; |
800 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseEnter, &eParam); | 800 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseEnter, &eParam); |
801 } else if (event->m_dwCmd == FWL_MSGMOUSECMD_MouseLeave) { | 801 } else if (event->m_dwCmd == FWL_MouseCommand::Leave) { |
802 CXFA_EventParam eParam; | 802 CXFA_EventParam eParam; |
803 eParam.m_eType = XFA_EVENT_MouseExit; | 803 eParam.m_eType = XFA_EVENT_MouseExit; |
804 eParam.m_pTarget = m_pDataAcc; | 804 eParam.m_pTarget = m_pDataAcc; |
805 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseExit, &eParam); | 805 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseExit, &eParam); |
806 } else if (event->m_dwCmd == FWL_MSGMOUSECMD_LButtonDown) { | 806 } else if (event->m_dwCmd == FWL_MouseCommand::LeftButtonDown) { |
807 CXFA_EventParam eParam; | 807 CXFA_EventParam eParam; |
808 eParam.m_eType = XFA_EVENT_MouseDown; | 808 eParam.m_eType = XFA_EVENT_MouseDown; |
809 eParam.m_pTarget = m_pDataAcc; | 809 eParam.m_pTarget = m_pDataAcc; |
810 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseDown, &eParam); | 810 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseDown, &eParam); |
811 } else if (event->m_dwCmd == FWL_MSGMOUSECMD_LButtonUp) { | 811 } else if (event->m_dwCmd == FWL_MouseCommand::LeftButtonUp) { |
812 CXFA_EventParam eParam; | 812 CXFA_EventParam eParam; |
813 eParam.m_eType = XFA_EVENT_MouseUp; | 813 eParam.m_eType = XFA_EVENT_MouseUp; |
814 eParam.m_pTarget = m_pDataAcc; | 814 eParam.m_pTarget = m_pDataAcc; |
815 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseUp, &eParam); | 815 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseUp, &eParam); |
816 } | 816 } |
817 break; | 817 break; |
818 } | 818 } |
819 case CFWL_EventType::Click: { | 819 case CFWL_EventType::Click: { |
820 CXFA_EventParam eParam; | 820 CXFA_EventParam eParam; |
821 eParam.m_eType = XFA_EVENT_Click; | 821 eParam.m_eType = XFA_EVENT_Click; |
822 eParam.m_pTarget = m_pDataAcc; | 822 eParam.m_pTarget = m_pDataAcc; |
823 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); | 823 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); |
824 break; | 824 break; |
825 } | 825 } |
826 default: | 826 default: |
827 break; | 827 break; |
828 } | 828 } |
829 return FWL_ERR_Succeeded; | 829 return FWL_ERR_Succeeded; |
830 } | 830 } |
831 | 831 |
832 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, | 832 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, |
833 const CFX_Matrix* pMatrix) { | 833 const CFX_Matrix* pMatrix) { |
834 return FWL_ERR_Succeeded; | 834 return FWL_ERR_Succeeded; |
835 } | 835 } |
OLD | NEW |