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/core/cfwl_edit.h" | 9 #include "xfa/fwl/cfwl_edit.h" |
10 #include "xfa/fwl/core/cfwl_evtmouse.h" | 10 #include "xfa/fwl/cfwl_eventmouse.h" |
11 #include "xfa/fwl/core/cfwl_msgkey.h" | 11 #include "xfa/fwl/cfwl_messagekey.h" |
12 #include "xfa/fwl/core/cfwl_msgkillfocus.h" | 12 #include "xfa/fwl/cfwl_messagekillfocus.h" |
13 #include "xfa/fwl/core/cfwl_msgmouse.h" | 13 #include "xfa/fwl/cfwl_messagemouse.h" |
14 #include "xfa/fwl/core/cfwl_msgmousewheel.h" | 14 #include "xfa/fwl/cfwl_messagemousewheel.h" |
15 #include "xfa/fwl/core/cfwl_msgsetfocus.h" | 15 #include "xfa/fwl/cfwl_messagesetfocus.h" |
16 #include "xfa/fwl/core/cfwl_picturebox.h" | 16 #include "xfa/fwl/cfwl_picturebox.h" |
17 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 17 #include "xfa/fwl/cfwl_widgetmgr.h" |
18 #include "xfa/fxfa/app/xfa_fwltheme.h" | 18 #include "xfa/fxfa/app/xfa_fwltheme.h" |
19 #include "xfa/fxfa/app/xfa_textlayout.h" | 19 #include "xfa/fxfa/app/xfa_textlayout.h" |
20 #include "xfa/fxfa/xfa_ffapp.h" | 20 #include "xfa/fxfa/xfa_ffapp.h" |
21 #include "xfa/fxfa/xfa_ffdoc.h" | 21 #include "xfa/fxfa/xfa_ffdoc.h" |
22 #include "xfa/fxfa/xfa_ffdocview.h" | 22 #include "xfa/fxfa/xfa_ffdocview.h" |
23 #include "xfa/fxfa/xfa_ffpageview.h" | 23 #include "xfa/fxfa/xfa_ffpageview.h" |
24 #include "xfa/fxfa/xfa_ffwidget.h" | 24 #include "xfa/fxfa/xfa_ffwidget.h" |
25 #include "xfa/fxgraphics/cfx_color.h" | 25 #include "xfa/fxgraphics/cfx_color.h" |
26 #include "xfa/fxgraphics/cfx_path.h" | 26 #include "xfa/fxgraphics/cfx_path.h" |
27 | 27 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 if (rtUi.height < fFontSize) { | 342 if (rtUi.height < fFontSize) { |
343 rtUi.height = fFontSize; | 343 rtUi.height = fFontSize; |
344 } | 344 } |
345 } | 345 } |
346 m_pNormalWidget->SetWidgetRect(rtUi); | 346 m_pNormalWidget->SetWidgetRect(rtUi); |
347 } | 347 } |
348 bool CXFA_FFField::OnMouseEnter() { | 348 bool CXFA_FFField::OnMouseEnter() { |
349 if (!m_pNormalWidget) { | 349 if (!m_pNormalWidget) { |
350 return false; | 350 return false; |
351 } | 351 } |
352 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 352 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
353 ms.m_dwCmd = FWL_MouseCommand::Enter; | 353 ms.m_dwCmd = FWL_MouseCommand::Enter; |
354 TranslateFWLMessage(&ms); | 354 TranslateFWLMessage(&ms); |
355 return true; | 355 return true; |
356 } | 356 } |
357 bool CXFA_FFField::OnMouseExit() { | 357 bool CXFA_FFField::OnMouseExit() { |
358 if (!m_pNormalWidget) { | 358 if (!m_pNormalWidget) { |
359 return false; | 359 return false; |
360 } | 360 } |
361 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 361 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
362 ms.m_dwCmd = FWL_MouseCommand::Leave; | 362 ms.m_dwCmd = FWL_MouseCommand::Leave; |
363 TranslateFWLMessage(&ms); | 363 TranslateFWLMessage(&ms); |
364 return true; | 364 return true; |
365 } | 365 } |
366 | 366 |
367 void CXFA_FFField::FWLToClient(FX_FLOAT& fx, FX_FLOAT& fy) { | 367 void CXFA_FFField::FWLToClient(FX_FLOAT& fx, FX_FLOAT& fy) { |
368 if (!m_pNormalWidget) | 368 if (!m_pNormalWidget) |
369 return; | 369 return; |
370 | 370 |
371 CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect(); | 371 CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect(); |
372 fx -= rtWidget.left; | 372 fx -= rtWidget.left; |
373 fy -= rtWidget.top; | 373 fy -= rtWidget.top; |
374 } | 374 } |
375 | 375 |
376 bool CXFA_FFField::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 376 bool CXFA_FFField::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
377 if (!m_pNormalWidget) { | 377 if (!m_pNormalWidget) { |
378 return false; | 378 return false; |
379 } | 379 } |
380 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open || | 380 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open || |
381 !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 381 !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
382 return false; | 382 return false; |
383 } | 383 } |
384 if (!PtInActiveRect(fx, fy)) { | 384 if (!PtInActiveRect(fx, fy)) { |
385 return false; | 385 return false; |
386 } | 386 } |
387 SetButtonDown(true); | 387 SetButtonDown(true); |
388 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 388 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
389 ms.m_dwCmd = FWL_MouseCommand::LeftButtonDown; | 389 ms.m_dwCmd = FWL_MouseCommand::LeftButtonDown; |
390 ms.m_dwFlags = dwFlags; | 390 ms.m_dwFlags = dwFlags; |
391 ms.m_fx = fx; | 391 ms.m_fx = fx; |
392 ms.m_fy = fy; | 392 ms.m_fy = fy; |
393 FWLToClient(ms.m_fx, ms.m_fy); | 393 FWLToClient(ms.m_fx, ms.m_fy); |
394 TranslateFWLMessage(&ms); | 394 TranslateFWLMessage(&ms); |
395 return true; | 395 return true; |
396 } | 396 } |
397 bool CXFA_FFField::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 397 bool CXFA_FFField::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
398 if (!m_pNormalWidget) { | 398 if (!m_pNormalWidget) { |
399 return false; | 399 return false; |
400 } | 400 } |
401 if (!IsButtonDown()) { | 401 if (!IsButtonDown()) { |
402 return false; | 402 return false; |
403 } | 403 } |
404 SetButtonDown(false); | 404 SetButtonDown(false); |
405 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 405 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
406 ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp; | 406 ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp; |
407 ms.m_dwFlags = dwFlags; | 407 ms.m_dwFlags = dwFlags; |
408 ms.m_fx = fx; | 408 ms.m_fx = fx; |
409 ms.m_fy = fy; | 409 ms.m_fy = fy; |
410 FWLToClient(ms.m_fx, ms.m_fy); | 410 FWLToClient(ms.m_fx, ms.m_fy); |
411 TranslateFWLMessage(&ms); | 411 TranslateFWLMessage(&ms); |
412 return true; | 412 return true; |
413 } | 413 } |
414 bool CXFA_FFField::OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 414 bool CXFA_FFField::OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
415 if (!m_pNormalWidget) { | 415 if (!m_pNormalWidget) { |
416 return false; | 416 return false; |
417 } | 417 } |
418 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 418 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
419 ms.m_dwCmd = FWL_MouseCommand::LeftButtonDblClk; | 419 ms.m_dwCmd = FWL_MouseCommand::LeftButtonDblClk; |
420 ms.m_dwFlags = dwFlags; | 420 ms.m_dwFlags = dwFlags; |
421 ms.m_fx = fx; | 421 ms.m_fx = fx; |
422 ms.m_fy = fy; | 422 ms.m_fy = fy; |
423 FWLToClient(ms.m_fx, ms.m_fy); | 423 FWLToClient(ms.m_fx, ms.m_fy); |
424 TranslateFWLMessage(&ms); | 424 TranslateFWLMessage(&ms); |
425 return true; | 425 return true; |
426 } | 426 } |
427 bool CXFA_FFField::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 427 bool CXFA_FFField::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
428 if (!m_pNormalWidget) { | 428 if (!m_pNormalWidget) { |
429 return false; | 429 return false; |
430 } | 430 } |
431 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 431 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
432 ms.m_dwCmd = FWL_MouseCommand::Move; | 432 ms.m_dwCmd = FWL_MouseCommand::Move; |
433 ms.m_dwFlags = dwFlags; | 433 ms.m_dwFlags = dwFlags; |
434 ms.m_fx = fx; | 434 ms.m_fx = fx; |
435 ms.m_fy = fy; | 435 ms.m_fy = fy; |
436 FWLToClient(ms.m_fx, ms.m_fy); | 436 FWLToClient(ms.m_fx, ms.m_fy); |
437 TranslateFWLMessage(&ms); | 437 TranslateFWLMessage(&ms); |
438 return true; | 438 return true; |
439 } | 439 } |
440 bool CXFA_FFField::OnMouseWheel(uint32_t dwFlags, | 440 bool CXFA_FFField::OnMouseWheel(uint32_t dwFlags, |
441 int16_t zDelta, | 441 int16_t zDelta, |
442 FX_FLOAT fx, | 442 FX_FLOAT fx, |
443 FX_FLOAT fy) { | 443 FX_FLOAT fy) { |
444 if (!m_pNormalWidget) { | 444 if (!m_pNormalWidget) { |
445 return false; | 445 return false; |
446 } | 446 } |
447 CFWL_MsgMouseWheel ms(nullptr, m_pNormalWidget); | 447 CFWL_MessageMouseWheel ms(nullptr, m_pNormalWidget); |
448 ms.m_dwFlags = dwFlags; | 448 ms.m_dwFlags = dwFlags; |
449 ms.m_fx = fx; | 449 ms.m_fx = fx; |
450 ms.m_fy = fy; | 450 ms.m_fy = fy; |
451 FWLToClient(ms.m_fx, ms.m_fy); | 451 FWLToClient(ms.m_fx, ms.m_fy); |
452 ms.m_fDeltaX = zDelta; | 452 ms.m_fDeltaX = zDelta; |
453 ms.m_fDeltaY = 0; | 453 ms.m_fDeltaY = 0; |
454 TranslateFWLMessage(&ms); | 454 TranslateFWLMessage(&ms); |
455 return true; | 455 return true; |
456 } | 456 } |
457 bool CXFA_FFField::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 457 bool CXFA_FFField::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
458 if (!m_pNormalWidget) { | 458 if (!m_pNormalWidget) { |
459 return false; | 459 return false; |
460 } | 460 } |
461 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open || | 461 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open || |
462 !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 462 !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
463 return false; | 463 return false; |
464 } | 464 } |
465 if (!PtInActiveRect(fx, fy)) { | 465 if (!PtInActiveRect(fx, fy)) { |
466 return false; | 466 return false; |
467 } | 467 } |
468 SetButtonDown(true); | 468 SetButtonDown(true); |
469 | 469 |
470 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 470 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
471 ms.m_dwCmd = FWL_MouseCommand::RightButtonDown; | 471 ms.m_dwCmd = FWL_MouseCommand::RightButtonDown; |
472 ms.m_dwFlags = dwFlags; | 472 ms.m_dwFlags = dwFlags; |
473 ms.m_fx = fx; | 473 ms.m_fx = fx; |
474 ms.m_fy = fy; | 474 ms.m_fy = fy; |
475 FWLToClient(ms.m_fx, ms.m_fy); | 475 FWLToClient(ms.m_fx, ms.m_fy); |
476 TranslateFWLMessage(&ms); | 476 TranslateFWLMessage(&ms); |
477 return true; | 477 return true; |
478 } | 478 } |
479 bool CXFA_FFField::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 479 bool CXFA_FFField::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
480 if (!m_pNormalWidget) { | 480 if (!m_pNormalWidget) { |
481 return false; | 481 return false; |
482 } | 482 } |
483 if (!IsButtonDown()) { | 483 if (!IsButtonDown()) { |
484 return false; | 484 return false; |
485 } | 485 } |
486 SetButtonDown(false); | 486 SetButtonDown(false); |
487 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 487 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
488 ms.m_dwCmd = FWL_MouseCommand::RightButtonUp; | 488 ms.m_dwCmd = FWL_MouseCommand::RightButtonUp; |
489 ms.m_dwFlags = dwFlags; | 489 ms.m_dwFlags = dwFlags; |
490 ms.m_fx = fx; | 490 ms.m_fx = fx; |
491 ms.m_fy = fy; | 491 ms.m_fy = fy; |
492 FWLToClient(ms.m_fx, ms.m_fy); | 492 FWLToClient(ms.m_fx, ms.m_fy); |
493 TranslateFWLMessage(&ms); | 493 TranslateFWLMessage(&ms); |
494 return true; | 494 return true; |
495 } | 495 } |
496 bool CXFA_FFField::OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 496 bool CXFA_FFField::OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
497 if (!m_pNormalWidget) { | 497 if (!m_pNormalWidget) { |
498 return false; | 498 return false; |
499 } | 499 } |
500 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 500 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
501 ms.m_dwCmd = FWL_MouseCommand::RightButtonDblClk; | 501 ms.m_dwCmd = FWL_MouseCommand::RightButtonDblClk; |
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 TranslateFWLMessage(&ms); | 506 TranslateFWLMessage(&ms); |
507 return true; | 507 return true; |
508 } | 508 } |
509 | 509 |
510 bool CXFA_FFField::OnSetFocus(CXFA_FFWidget* pOldWidget) { | 510 bool CXFA_FFField::OnSetFocus(CXFA_FFWidget* pOldWidget) { |
511 CXFA_FFWidget::OnSetFocus(pOldWidget); | 511 CXFA_FFWidget::OnSetFocus(pOldWidget); |
512 if (!m_pNormalWidget) { | 512 if (!m_pNormalWidget) { |
513 return false; | 513 return false; |
514 } | 514 } |
515 CFWL_MsgSetFocus ms(nullptr, m_pNormalWidget); | 515 CFWL_MessageSetFocus ms(nullptr, m_pNormalWidget); |
516 TranslateFWLMessage(&ms); | 516 TranslateFWLMessage(&ms); |
517 m_dwStatus |= XFA_WidgetStatus_Focused; | 517 m_dwStatus |= XFA_WidgetStatus_Focused; |
518 AddInvalidateRect(); | 518 AddInvalidateRect(); |
519 return true; | 519 return true; |
520 } | 520 } |
521 bool CXFA_FFField::OnKillFocus(CXFA_FFWidget* pNewWidget) { | 521 bool CXFA_FFField::OnKillFocus(CXFA_FFWidget* pNewWidget) { |
522 if (!m_pNormalWidget) { | 522 if (!m_pNormalWidget) { |
523 return CXFA_FFWidget::OnKillFocus(pNewWidget); | 523 return CXFA_FFWidget::OnKillFocus(pNewWidget); |
524 } | 524 } |
525 CFWL_MsgKillFocus ms(nullptr, m_pNormalWidget); | 525 CFWL_MessageKillFocus ms(nullptr, m_pNormalWidget); |
526 TranslateFWLMessage(&ms); | 526 TranslateFWLMessage(&ms); |
527 m_dwStatus &= ~XFA_WidgetStatus_Focused; | 527 m_dwStatus &= ~XFA_WidgetStatus_Focused; |
528 AddInvalidateRect(); | 528 AddInvalidateRect(); |
529 CXFA_FFWidget::OnKillFocus(pNewWidget); | 529 CXFA_FFWidget::OnKillFocus(pNewWidget); |
530 return true; | 530 return true; |
531 } | 531 } |
532 bool CXFA_FFField::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) { | 532 bool CXFA_FFField::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) { |
533 if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 533 if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
534 return false; | 534 return false; |
535 } | 535 } |
536 CFWL_MsgKey ms(nullptr, m_pNormalWidget); | 536 CFWL_MessageKey ms(nullptr, m_pNormalWidget); |
537 ms.m_dwCmd = FWL_KeyCommand::KeyDown; | 537 ms.m_dwCmd = FWL_KeyCommand::KeyDown; |
538 ms.m_dwFlags = dwFlags; | 538 ms.m_dwFlags = dwFlags; |
539 ms.m_dwKeyCode = dwKeyCode; | 539 ms.m_dwKeyCode = dwKeyCode; |
540 TranslateFWLMessage(&ms); | 540 TranslateFWLMessage(&ms); |
541 return true; | 541 return true; |
542 } | 542 } |
543 bool CXFA_FFField::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { | 543 bool CXFA_FFField::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { |
544 if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 544 if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
545 return false; | 545 return false; |
546 } | 546 } |
547 CFWL_MsgKey ms(nullptr, m_pNormalWidget); | 547 CFWL_MessageKey ms(nullptr, m_pNormalWidget); |
548 ms.m_dwCmd = FWL_KeyCommand::KeyUp; | 548 ms.m_dwCmd = FWL_KeyCommand::KeyUp; |
549 ms.m_dwFlags = dwFlags; | 549 ms.m_dwFlags = dwFlags; |
550 ms.m_dwKeyCode = dwKeyCode; | 550 ms.m_dwKeyCode = dwKeyCode; |
551 TranslateFWLMessage(&ms); | 551 TranslateFWLMessage(&ms); |
552 return true; | 552 return true; |
553 } | 553 } |
554 bool CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) { | 554 bool CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) { |
555 if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 555 if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
556 return false; | 556 return false; |
557 } | 557 } |
558 if (dwChar == FWL_VKEY_Tab) { | 558 if (dwChar == FWL_VKEY_Tab) { |
559 return true; | 559 return true; |
560 } | 560 } |
561 if (!m_pNormalWidget) { | 561 if (!m_pNormalWidget) { |
562 return false; | 562 return false; |
563 } | 563 } |
564 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) { | 564 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) { |
565 return false; | 565 return false; |
566 } | 566 } |
567 CFWL_MsgKey ms(nullptr, m_pNormalWidget); | 567 CFWL_MessageKey ms(nullptr, m_pNormalWidget); |
568 ms.m_dwCmd = FWL_KeyCommand::Char; | 568 ms.m_dwCmd = FWL_KeyCommand::Char; |
569 ms.m_dwFlags = dwFlags; | 569 ms.m_dwFlags = dwFlags; |
570 ms.m_dwKeyCode = dwChar; | 570 ms.m_dwKeyCode = dwChar; |
571 TranslateFWLMessage(&ms); | 571 TranslateFWLMessage(&ms); |
572 return true; | 572 return true; |
573 } | 573 } |
574 FWL_WidgetHit CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { | 574 FWL_WidgetHit CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { |
575 if (m_pNormalWidget) { | 575 if (m_pNormalWidget) { |
576 FX_FLOAT ffx = fx, ffy = fy; | 576 FX_FLOAT ffx = fx, ffy = fy; |
577 FWLToClient(ffx, ffy); | 577 FWLToClient(ffx, ffy); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 return false; | 750 return false; |
751 } | 751 } |
752 void CXFA_FFField::TranslateFWLMessage(CFWL_Message* pMessage) { | 752 void CXFA_FFField::TranslateFWLMessage(CFWL_Message* pMessage) { |
753 GetApp()->GetWidgetMgrDelegate()->OnProcessMessageToForm(pMessage); | 753 GetApp()->GetWidgetMgrDelegate()->OnProcessMessageToForm(pMessage); |
754 } | 754 } |
755 void CXFA_FFField::OnProcessMessage(CFWL_Message* pMessage) {} | 755 void CXFA_FFField::OnProcessMessage(CFWL_Message* pMessage) {} |
756 | 756 |
757 void CXFA_FFField::OnProcessEvent(CFWL_Event* pEvent) { | 757 void CXFA_FFField::OnProcessEvent(CFWL_Event* pEvent) { |
758 switch (pEvent->GetType()) { | 758 switch (pEvent->GetType()) { |
759 case CFWL_Event::Type::Mouse: { | 759 case CFWL_Event::Type::Mouse: { |
760 CFWL_EvtMouse* event = (CFWL_EvtMouse*)pEvent; | 760 CFWL_EventMouse* event = (CFWL_EventMouse*)pEvent; |
761 if (event->m_dwCmd == FWL_MouseCommand::Enter) { | 761 if (event->m_dwCmd == FWL_MouseCommand::Enter) { |
762 CXFA_EventParam eParam; | 762 CXFA_EventParam eParam; |
763 eParam.m_eType = XFA_EVENT_MouseEnter; | 763 eParam.m_eType = XFA_EVENT_MouseEnter; |
764 eParam.m_pTarget = m_pDataAcc; | 764 eParam.m_pTarget = m_pDataAcc; |
765 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseEnter, &eParam); | 765 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseEnter, &eParam); |
766 } else if (event->m_dwCmd == FWL_MouseCommand::Leave) { | 766 } else if (event->m_dwCmd == FWL_MouseCommand::Leave) { |
767 CXFA_EventParam eParam; | 767 CXFA_EventParam eParam; |
768 eParam.m_eType = XFA_EVENT_MouseExit; | 768 eParam.m_eType = XFA_EVENT_MouseExit; |
769 eParam.m_pTarget = m_pDataAcc; | 769 eParam.m_pTarget = m_pDataAcc; |
770 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseExit, &eParam); | 770 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseExit, &eParam); |
(...skipping 17 matching lines...) Expand all Loading... |
788 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); | 788 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); |
789 break; | 789 break; |
790 } | 790 } |
791 default: | 791 default: |
792 break; | 792 break; |
793 } | 793 } |
794 } | 794 } |
795 | 795 |
796 void CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, | 796 void CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, |
797 const CFX_Matrix* pMatrix) {} | 797 const CFX_Matrix* pMatrix) {} |
OLD | NEW |