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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 delete m_pSrollBarTP; | 70 delete m_pSrollBarTP; |
71 delete m_pEditTP; | 71 delete m_pEditTP; |
72 delete m_pComboBoxTP; | 72 delete m_pComboBoxTP; |
73 delete m_pMonthCalendarTP; | 73 delete m_pMonthCalendarTP; |
74 delete m_pDateTimePickerTP; | 74 delete m_pDateTimePickerTP; |
75 delete m_pPushButtonTP; | 75 delete m_pPushButtonTP; |
76 delete m_pCaretTP; | 76 delete m_pCaretTP; |
77 delete m_pBarcodeTP; | 77 delete m_pBarcodeTP; |
78 } | 78 } |
79 FWL_ERR CXFA_FWLTheme::Initialize() { | 79 FWL_ERR CXFA_FWLTheme::Initialize() { |
80 m_pTextOut = IFDE_TextOut::Create(); | 80 m_pTextOut = new CFDE_TextOut; |
81 for (size_t i = 0; !m_pCalendarFont && i < FX_ArraySize(g_FWLTheme_CalFonts); | 81 for (size_t i = 0; !m_pCalendarFont && i < FX_ArraySize(g_FWLTheme_CalFonts); |
82 ++i) { | 82 ++i) { |
83 m_pCalendarFont = IFX_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0, | 83 m_pCalendarFont = IFX_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0, |
84 m_pApp->GetFDEFontMgr()); | 84 m_pApp->GetFDEFontMgr()); |
85 } | 85 } |
86 if (!m_pCalendarFont) { | 86 if (!m_pCalendarFont) { |
87 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 87 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
88 m_pCalendarFont = m_pApp->GetFDEFontMgr()->GetDefFontByCodePage( | 88 m_pCalendarFont = m_pApp->GetFDEFontMgr()->GetDefFontByCodePage( |
89 FX_CODEPAGE_MSWin_WesternEuropean, 0, NULL); | 89 FX_CODEPAGE_MSWin_WesternEuropean, 0, NULL); |
90 #else | 90 #else |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 } | 484 } |
485 } | 485 } |
486 CFX_Color crLine(cr); | 486 CFX_Color crLine(cr); |
487 pParams->m_pGraphics->SetStrokeColor(&crLine); | 487 pParams->m_pGraphics->SetStrokeColor(&crLine); |
488 pParams->m_pGraphics->SetLineWidth(fWidth); | 488 pParams->m_pGraphics->SetLineWidth(fWidth); |
489 pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix); | 489 pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix); |
490 return TRUE; | 490 return TRUE; |
491 } | 491 } |
492 return CFWL_EditTP::DrawBackground(pParams); | 492 return CFWL_EditTP::DrawBackground(pParams); |
493 } | 493 } |
OLD | NEW |