| 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_checkboxtp.h" | 7 #include "xfa/fwl/theme/cfwl_checkboxtp.h" |
| 8 | 8 |
| 9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
| 10 #include "xfa/fwl/basewidget/ifwl_checkbox.h" | 10 #include "xfa/fwl/basewidget/ifwl_checkbox.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 CFWL_CheckBoxTP::~CFWL_CheckBoxTP() { | 35 CFWL_CheckBoxTP::~CFWL_CheckBoxTP() { |
| 36 delete m_pThemeData; | 36 delete m_pThemeData; |
| 37 if (m_pCheckPath) { | 37 if (m_pCheckPath) { |
| 38 m_pCheckPath->Clear(); | 38 m_pCheckPath->Clear(); |
| 39 delete m_pCheckPath; | 39 delete m_pCheckPath; |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 | 42 |
| 43 FX_BOOL CFWL_CheckBoxTP::IsValidWidget(IFWL_Widget* pWidget) { | 43 bool CFWL_CheckBoxTP::IsValidWidget(IFWL_Widget* pWidget) { |
| 44 return pWidget && pWidget->GetClassID() == FWL_CLASSHASH_CheckBox; | 44 return pWidget && pWidget->GetClassID() == FWL_Type::CheckBox; |
| 45 } | 45 } |
| 46 |
| 46 uint32_t CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget, | 47 uint32_t CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget, |
| 47 uint32_t dwThemeID, | 48 uint32_t dwThemeID, |
| 48 FX_BOOL bChildren) { | 49 FX_BOOL bChildren) { |
| 49 if (m_pThemeData) { | 50 if (m_pThemeData) { |
| 50 SetThemeData(FWL_GetThemeColor(dwThemeID)); | 51 SetThemeData(FWL_GetThemeColor(dwThemeID)); |
| 51 } | 52 } |
| 52 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); | 53 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); |
| 53 } | 54 } |
| 54 FX_BOOL CFWL_CheckBoxTP::DrawText(CFWL_ThemeText* pParams) { | 55 FX_BOOL CFWL_CheckBoxTP::DrawText(CFWL_ThemeText* pParams) { |
| 55 if (!m_pTextOut) | 56 if (!m_pTextOut) |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 pt1.x + px2 * FX_BEZIER, pt1.y + py2 * FX_BEZIER, | 497 pt1.x + px2 * FX_BEZIER, pt1.y + py2 * FX_BEZIER, |
| 497 pt1.x, pt1.y); | 498 pt1.x, pt1.y); |
| 498 FX_FLOAT fScale = fCheckLen / kSignPath; | 499 FX_FLOAT fScale = fCheckLen / kSignPath; |
| 499 CFX_Matrix mt; | 500 CFX_Matrix mt; |
| 500 mt.Set(1, 0, 0, 1, 0, 0); | 501 mt.Set(1, 0, 0, 1, 0, 0); |
| 501 mt.Scale(fScale, fScale); | 502 mt.Scale(fScale, fScale); |
| 502 CFX_PathData* pData = m_pCheckPath->GetPathData(); | 503 CFX_PathData* pData = m_pCheckPath->GetPathData(); |
| 503 pData->Transform(&mt); | 504 pData->Transform(&mt); |
| 504 } | 505 } |
| 505 } | 506 } |
| OLD | NEW |