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/cfwl_notedriver.h" | 7 #include "xfa/fwl/core/cfwl_notedriver.h" |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "core/fxcrt/fx_ext.h" | 11 #include "core/fxcrt/fx_ext.h" |
12 #include "third_party/base/ptr_util.h" | 12 #include "third_party/base/ptr_util.h" |
13 #include "third_party/base/stl_util.h" | 13 #include "third_party/base/stl_util.h" |
| 14 #include "xfa/fwl/core/cfwl_app.h" |
14 #include "xfa/fwl/core/cfwl_eventtarget.h" | 15 #include "xfa/fwl/core/cfwl_eventtarget.h" |
15 #include "xfa/fwl/core/cfwl_msgkey.h" | 16 #include "xfa/fwl/core/cfwl_msgkey.h" |
16 #include "xfa/fwl/core/cfwl_msgkillfocus.h" | 17 #include "xfa/fwl/core/cfwl_msgkillfocus.h" |
17 #include "xfa/fwl/core/cfwl_msgmouse.h" | 18 #include "xfa/fwl/core/cfwl_msgmouse.h" |
18 #include "xfa/fwl/core/cfwl_msgmousewheel.h" | 19 #include "xfa/fwl/core/cfwl_msgmousewheel.h" |
19 #include "xfa/fwl/core/cfwl_msgsetfocus.h" | 20 #include "xfa/fwl/core/cfwl_msgsetfocus.h" |
20 #include "xfa/fwl/core/cfwl_noteloop.h" | 21 #include "xfa/fwl/core/cfwl_noteloop.h" |
21 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 22 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
22 #include "xfa/fwl/core/ifwl_app.h" | |
23 #include "xfa/fwl/core/ifwl_form.h" | 23 #include "xfa/fwl/core/ifwl_form.h" |
24 | 24 |
25 CFWL_NoteDriver::CFWL_NoteDriver() | 25 CFWL_NoteDriver::CFWL_NoteDriver() |
26 : m_pHover(nullptr), | 26 : m_pHover(nullptr), |
27 m_pFocus(nullptr), | 27 m_pFocus(nullptr), |
28 m_pGrab(nullptr), | 28 m_pGrab(nullptr), |
29 m_pNoteLoop(pdfium::MakeUnique<CFWL_NoteLoop>()) { | 29 m_pNoteLoop(pdfium::MakeUnique<CFWL_NoteLoop>()) { |
30 PushNoteLoop(m_pNoteLoop.get()); | 30 PushNoteLoop(m_pNoteLoop.get()); |
31 } | 31 } |
32 | 32 |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 void CFWL_NoteDriver::ClearEventTargets(bool bRemoveAll) { | 479 void CFWL_NoteDriver::ClearEventTargets(bool bRemoveAll) { |
480 auto it = m_eventTargets.begin(); | 480 auto it = m_eventTargets.begin(); |
481 while (it != m_eventTargets.end()) { | 481 while (it != m_eventTargets.end()) { |
482 auto old = it++; | 482 auto old = it++; |
483 if (old->second && (bRemoveAll || old->second->IsInvalid())) { | 483 if (old->second && (bRemoveAll || old->second->IsInvalid())) { |
484 delete old->second; | 484 delete old->second; |
485 m_eventTargets.erase(old); | 485 m_eventTargets.erase(old); |
486 } | 486 } |
487 } | 487 } |
488 } | 488 } |
OLD | NEW |