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/src/foxitlib.h" | 7 #include "xfa/src/foxitlib.h" |
8 #include "xfa/src/fwl/src/core/include/fwl_targetimp.h" | 8 #include "xfa/src/fwl/src/core/include/fwl_targetimp.h" |
9 #include "xfa/src/fwl/src/core/include/fwl_noteimp.h" | 9 #include "xfa/src/fwl/src/core/include/fwl_noteimp.h" |
10 #include "xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h" | 10 #include "xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 CFWL_WidgetMgr::CFWL_WidgetMgr(IFWL_AdapterNative* pAdapterNative) | 27 CFWL_WidgetMgr::CFWL_WidgetMgr(IFWL_AdapterNative* pAdapterNative) |
28 : m_dwCapability(0) { | 28 : m_dwCapability(0) { |
29 m_pDelegate = new CFWL_WidgetMgrDelegate(this); | 29 m_pDelegate = new CFWL_WidgetMgrDelegate(this); |
30 m_pAdapter = pAdapterNative->GetWidgetMgr(m_pDelegate); | 30 m_pAdapter = pAdapterNative->GetWidgetMgr(m_pDelegate); |
31 FXSYS_assert(m_pAdapter); | 31 FXSYS_assert(m_pAdapter); |
32 CFWL_WidgetMgrItem* pRoot = new CFWL_WidgetMgrItem; | 32 CFWL_WidgetMgrItem* pRoot = new CFWL_WidgetMgrItem; |
33 m_mapWidgetItem.SetAt(NULL, pRoot); | 33 m_mapWidgetItem.SetAt(NULL, pRoot); |
34 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) | 34 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) |
35 m_rtScreen.Reset(); | 35 m_rtScreen.Reset(); |
36 IFWL_AdapterMonitorMgr* pMonitorMgr = pAdapterNative->GetMonitorMgr(); | |
37 if (pMonitorMgr) { | |
38 FWL_HMONITOR monitor = pMonitorMgr->GetCurrentMonitor(); | |
39 if (monitor) { | |
40 pMonitorMgr->GetMonitorSize(monitor, m_rtScreen.width, m_rtScreen.height); | |
41 } | |
42 } | |
43 #endif | 36 #endif |
44 } | 37 } |
45 CFWL_WidgetMgr::~CFWL_WidgetMgr() { | 38 CFWL_WidgetMgr::~CFWL_WidgetMgr() { |
46 FX_POSITION ps = m_mapWidgetItem.GetStartPosition(); | 39 FX_POSITION ps = m_mapWidgetItem.GetStartPosition(); |
47 while (ps) { | 40 while (ps) { |
48 void* pWidget; | 41 void* pWidget; |
49 CFWL_WidgetMgrItem* pItem; | 42 CFWL_WidgetMgrItem* pItem; |
50 m_mapWidgetItem.GetNextAssoc(ps, pWidget, (void*&)pItem); | 43 m_mapWidgetItem.GetNextAssoc(ps, pWidget, (void*&)pItem); |
51 delete pItem; | 44 delete pItem; |
52 } | 45 } |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 if (child == find) { | 1059 if (child == find) { |
1067 return TRUE; | 1060 return TRUE; |
1068 } | 1061 } |
1069 if (FWL_WidgetIsChild(child, find)) { | 1062 if (FWL_WidgetIsChild(child, find)) { |
1070 return TRUE; | 1063 return TRUE; |
1071 } | 1064 } |
1072 child = FWL_GetWidgetMgr()->GetWidget(child, FWL_WGTRELATION_NextSibling); | 1065 child = FWL_GetWidgetMgr()->GetWidget(child, FWL_WGTRELATION_NextSibling); |
1073 } | 1066 } |
1074 return FALSE; | 1067 return FALSE; |
1075 } | 1068 } |
OLD | NEW |