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_listboxtp.h" | 7 #include "xfa/fwl/theme/cfwl_listboxtp.h" |
8 | 8 |
9 #include "xfa/fwl/basewidget/ifwl_listbox.h" | 9 #include "xfa/fwl/basewidget/ifwl_listbox.h" |
10 #include "xfa/fwl/core/cfwl_themebackground.h" | 10 #include "xfa/fwl/core/cfwl_themebackground.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } else if (pParams->m_dwStates == CFWL_PartState_Normal) { | 59 } else if (pParams->m_dwStates == CFWL_PartState_Normal) { |
60 color = 0xFF0000FF; | 60 color = 0xFF0000FF; |
61 } | 61 } |
62 FillSoildRect(pParams->m_pGraphics, color, &pParams->m_rtPart, | 62 FillSoildRect(pParams->m_pGraphics, color, &pParams->m_rtPart, |
63 &pParams->m_matrix); | 63 &pParams->m_matrix); |
64 } | 64 } |
65 default: {} | 65 default: {} |
66 } | 66 } |
67 return TRUE; | 67 return TRUE; |
68 } | 68 } |
69 FWL_ERR CFWL_ListBoxTP::Initialize() { | 69 FWL_Error CFWL_ListBoxTP::Initialize() { |
70 InitTTO(); | 70 InitTTO(); |
71 return CFWL_WidgetTP::Initialize(); | 71 return CFWL_WidgetTP::Initialize(); |
72 } | 72 } |
73 FWL_ERR CFWL_ListBoxTP::Finalize() { | 73 FWL_Error CFWL_ListBoxTP::Finalize() { |
74 FinalizeTTO(); | 74 FinalizeTTO(); |
75 return CFWL_WidgetTP::Finalize(); | 75 return CFWL_WidgetTP::Finalize(); |
76 } | 76 } |
77 void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics* pGraphics, | 77 void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics* pGraphics, |
78 uint32_t dwStates, | 78 uint32_t dwStates, |
79 const CFX_RectF* prtItem, | 79 const CFX_RectF* prtItem, |
80 void* pData, | 80 void* pData, |
81 CFX_Matrix* pMatrix) { | 81 CFX_Matrix* pMatrix) { |
82 if (dwStates & CFWL_PartState_Selected) { | 82 if (dwStates & CFWL_PartState_Selected) { |
83 pGraphics->SaveGraphState(); | 83 pGraphics->SaveGraphState(); |
(...skipping 11 matching lines...) Expand all Loading... |
95 #endif | 95 #endif |
96 pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix); | 96 pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix); |
97 pGraphics->RestoreGraphState(); | 97 pGraphics->RestoreGraphState(); |
98 } | 98 } |
99 if (dwStates & CFWL_PartState_Focused) { | 99 if (dwStates & CFWL_PartState_Focused) { |
100 if (pData) { | 100 if (pData) { |
101 DrawFocus(pGraphics, (CFX_RectF*)pData, pMatrix); | 101 DrawFocus(pGraphics, (CFX_RectF*)pData, pMatrix); |
102 } | 102 } |
103 } | 103 } |
104 } | 104 } |
OLD | NEW |