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 "../../../foxitlib.h" | 7 #include "xfa/src/foxitlib.h" |
8 CFWL_BarcodeTP::CFWL_BarcodeTP() {} | 8 CFWL_BarcodeTP::CFWL_BarcodeTP() {} |
9 CFWL_BarcodeTP::~CFWL_BarcodeTP() {} | 9 CFWL_BarcodeTP::~CFWL_BarcodeTP() {} |
10 FX_BOOL CFWL_BarcodeTP::IsValidWidget(IFWL_Widget* pWidget) { | 10 FX_BOOL CFWL_BarcodeTP::IsValidWidget(IFWL_Widget* pWidget) { |
11 if (!pWidget) | 11 if (!pWidget) |
12 return FALSE; | 12 return FALSE; |
13 return pWidget->GetClassID() == FWL_CLASSHASH_Barcode; | 13 return pWidget->GetClassID() == FWL_CLASSHASH_Barcode; |
14 } | 14 } |
15 FX_BOOL CFWL_BarcodeTP::DrawBackground(CFWL_ThemeBackground* pParams) { | 15 FX_BOOL CFWL_BarcodeTP::DrawBackground(CFWL_ThemeBackground* pParams) { |
16 if (!pParams) | 16 if (!pParams) |
17 return FALSE; | 17 return FALSE; |
18 switch (pParams->m_iPart) { | 18 switch (pParams->m_iPart) { |
19 case FWL_PART_BCD_Border: { | 19 case FWL_PART_BCD_Border: { |
20 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); | 20 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); |
21 break; | 21 break; |
22 } | 22 } |
23 case FWL_PART_BCD_Edge: { | 23 case FWL_PART_BCD_Edge: { |
24 DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(), | 24 DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(), |
25 &pParams->m_rtPart, &pParams->m_matrix); | 25 &pParams->m_rtPart, &pParams->m_matrix); |
26 break; | 26 break; |
27 } | 27 } |
28 case FWL_PART_BCD_Background: { | 28 case FWL_PART_BCD_Background: { |
29 FillBackground(pParams->m_pGraphics, &pParams->m_rtPart, | 29 FillBackground(pParams->m_pGraphics, &pParams->m_rtPart, |
30 &pParams->m_matrix); | 30 &pParams->m_matrix); |
31 break; | 31 break; |
32 } | 32 } |
33 default: {} | 33 default: {} |
34 } | 34 } |
35 return TRUE; | 35 return TRUE; |
36 } | 36 } |
OLD | NEW |