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_widgetimp.h" | 7 #include "xfa/fwl/core/fwl_widgetimp.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 FWL_Error IFWL_Widget::DrawWidget(CFX_Graphics* pGraphics, | 149 FWL_Error IFWL_Widget::DrawWidget(CFX_Graphics* pGraphics, |
150 const CFX_Matrix* pMatrix) { | 150 const CFX_Matrix* pMatrix) { |
151 return GetImpl()->DrawWidget(pGraphics, pMatrix); | 151 return GetImpl()->DrawWidget(pGraphics, pMatrix); |
152 } | 152 } |
153 IFWL_ThemeProvider* IFWL_Widget::GetThemeProvider() { | 153 IFWL_ThemeProvider* IFWL_Widget::GetThemeProvider() { |
154 return GetImpl()->GetThemeProvider(); | 154 return GetImpl()->GetThemeProvider(); |
155 } | 155 } |
156 FWL_Error IFWL_Widget::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { | 156 FWL_Error IFWL_Widget::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { |
157 return GetImpl()->SetThemeProvider(pThemeProvider); | 157 return GetImpl()->SetThemeProvider(pThemeProvider); |
158 } | 158 } |
159 FWL_Error IFWL_Widget::SetDataProvider(IFWL_DataProvider* pDataProvider) { | |
160 return GetImpl()->SetDataProvider(pDataProvider); | |
161 } | |
162 IFWL_WidgetDelegate* IFWL_Widget::SetDelegate(IFWL_WidgetDelegate* pDelegate) { | 159 IFWL_WidgetDelegate* IFWL_Widget::SetDelegate(IFWL_WidgetDelegate* pDelegate) { |
163 return GetImpl()->SetDelegate(pDelegate); | 160 return GetImpl()->SetDelegate(pDelegate); |
164 } | 161 } |
165 IFWL_App* IFWL_Widget::GetOwnerApp() const { | 162 IFWL_App* IFWL_Widget::GetOwnerApp() const { |
166 return GetImpl()->GetOwnerApp(); | 163 return GetImpl()->GetOwnerApp(); |
167 } | 164 } |
168 CFX_SizeF IFWL_Widget::GetOffsetFromParent(IFWL_Widget* pParent) { | 165 CFX_SizeF IFWL_Widget::GetOffsetFromParent(IFWL_Widget* pParent) { |
169 return GetImpl()->GetOffsetFromParent(pParent); | 166 return GetImpl()->GetOffsetFromParent(pParent); |
170 } | 167 } |
171 | 168 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 const CFX_Matrix* pMatrix) { | 464 const CFX_Matrix* pMatrix) { |
468 return FWL_Error::Indefinite; | 465 return FWL_Error::Indefinite; |
469 } | 466 } |
470 IFWL_ThemeProvider* CFWL_WidgetImp::GetThemeProvider() { | 467 IFWL_ThemeProvider* CFWL_WidgetImp::GetThemeProvider() { |
471 return m_pProperties->m_pThemeProvider; | 468 return m_pProperties->m_pThemeProvider; |
472 } | 469 } |
473 FWL_Error CFWL_WidgetImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { | 470 FWL_Error CFWL_WidgetImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { |
474 m_pProperties->m_pThemeProvider = pThemeProvider; | 471 m_pProperties->m_pThemeProvider = pThemeProvider; |
475 return FWL_Error::Succeeded; | 472 return FWL_Error::Succeeded; |
476 } | 473 } |
477 FWL_Error CFWL_WidgetImp::SetDataProvider(IFWL_DataProvider* pDataProvider) { | |
478 m_pProperties->m_pDataProvider = pDataProvider; | |
479 return FWL_Error::Succeeded; | |
480 } | |
481 IFWL_WidgetDelegate* CFWL_WidgetImp::SetDelegate( | 474 IFWL_WidgetDelegate* CFWL_WidgetImp::SetDelegate( |
482 IFWL_WidgetDelegate* pDelegate) { | 475 IFWL_WidgetDelegate* pDelegate) { |
483 if (!m_pCurDelegate) { | 476 if (!m_pCurDelegate) { |
484 m_pCurDelegate = m_pDelegate; | 477 m_pCurDelegate = m_pDelegate; |
485 } | 478 } |
486 if (!pDelegate) { | 479 if (!pDelegate) { |
487 return m_pCurDelegate; | 480 return m_pCurDelegate; |
488 } | 481 } |
489 IFWL_WidgetDelegate* pOldDelegate = m_pCurDelegate; | 482 IFWL_WidgetDelegate* pOldDelegate = m_pCurDelegate; |
490 m_pCurDelegate = pDelegate; | 483 m_pCurDelegate = pDelegate; |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 } | 1032 } |
1040 } | 1033 } |
1041 | 1034 |
1042 void CFWL_WidgetImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {} | 1035 void CFWL_WidgetImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {} |
1043 | 1036 |
1044 void CFWL_WidgetImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, | 1037 void CFWL_WidgetImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, |
1045 const CFX_Matrix* pMatrix) { | 1038 const CFX_Matrix* pMatrix) { |
1046 CFWL_EvtDraw evt; | 1039 CFWL_EvtDraw evt; |
1047 evt.m_pGraphics = pGraphics; | 1040 evt.m_pGraphics = pGraphics; |
1048 } | 1041 } |
OLD | NEW |