| 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 20 matching lines...) Expand all Loading... |
| 31 const FX_WCHAR* const g_FWLTheme_CalFonts[] = { | 31 const FX_WCHAR* const g_FWLTheme_CalFonts[] = { |
| 32 L"Arial", L"Courier New", L"DejaVu Sans", | 32 L"Arial", L"Courier New", L"DejaVu Sans", |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace | 35 } // namespace |
| 36 | 36 |
| 37 CXFA_FFWidget* XFA_ThemeGetOuterWidget(CFWL_Widget* pWidget) { | 37 CXFA_FFWidget* XFA_ThemeGetOuterWidget(CFWL_Widget* pWidget) { |
| 38 CFWL_Widget* pOuter = pWidget; | 38 CFWL_Widget* pOuter = pWidget; |
| 39 while (pOuter && pOuter->GetOuter()) | 39 while (pOuter && pOuter->GetOuter()) |
| 40 pOuter = pOuter->GetOuter(); | 40 pOuter = pOuter->GetOuter(); |
| 41 | 41 return pOuter ? pOuter->GetLayoutItem() : nullptr; |
| 42 return pOuter ? static_cast<CXFA_FFWidget*>(pOuter->GetLayoutItem()) | |
| 43 : nullptr; | |
| 44 } | 42 } |
| 45 | 43 |
| 46 CXFA_FWLTheme::CXFA_FWLTheme(CXFA_FFApp* pApp) | 44 CXFA_FWLTheme::CXFA_FWLTheme(CXFA_FFApp* pApp) |
| 47 : m_pCheckBoxTP(new CFWL_CheckBoxTP), | 45 : m_pCheckBoxTP(new CFWL_CheckBoxTP), |
| 48 m_pListBoxTP(new CFWL_ListBoxTP), | 46 m_pListBoxTP(new CFWL_ListBoxTP), |
| 49 m_pPictureBoxTP(new CFWL_PictureBoxTP), | 47 m_pPictureBoxTP(new CFWL_PictureBoxTP), |
| 50 m_pSrollBarTP(new CFWL_ScrollBarTP), | 48 m_pSrollBarTP(new CFWL_ScrollBarTP), |
| 51 m_pEditTP(new CFWL_EditTP), | 49 m_pEditTP(new CFWL_EditTP), |
| 52 m_pComboBoxTP(new CFWL_ComboBoxTP), | 50 m_pComboBoxTP(new CFWL_ComboBoxTP), |
| 53 m_pMonthCalendarTP(new CFWL_MonthCalendarTP), | 51 m_pMonthCalendarTP(new CFWL_MonthCalendarTP), |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 case FWL_Type::PushButton: | 361 case FWL_Type::PushButton: |
| 364 return m_pPushButtonTP.get(); | 362 return m_pPushButtonTP.get(); |
| 365 case FWL_Type::Caret: | 363 case FWL_Type::Caret: |
| 366 return m_pCaretTP.get(); | 364 return m_pCaretTP.get(); |
| 367 case FWL_Type::Barcode: | 365 case FWL_Type::Barcode: |
| 368 return m_pBarcodeTP.get(); | 366 return m_pBarcodeTP.get(); |
| 369 default: | 367 default: |
| 370 return nullptr; | 368 return nullptr; |
| 371 } | 369 } |
| 372 } | 370 } |
| OLD | NEW |