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/fwl/core/ifwl_widget.h" | 7 #include "xfa/fwl/core/ifwl_widget.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 rtPopup.Set(rtAnchor.left, rtAnchor.top - rtPopup.height, rtPopup.width, | 577 rtPopup.Set(rtAnchor.left, rtAnchor.top - rtPopup.height, rtPopup.width, |
578 rtPopup.height); | 578 rtPopup.height); |
579 } else { | 579 } else { |
580 rtPopup.Set(rtAnchor.left, rtAnchor.bottom(), rtPopup.width, | 580 rtPopup.Set(rtAnchor.left, rtAnchor.bottom(), rtPopup.width, |
581 rtPopup.height); | 581 rtPopup.height); |
582 } | 582 } |
583 rtPopup.Offset(fx, fy); | 583 rtPopup.Offset(fx, fy); |
584 return true; | 584 return true; |
585 } | 585 } |
586 | 586 |
587 void IFWL_Widget::RegisterEventTarget(IFWL_Widget* pEventSource, | 587 void IFWL_Widget::RegisterEventTarget(IFWL_Widget* pEventSource) { |
588 uint32_t dwFilter) { | |
589 const IFWL_App* pApp = GetOwnerApp(); | 588 const IFWL_App* pApp = GetOwnerApp(); |
590 if (!pApp) | 589 if (!pApp) |
591 return; | 590 return; |
592 | 591 |
593 CFWL_NoteDriver* pNoteDriver = pApp->GetNoteDriver(); | 592 CFWL_NoteDriver* pNoteDriver = pApp->GetNoteDriver(); |
594 if (!pNoteDriver) | 593 if (!pNoteDriver) |
595 return; | 594 return; |
596 | 595 |
597 pNoteDriver->RegisterEventTarget(this, pEventSource, dwFilter); | 596 pNoteDriver->RegisterEventTarget(this, pEventSource); |
598 } | 597 } |
599 | 598 |
600 void IFWL_Widget::UnregisterEventTarget() { | 599 void IFWL_Widget::UnregisterEventTarget() { |
601 const IFWL_App* pApp = GetOwnerApp(); | 600 const IFWL_App* pApp = GetOwnerApp(); |
602 if (!pApp) | 601 if (!pApp) |
603 return; | 602 return; |
604 | 603 |
605 CFWL_NoteDriver* pNoteDriver = pApp->GetNoteDriver(); | 604 CFWL_NoteDriver* pNoteDriver = pApp->GetNoteDriver(); |
606 if (!pNoteDriver) | 605 if (!pNoteDriver) |
607 return; | 606 return; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 } | 803 } |
805 default: | 804 default: |
806 break; | 805 break; |
807 } | 806 } |
808 } | 807 } |
809 | 808 |
810 void IFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} | 809 void IFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} |
811 | 810 |
812 void IFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, | 811 void IFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, |
813 const CFX_Matrix* pMatrix) {} | 812 const CFX_Matrix* pMatrix) {} |
OLD | NEW |