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/fxfa/app/xfa_fffield.h" | 7 #include "xfa/fxfa/app/xfa_fffield.h" |
8 | 8 |
9 #include "xfa/fwl/basewidget/ifwl_edit.h" | 9 #include "xfa/fwl/basewidget/ifwl_edit.h" |
10 #include "xfa/fwl/core/cfwl_message.h" | 10 #include "xfa/fwl/core/cfwl_message.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void CXFA_FFField::DrawHighlight(CFX_Graphics* pGS, | 76 void CXFA_FFField::DrawHighlight(CFX_Graphics* pGS, |
77 CFX_Matrix* pMatrix, | 77 CFX_Matrix* pMatrix, |
78 uint32_t dwStatus, | 78 uint32_t dwStatus, |
79 FX_BOOL bEllipse) { | 79 FX_BOOL bEllipse) { |
80 if (m_rtUI.IsEmpty() || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 80 if (m_rtUI.IsEmpty() || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
81 return; | 81 return; |
82 } | 82 } |
83 if ((dwStatus & XFA_WidgetStatus_Highlight) && | 83 if ((dwStatus & XFA_WidgetStatus_Highlight) && |
84 m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open) { | 84 m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open) { |
85 CXFA_FFDoc* pDoc = GetDoc(); | 85 CXFA_FFDoc* pDoc = GetDoc(); |
86 CFX_Color crHighlight(pDoc->GetDocProvider()->GetHighlightColor(pDoc)); | 86 CFX_Color crHighlight(pDoc->GetDocEnvironment()->GetHighlightColor(pDoc)); |
87 pGS->SetFillColor(&crHighlight); | 87 pGS->SetFillColor(&crHighlight); |
88 CFX_Path path; | 88 CFX_Path path; |
89 path.Create(); | 89 path.Create(); |
90 if (bEllipse) { | 90 if (bEllipse) { |
91 path.AddEllipse(m_rtUI); | 91 path.AddEllipse(m_rtUI); |
92 } else { | 92 } else { |
93 path.AddRectangle(m_rtUI.left, m_rtUI.top, m_rtUI.width, m_rtUI.height); | 93 path.AddRectangle(m_rtUI.left, m_rtUI.top, m_rtUI.width, m_rtUI.height); |
94 } | 94 } |
95 pGS->FillPath(&path, FXFILL_WINDING, pMatrix); | 95 pGS->FillPath(&path, FXFILL_WINDING, pMatrix); |
96 } | 96 } |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); | 818 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); |
819 break; | 819 break; |
820 } | 820 } |
821 default: | 821 default: |
822 break; | 822 break; |
823 } | 823 } |
824 } | 824 } |
825 | 825 |
826 void CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, | 826 void CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, |
827 const CFX_Matrix* pMatrix) {} | 827 const CFX_Matrix* pMatrix) {} |
OLD | NEW |