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/fwl_panelimp.h" | 7 #include "xfa/fwl/core/fwl_panelimp.h" |
8 | 8 |
9 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" | 9 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" |
10 #include "xfa/fwl/core/fwl_noteimp.h" | 10 #include "xfa/fwl/core/fwl_noteimp.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 | 36 |
37 CFWL_PanelImp::CFWL_PanelImp(const CFWL_WidgetImpProperties& properties, | 37 CFWL_PanelImp::CFWL_PanelImp(const CFWL_WidgetImpProperties& properties, |
38 IFWL_Widget* pOuter) | 38 IFWL_Widget* pOuter) |
39 : CFWL_WidgetImp(properties, pOuter), m_pContent(nullptr) {} | 39 : CFWL_WidgetImp(properties, pOuter), m_pContent(nullptr) {} |
40 CFWL_PanelImp::~CFWL_PanelImp() {} | 40 CFWL_PanelImp::~CFWL_PanelImp() {} |
41 FWL_ERR CFWL_PanelImp::GetClassName(CFX_WideString& wsClass) const { | 41 FWL_ERR CFWL_PanelImp::GetClassName(CFX_WideString& wsClass) const { |
42 wsClass = FWL_CLASS_Panel; | 42 wsClass = FWL_CLASS_Panel; |
43 return FWL_ERR_Succeeded; | 43 return FWL_ERR_Succeeded; |
44 } | 44 } |
45 FX_DWORD CFWL_PanelImp::GetClassID() const { | 45 uint32_t CFWL_PanelImp::GetClassID() const { |
46 return FWL_CLASSHASH_Panel; | 46 return FWL_CLASSHASH_Panel; |
47 } | 47 } |
48 FWL_ERR CFWL_PanelImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { | 48 FWL_ERR CFWL_PanelImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { |
49 if (bAutoSize) { | 49 if (bAutoSize) { |
50 if (m_pContent) { | 50 if (m_pContent) { |
51 m_pContent->GetWidgetRect(rect, TRUE); | 51 m_pContent->GetWidgetRect(rect, TRUE); |
52 } | 52 } |
53 } else { | 53 } else { |
54 rect = m_pProperties->m_rtWidget; | 54 rect = m_pProperties->m_rtWidget; |
55 } | 55 } |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 IFWL_CustomPanel::IFWL_CustomPanel() {} | 146 IFWL_CustomPanel::IFWL_CustomPanel() {} |
147 IFWL_Content* IFWL_CustomPanel::GetContent() { | 147 IFWL_Content* IFWL_CustomPanel::GetContent() { |
148 return static_cast<CFWL_CustomPanelImp*>(GetImpl())->GetContent(); | 148 return static_cast<CFWL_CustomPanelImp*>(GetImpl())->GetContent(); |
149 } | 149 } |
150 FWL_ERR IFWL_CustomPanel::SetContent(IFWL_Content* pContent) { | 150 FWL_ERR IFWL_CustomPanel::SetContent(IFWL_Content* pContent) { |
151 return static_cast<CFWL_CustomPanelImp*>(GetImpl())->SetContent(pContent); | 151 return static_cast<CFWL_CustomPanelImp*>(GetImpl())->SetContent(pContent); |
152 } | 152 } |
153 FWL_ERR IFWL_CustomPanel::SetProxy(IFWL_Proxy* pProxy) { | 153 FWL_ERR IFWL_CustomPanel::SetProxy(IFWL_Proxy* pProxy) { |
154 return static_cast<CFWL_CustomPanelImp*>(GetImpl())->SetProxy(pProxy); | 154 return static_cast<CFWL_CustomPanelImp*>(GetImpl())->SetProxy(pProxy); |
155 } | 155 } |
OLD | NEW |