| 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/theme/cfwl_widgettp.h" | 7 #include "xfa/fwl/theme/cfwl_widgettp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 return m_pFDEFont; | 199 return m_pFDEFont; |
| 200 } | 200 } |
| 201 CFWL_WidgetTP::CFWL_WidgetTP() | 201 CFWL_WidgetTP::CFWL_WidgetTP() |
| 202 : m_dwRefCount(1), m_pTextOut(NULL), m_pFDEFont(NULL), m_dwThemeID(0) {} | 202 : m_dwRefCount(1), m_pTextOut(NULL), m_pFDEFont(NULL), m_dwThemeID(0) {} |
| 203 FX_ERR CFWL_WidgetTP::InitTTO() { | 203 FX_ERR CFWL_WidgetTP::InitTTO() { |
| 204 if (m_pTextOut) { | 204 if (m_pTextOut) { |
| 205 return FWL_ERR_Succeeded; | 205 return FWL_ERR_Succeeded; |
| 206 } | 206 } |
| 207 m_pFDEFont = | 207 m_pFDEFont = |
| 208 CFWL_FontManager::GetInstance()->FindFont(FX_WSTRC(L"Helvetica"), 0, 0); | 208 CFWL_FontManager::GetInstance()->FindFont(FX_WSTRC(L"Helvetica"), 0, 0); |
| 209 m_pTextOut = IFDE_TextOut::Create(); | 209 m_pTextOut = new CFDE_TextOut; |
| 210 m_pTextOut->SetFont(m_pFDEFont); | 210 m_pTextOut->SetFont(m_pFDEFont); |
| 211 m_pTextOut->SetFontSize(FWLTHEME_CAPACITY_FontSize); | 211 m_pTextOut->SetFontSize(FWLTHEME_CAPACITY_FontSize); |
| 212 m_pTextOut->SetTextColor(FWLTHEME_CAPACITY_TextColor); | 212 m_pTextOut->SetTextColor(FWLTHEME_CAPACITY_TextColor); |
| 213 m_pTextOut->SetEllipsisString(L"..."); | 213 m_pTextOut->SetEllipsisString(L"..."); |
| 214 return FWL_ERR_Succeeded; | 214 return FWL_ERR_Succeeded; |
| 215 } | 215 } |
| 216 FX_ERR CFWL_WidgetTP::FinalizeTTO() { | 216 FX_ERR CFWL_WidgetTP::FinalizeTTO() { |
| 217 if (m_pTextOut) { | 217 if (m_pTextOut) { |
| 218 m_pTextOut->Release(); | 218 m_pTextOut->Release(); |
| 219 m_pTextOut = NULL; | 219 m_pTextOut = NULL; |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 m_pColorData->clrEnd[0] = ArgbEncode(255, 175, 204, 251); | 793 m_pColorData->clrEnd[0] = ArgbEncode(255, 175, 204, 251); |
| 794 m_pColorData->clrEnd[1] = ArgbEncode(255, 185, 218, 251); | 794 m_pColorData->clrEnd[1] = ArgbEncode(255, 185, 218, 251); |
| 795 m_pColorData->clrEnd[2] = ArgbEncode(255, 210, 222, 235); | 795 m_pColorData->clrEnd[2] = ArgbEncode(255, 210, 222, 235); |
| 796 m_pColorData->clrEnd[3] = ArgbEncode(255, 243, 241, 236); | 796 m_pColorData->clrEnd[3] = ArgbEncode(255, 243, 241, 236); |
| 797 m_pColorData->clrSign[0] = ArgbEncode(255, 77, 97, 133); | 797 m_pColorData->clrSign[0] = ArgbEncode(255, 77, 97, 133); |
| 798 m_pColorData->clrSign[1] = ArgbEncode(255, 77, 97, 133); | 798 m_pColorData->clrSign[1] = ArgbEncode(255, 77, 97, 133); |
| 799 m_pColorData->clrSign[2] = ArgbEncode(255, 77, 97, 133); | 799 m_pColorData->clrSign[2] = ArgbEncode(255, 77, 97, 133); |
| 800 m_pColorData->clrSign[3] = ArgbEncode(255, 128, 128, 128); | 800 m_pColorData->clrSign[3] = ArgbEncode(255, 128, 128, 128); |
| 801 } | 801 } |
| 802 } | 802 } |
| OLD | NEW |