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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
782 } | 782 } |
783 FX_BOOL CXFA_FFField::CommitData() { | 783 FX_BOOL CXFA_FFField::CommitData() { |
784 return FALSE; | 784 return FALSE; |
785 } | 785 } |
786 FX_BOOL CXFA_FFField::IsDataChanged() { | 786 FX_BOOL CXFA_FFField::IsDataChanged() { |
787 return FALSE; | 787 return FALSE; |
788 } | 788 } |
789 void CXFA_FFField::TranslateFWLMessage(CFWL_Message* pMessage) { | 789 void CXFA_FFField::TranslateFWLMessage(CFWL_Message* pMessage) { |
790 GetApp()->GetWidgetMgrDelegate()->OnProcessMessageToForm(pMessage); | 790 GetApp()->GetWidgetMgrDelegate()->OnProcessMessageToForm(pMessage); |
791 } | 791 } |
792 int32_t CXFA_FFField::OnProcessMessage(CFWL_Message* pMessage) { | 792 int32_t CXFA_FFField::OnProcessMessage(CFWL_Message* pMessage) { |
Tom Sepez
2016/05/03 18:19:41
Maybe this should return FWL_Error for consistency
dsinclair
2016/05/03 19:29:51
Return value is never checked. Make the three On m
| |
793 return FWL_ERR_Succeeded; | 793 return 0; |
794 } | 794 } |
795 | 795 |
796 FWL_ERR CXFA_FFField::OnProcessEvent(CFWL_Event* pEvent) { | 796 FWL_Error CXFA_FFField::OnProcessEvent(CFWL_Event* pEvent) { |
797 switch (pEvent->GetClassID()) { | 797 switch (pEvent->GetClassID()) { |
798 case CFWL_EventType::Mouse: { | 798 case CFWL_EventType::Mouse: { |
799 CFWL_EvtMouse* event = (CFWL_EvtMouse*)pEvent; | 799 CFWL_EvtMouse* event = (CFWL_EvtMouse*)pEvent; |
800 if (event->m_dwCmd == FWL_MouseCommand::Enter) { | 800 if (event->m_dwCmd == FWL_MouseCommand::Enter) { |
801 CXFA_EventParam eParam; | 801 CXFA_EventParam eParam; |
802 eParam.m_eType = XFA_EVENT_MouseEnter; | 802 eParam.m_eType = XFA_EVENT_MouseEnter; |
803 eParam.m_pTarget = m_pDataAcc; | 803 eParam.m_pTarget = m_pDataAcc; |
804 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseEnter, &eParam); | 804 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_MouseEnter, &eParam); |
805 } else if (event->m_dwCmd == FWL_MouseCommand::Leave) { | 805 } else if (event->m_dwCmd == FWL_MouseCommand::Leave) { |
806 CXFA_EventParam eParam; | 806 CXFA_EventParam eParam; |
(...skipping 16 matching lines...) Expand all Loading... | |
823 case CFWL_EventType::Click: { | 823 case CFWL_EventType::Click: { |
824 CXFA_EventParam eParam; | 824 CXFA_EventParam eParam; |
825 eParam.m_eType = XFA_EVENT_Click; | 825 eParam.m_eType = XFA_EVENT_Click; |
826 eParam.m_pTarget = m_pDataAcc; | 826 eParam.m_pTarget = m_pDataAcc; |
827 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); | 827 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); |
828 break; | 828 break; |
829 } | 829 } |
830 default: | 830 default: |
831 break; | 831 break; |
832 } | 832 } |
833 return FWL_ERR_Succeeded; | 833 return FWL_Error::Succeeded; |
834 } | 834 } |
835 | 835 |
836 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, | 836 FWL_Error CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, |
837 const CFX_Matrix* pMatrix) { | 837 const CFX_Matrix* pMatrix) { |
838 return FWL_ERR_Succeeded; | 838 return FWL_Error::Succeeded; |
839 } | 839 } |
OLD | NEW |