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_widget.h" | 7 #include "xfa/fwl/core/cfwl_widget.h" |
8 | 8 |
9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
10 #include "xfa/fwl/core/cfwl_themetext.h" | 10 #include "xfa/fwl/core/cfwl_themetext.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 return m_pIface->HitTest(fx, fy); | 120 return m_pIface->HitTest(fx, fy); |
121 } | 121 } |
122 | 122 |
123 FWL_Error CFWL_Widget::DrawWidget(CFX_Graphics* pGraphics, | 123 FWL_Error CFWL_Widget::DrawWidget(CFX_Graphics* pGraphics, |
124 const CFX_Matrix* pMatrix) { | 124 const CFX_Matrix* pMatrix) { |
125 if (!m_pIface) | 125 if (!m_pIface) |
126 return FWL_Error::Indefinite; | 126 return FWL_Error::Indefinite; |
127 return m_pIface->DrawWidget(pGraphics, pMatrix); | 127 return m_pIface->DrawWidget(pGraphics, pMatrix); |
128 } | 128 } |
129 | 129 |
130 IFWL_WidgetDelegate* CFWL_Widget::GetCurrentDelegate() { | 130 std::unique_ptr<IFWL_WidgetDelegate> CFWL_Widget::ReleaseDelegate() { |
131 return m_pIface ? m_pIface->GetCurrentDelegate() : nullptr; | 131 return m_pIface ? m_pIface->ReleaseDelegate() : nullptr; |
132 } | 132 } |
133 | 133 |
134 void CFWL_Widget::SetCurrentDelegate(IFWL_WidgetDelegate* pDelegate) { | 134 void CFWL_Widget::SetDelegate(std::unique_ptr<IFWL_WidgetDelegate> pDelegate) { |
135 if (m_pIface) | 135 if (m_pIface) |
136 m_pIface->SetCurrentDelegate(pDelegate); | 136 m_pIface->SetDelegate(std::move(pDelegate)); |
137 } | 137 } |
OLD | NEW |