| 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" |
| 11 #include "xfa/fgas/font/fgas_gefont.h" |
| 11 #include "xfa/fwl/basewidget/ifwl_barcode.h" | 12 #include "xfa/fwl/basewidget/ifwl_barcode.h" |
| 12 #include "xfa/fwl/basewidget/ifwl_caret.h" | 13 #include "xfa/fwl/basewidget/ifwl_caret.h" |
| 13 #include "xfa/fwl/basewidget/ifwl_checkbox.h" | 14 #include "xfa/fwl/basewidget/ifwl_checkbox.h" |
| 14 #include "xfa/fwl/basewidget/ifwl_combobox.h" | 15 #include "xfa/fwl/basewidget/ifwl_combobox.h" |
| 15 #include "xfa/fwl/basewidget/ifwl_datetimepicker.h" | 16 #include "xfa/fwl/basewidget/ifwl_datetimepicker.h" |
| 16 #include "xfa/fwl/basewidget/ifwl_edit.h" | 17 #include "xfa/fwl/basewidget/ifwl_edit.h" |
| 17 #include "xfa/fwl/basewidget/ifwl_listbox.h" | 18 #include "xfa/fwl/basewidget/ifwl_listbox.h" |
| 18 #include "xfa/fwl/basewidget/ifwl_monthcalendar.h" | 19 #include "xfa/fwl/basewidget/ifwl_monthcalendar.h" |
| 19 #include "xfa/fwl/basewidget/ifwl_picturebox.h" | 20 #include "xfa/fwl/basewidget/ifwl_picturebox.h" |
| 20 #include "xfa/fwl/basewidget/ifwl_pushbutton.h" | 21 #include "xfa/fwl/basewidget/ifwl_pushbutton.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 delete m_pMonthCalendarTP; | 72 delete m_pMonthCalendarTP; |
| 72 delete m_pDateTimePickerTP; | 73 delete m_pDateTimePickerTP; |
| 73 delete m_pPushButtonTP; | 74 delete m_pPushButtonTP; |
| 74 delete m_pCaretTP; | 75 delete m_pCaretTP; |
| 75 delete m_pBarcodeTP; | 76 delete m_pBarcodeTP; |
| 76 } | 77 } |
| 77 FWL_Error CXFA_FWLTheme::Initialize() { | 78 FWL_Error CXFA_FWLTheme::Initialize() { |
| 78 m_pTextOut.reset(new CFDE_TextOut); | 79 m_pTextOut.reset(new CFDE_TextOut); |
| 79 for (size_t i = 0; !m_pCalendarFont && i < FX_ArraySize(g_FWLTheme_CalFonts); | 80 for (size_t i = 0; !m_pCalendarFont && i < FX_ArraySize(g_FWLTheme_CalFonts); |
| 80 ++i) { | 81 ++i) { |
| 81 m_pCalendarFont = IFGAS_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0, | 82 m_pCalendarFont = CFGAS_GEFont::LoadFont(g_FWLTheme_CalFonts[i], 0, 0, |
| 82 m_pApp->GetFDEFontMgr()); | 83 m_pApp->GetFDEFontMgr()); |
| 83 } | 84 } |
| 84 if (!m_pCalendarFont) { | 85 if (!m_pCalendarFont) { |
| 85 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 86 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 86 m_pCalendarFont = m_pApp->GetFDEFontMgr()->GetDefFontByCodePage( | 87 m_pCalendarFont = m_pApp->GetFDEFontMgr()->GetDefFontByCodePage( |
| 87 FX_CODEPAGE_MSWin_WesternEuropean, 0, NULL); | 88 FX_CODEPAGE_MSWin_WesternEuropean, 0, NULL); |
| 88 #else | 89 #else |
| 89 m_pCalendarFont = m_pApp->GetFDEFontMgr()->GetFontByCodePage( | 90 m_pCalendarFont = m_pApp->GetFDEFontMgr()->GetFontByCodePage( |
| 90 FX_CODEPAGE_MSWin_WesternEuropean, 0, NULL); | 91 FX_CODEPAGE_MSWin_WesternEuropean, 0, NULL); |
| 91 #endif | 92 #endif |
| 92 } | 93 } |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 } | 480 } |
| 480 } | 481 } |
| 481 CFX_Color crLine(cr); | 482 CFX_Color crLine(cr); |
| 482 pParams->m_pGraphics->SetStrokeColor(&crLine); | 483 pParams->m_pGraphics->SetStrokeColor(&crLine); |
| 483 pParams->m_pGraphics->SetLineWidth(fWidth); | 484 pParams->m_pGraphics->SetLineWidth(fWidth); |
| 484 pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix); | 485 pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix); |
| 485 return TRUE; | 486 return TRUE; |
| 486 } | 487 } |
| 487 return CFWL_EditTP::DrawBackground(pParams); | 488 return CFWL_EditTP::DrawBackground(pParams); |
| 488 } | 489 } |
| OLD | NEW |