| 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_comboboxtp.h" | 7 #include "xfa/fwl/theme/cfwl_comboboxtp.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/basewidget/ifwl_combobox.h" | 9 #include "xfa/fwl/basewidget/ifwl_combobox.h" |
| 10 #include "xfa/fwl/core/cfwl_themebackground.h" | 10 #include "xfa/fwl/core/cfwl_themebackground.h" |
| 11 #include "xfa/fwl/core/ifwl_themeprovider.h" | 11 #include "xfa/fwl/core/ifwl_themeprovider.h" |
| 12 #include "xfa/fwl/core/ifwl_widget.h" | 12 #include "xfa/fwl/core/ifwl_widget.h" |
| 13 #include "xfa/fxgraphics/cfx_color.h" | 13 #include "xfa/fxgraphics/cfx_color.h" |
| 14 #include "xfa/fxgraphics/cfx_path.h" | 14 #include "xfa/fxgraphics/cfx_path.h" |
| 15 | 15 |
| 16 #define FWLTHEME_CAPACITY_ComboFormHandler 8.0f | 16 #define FWLTHEME_CAPACITY_ComboFormHandler 8.0f |
| 17 | 17 |
| 18 CFWL_ComboBoxTP::CFWL_ComboBoxTP() { | 18 CFWL_ComboBoxTP::CFWL_ComboBoxTP() { |
| 19 m_dwThemeID = 0; | 19 m_dwThemeID = 0; |
| 20 } | 20 } |
| 21 CFWL_ComboBoxTP::~CFWL_ComboBoxTP() {} | 21 CFWL_ComboBoxTP::~CFWL_ComboBoxTP() {} |
| 22 FX_BOOL CFWL_ComboBoxTP::IsValidWidget(IFWL_Widget* pWidget) { | 22 FX_BOOL CFWL_ComboBoxTP::IsValidWidget(IFWL_Widget* pWidget) { |
| 23 if (!pWidget) | 23 if (!pWidget) |
| 24 return FALSE; | 24 return FALSE; |
| 25 return pWidget->GetClassID() == FWL_CLASSHASH_ComboBox; | 25 return pWidget->GetClassID() == FWL_Type::ComboBox; |
| 26 } | 26 } |
| 27 FX_BOOL CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { | 27 FX_BOOL CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { |
| 28 if (!pParams) | 28 if (!pParams) |
| 29 return FALSE; | 29 return FALSE; |
| 30 switch (pParams->m_iPart) { | 30 switch (pParams->m_iPart) { |
| 31 case CFWL_Part::Border: { | 31 case CFWL_Part::Border: { |
| 32 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); | 32 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); |
| 33 break; | 33 break; |
| 34 } | 34 } |
| 35 case CFWL_Part::Edge: { | 35 case CFWL_Part::Edge: { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 case CFWL_PartState_Disabled: { | 111 case CFWL_PartState_Disabled: { |
| 112 eState = FWLTHEME_STATE_Disabale; | 112 eState = FWLTHEME_STATE_Disabale; |
| 113 break; | 113 break; |
| 114 } | 114 } |
| 115 default: {} | 115 default: {} |
| 116 } | 116 } |
| 117 DrawArrowBtn(pParams->m_pGraphics, &pParams->m_rtPart, | 117 DrawArrowBtn(pParams->m_pGraphics, &pParams->m_rtPart, |
| 118 FWLTHEME_DIRECTION_Down, eState, &pParams->m_matrix); | 118 FWLTHEME_DIRECTION_Down, eState, &pParams->m_matrix); |
| 119 } | 119 } |
| OLD | NEW |