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 | 10 |
11 #include "xfa/fde/tto/fde_textout.h" | 11 #include "xfa/fde/tto/fde_textout.h" |
12 #include "xfa/fwl/core/cfwl_message.h" | 12 #include "xfa/fwl/core/cfwl_message.h" |
13 #include "xfa/fwl/core/cfwl_themebackground.h" | 13 #include "xfa/fwl/core/cfwl_themebackground.h" |
14 #include "xfa/fwl/core/cfwl_themepart.h" | 14 #include "xfa/fwl/core/cfwl_themepart.h" |
15 #include "xfa/fwl/core/cfwl_themetext.h" | 15 #include "xfa/fwl/core/cfwl_themetext.h" |
16 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 16 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
17 #include "xfa/fwl/core/fwl_noteimp.h" | 17 #include "xfa/fwl/core/fwl_noteimp.h" |
18 #include "xfa/fwl/core/ifwl_app.h" | 18 #include "xfa/fwl/core/ifwl_app.h" |
19 #include "xfa/fwl/core/ifwl_combobox.h" | 19 #include "xfa/fwl/core/ifwl_combobox.h" |
20 #include "xfa/fwl/core/ifwl_form.h" | 20 #include "xfa/fwl/core/ifwl_form.h" |
21 #include "xfa/fwl/core/ifwl_themeprovider.h" | 21 #include "xfa/fwl/core/ifwl_themeprovider.h" |
22 #include "xfa/fwl/core/ifwl_widget.h" | 22 #include "xfa/fwl/core/ifwl_widget.h" |
23 #include "xfa/fxfa/xfa_ffapp.h" | 23 #include "xfa/fxfa/xfa_ffapp.h" |
24 | 24 |
25 #define FWL_STYLEEXT_MNU_Vert (1L << 0) | 25 #define FWL_STYLEEXT_MNU_Vert (1L << 0) |
26 | 26 |
27 IFWL_Widget::IFWL_Widget(const IFWL_App* app, | 27 IFWL_Widget::IFWL_Widget(const IFWL_App* app, |
28 const CFWL_WidgetImpProperties& properties, | 28 std::unique_ptr<CFWL_WidgetProperties> properties, |
29 IFWL_Widget* pOuter) | 29 IFWL_Widget* pOuter) |
30 : m_pOwnerApp(app), | 30 : m_pOwnerApp(app), |
31 m_pWidgetMgr(app->GetWidgetMgr()), | 31 m_pWidgetMgr(app->GetWidgetMgr()), |
32 m_pProperties(new CFWL_WidgetImpProperties(properties)), | 32 m_pProperties(std::move(properties)), |
33 m_pOuter(pOuter), | 33 m_pOuter(pOuter), |
34 m_pLayoutItem(nullptr), | 34 m_pLayoutItem(nullptr), |
35 m_pAssociate(nullptr), | 35 m_pAssociate(nullptr), |
36 m_iLock(0), | 36 m_iLock(0), |
37 m_nEventKey(0), | 37 m_nEventKey(0), |
38 m_pDelegate(nullptr) { | 38 m_pDelegate(nullptr) { |
39 ASSERT(m_pWidgetMgr); | 39 ASSERT(m_pWidgetMgr); |
40 | 40 |
41 IFWL_Widget* pParent = m_pProperties->m_pParent; | 41 IFWL_Widget* pParent = m_pProperties->m_pParent; |
42 m_pWidgetMgr->InsertWidget(pParent, this); | 42 m_pWidgetMgr->InsertWidget(pParent, this); |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 } | 893 } |
894 default: | 894 default: |
895 break; | 895 break; |
896 } | 896 } |
897 } | 897 } |
898 | 898 |
899 void IFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} | 899 void IFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} |
900 | 900 |
901 void IFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, | 901 void IFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, |
902 const CFX_Matrix* pMatrix) {} | 902 const CFX_Matrix* pMatrix) {} |
OLD | NEW |