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/fxfa/app/xfa_fwltheme.h" | 7 #include "xfa/fxfa/app/xfa_fwltheme.h" |
8 | 8 |
9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
10 #include "xfa/fgas/crt/fgas_codepage.h" | 10 #include "xfa/fgas/crt/fgas_codepage.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 uint32_t CXFA_FWLTheme::GetThemeID(IFWL_Widget* pWidget) { | 113 uint32_t CXFA_FWLTheme::GetThemeID(IFWL_Widget* pWidget) { |
114 return 0; | 114 return 0; |
115 } | 115 } |
116 | 116 |
117 uint32_t CXFA_FWLTheme::SetThemeID(IFWL_Widget* pWidget, | 117 uint32_t CXFA_FWLTheme::SetThemeID(IFWL_Widget* pWidget, |
118 uint32_t dwThemeID, | 118 uint32_t dwThemeID, |
119 FX_BOOL bChildren) { | 119 FX_BOOL bChildren) { |
120 return 0; | 120 return 0; |
121 } | 121 } |
122 | 122 |
| 123 FWL_Error CXFA_FWLTheme::GetThemeMatrix(IFWL_Widget* pWidget, |
| 124 CFX_Matrix& matrix) { |
| 125 return FWL_Error::Succeeded; |
| 126 } |
| 127 |
| 128 FWL_Error CXFA_FWLTheme::SetThemeMatrix(IFWL_Widget* pWidget, |
| 129 const CFX_Matrix& matrix) { |
| 130 return FWL_Error::Succeeded; |
| 131 } |
| 132 |
123 FX_BOOL CXFA_FWLTheme::DrawBackground(CFWL_ThemeBackground* pParams) { | 133 FX_BOOL CXFA_FWLTheme::DrawBackground(CFWL_ThemeBackground* pParams) { |
124 return GetTheme(pParams->m_pWidget)->DrawBackground(pParams); | 134 return GetTheme(pParams->m_pWidget)->DrawBackground(pParams); |
125 } | 135 } |
126 FX_BOOL CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) { | 136 FX_BOOL CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) { |
127 if (pParams->m_wsText.IsEmpty()) | 137 if (pParams->m_wsText.IsEmpty()) |
128 return FALSE; | 138 return FALSE; |
129 | 139 |
130 if (pParams->m_pWidget->GetClassID() == FWL_Type::MonthCalendar) { | 140 if (pParams->m_pWidget->GetClassID() == FWL_Type::MonthCalendar) { |
131 CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pParams->m_pWidget); | 141 CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pParams->m_pWidget); |
132 if (!pWidget) | 142 if (!pWidget) |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 } | 348 } |
339 if (!m_wsResource.IsEmpty()) | 349 if (!m_wsResource.IsEmpty()) |
340 return &m_wsResource; | 350 return &m_wsResource; |
341 } | 351 } |
342 } | 352 } |
343 return GetTheme(pThemePart->m_pWidget)->GetCapacity(pThemePart, dwCapacity); | 353 return GetTheme(pThemePart->m_pWidget)->GetCapacity(pThemePart, dwCapacity); |
344 } | 354 } |
345 FX_BOOL CXFA_FWLTheme::IsCustomizedLayout(IFWL_Widget* pWidget) { | 355 FX_BOOL CXFA_FWLTheme::IsCustomizedLayout(IFWL_Widget* pWidget) { |
346 return GetTheme(pWidget)->IsCustomizedLayout(pWidget); | 356 return GetTheme(pWidget)->IsCustomizedLayout(pWidget); |
347 } | 357 } |
| 358 |
| 359 FWL_Error CXFA_FWLTheme::GetPartRect(CFWL_ThemePart* pThemePart, |
| 360 CFX_RectF& rtPart) { |
| 361 return FWL_Error::Succeeded; |
| 362 } |
348 FWL_Error CXFA_FWLTheme::GetPartRect(CFWL_ThemePart* pThemePart) { | 363 FWL_Error CXFA_FWLTheme::GetPartRect(CFWL_ThemePart* pThemePart) { |
349 CFX_RectF rect; | 364 CFX_RectF rect; |
350 return GetTheme(pThemePart->m_pWidget)->GetPartRect(pThemePart, rect); | 365 return GetTheme(pThemePart->m_pWidget)->GetPartRect(pThemePart, rect); |
351 } | 366 } |
352 FX_BOOL CXFA_FWLTheme::IsInPart(CFWL_ThemePart* pThemePart, | 367 FX_BOOL CXFA_FWLTheme::IsInPart(CFWL_ThemePart* pThemePart, |
353 FX_FLOAT fx, | 368 FX_FLOAT fx, |
354 FX_FLOAT fy) { | 369 FX_FLOAT fy) { |
355 return GetTheme(pThemePart->m_pWidget)->IsInPart(pThemePart, fx, fy); | 370 return GetTheme(pThemePart->m_pWidget)->IsInPart(pThemePart, fx, fy); |
356 } | 371 } |
357 FX_BOOL CXFA_FWLTheme::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) { | 372 FX_BOOL CXFA_FWLTheme::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 } | 495 } |
481 } | 496 } |
482 CFX_Color crLine(cr); | 497 CFX_Color crLine(cr); |
483 pParams->m_pGraphics->SetStrokeColor(&crLine); | 498 pParams->m_pGraphics->SetStrokeColor(&crLine); |
484 pParams->m_pGraphics->SetLineWidth(fWidth); | 499 pParams->m_pGraphics->SetLineWidth(fWidth); |
485 pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix); | 500 pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix); |
486 return TRUE; | 501 return TRUE; |
487 } | 502 } |
488 return CFWL_EditTP::DrawBackground(pParams); | 503 return CFWL_EditTP::DrawBackground(pParams); |
489 } | 504 } |
OLD | NEW |