| 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_fftextedit.h" | 7 #include "xfa/fxfa/app/xfa_fftextedit.h" |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 if (!PtInActiveRect(fx, fy)) { | 100 if (!PtInActiveRect(fx, fy)) { |
| 101 return FALSE; | 101 return FALSE; |
| 102 } | 102 } |
| 103 if (!IsFocused()) { | 103 if (!IsFocused()) { |
| 104 m_dwStatus |= XFA_WIDGETSTATUS_Focused; | 104 m_dwStatus |= XFA_WIDGETSTATUS_Focused; |
| 105 UpdateFWLData(); | 105 UpdateFWLData(); |
| 106 AddInvalidateRect(); | 106 AddInvalidateRect(); |
| 107 } | 107 } |
| 108 SetButtonDown(TRUE); | 108 SetButtonDown(TRUE); |
| 109 CFWL_MsgMouse ms; | 109 CFWL_MsgMouse ms; |
| 110 ms.m_dwCmd = FWL_MSGMOUSECMD_LButtonDown; | 110 ms.m_dwCmd = FWL_MouseCommand::LeftButtonDown; |
| 111 ms.m_dwFlags = dwFlags; | 111 ms.m_dwFlags = dwFlags; |
| 112 ms.m_fx = fx; | 112 ms.m_fx = fx; |
| 113 ms.m_fy = fy; | 113 ms.m_fy = fy; |
| 114 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 114 ms.m_pDstTarget = m_pNormalWidget->m_pIface; |
| 115 FWLToClient(ms.m_fx, ms.m_fy); | 115 FWLToClient(ms.m_fx, ms.m_fy); |
| 116 TranslateFWLMessage(&ms); | 116 TranslateFWLMessage(&ms); |
| 117 return TRUE; | 117 return TRUE; |
| 118 } | 118 } |
| 119 FX_BOOL CXFA_FFTextEdit::OnRButtonDown(uint32_t dwFlags, | 119 FX_BOOL CXFA_FFTextEdit::OnRButtonDown(uint32_t dwFlags, |
| 120 FX_FLOAT fx, | 120 FX_FLOAT fx, |
| 121 FX_FLOAT fy) { | 121 FX_FLOAT fy) { |
| 122 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) { | 122 if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) { |
| 123 return FALSE; | 123 return FALSE; |
| 124 } | 124 } |
| 125 if (!PtInActiveRect(fx, fy)) { | 125 if (!PtInActiveRect(fx, fy)) { |
| 126 return FALSE; | 126 return FALSE; |
| 127 } | 127 } |
| 128 if (!IsFocused()) { | 128 if (!IsFocused()) { |
| 129 m_dwStatus |= XFA_WIDGETSTATUS_Focused; | 129 m_dwStatus |= XFA_WIDGETSTATUS_Focused; |
| 130 UpdateFWLData(); | 130 UpdateFWLData(); |
| 131 AddInvalidateRect(); | 131 AddInvalidateRect(); |
| 132 } | 132 } |
| 133 SetButtonDown(TRUE); | 133 SetButtonDown(TRUE); |
| 134 CFWL_MsgMouse ms; | 134 CFWL_MsgMouse ms; |
| 135 ms.m_dwCmd = FWL_MSGMOUSECMD_RButtonDown; | 135 ms.m_dwCmd = FWL_MouseCommand::RightButtonDown; |
| 136 ms.m_dwFlags = dwFlags; | 136 ms.m_dwFlags = dwFlags; |
| 137 ms.m_fx = fx; | 137 ms.m_fx = fx; |
| 138 ms.m_fy = fy; | 138 ms.m_fy = fy; |
| 139 FWLToClient(ms.m_fx, ms.m_fy); | 139 FWLToClient(ms.m_fx, ms.m_fy); |
| 140 TranslateFWLMessage(&ms); | 140 TranslateFWLMessage(&ms); |
| 141 return TRUE; | 141 return TRUE; |
| 142 } | 142 } |
| 143 FX_BOOL CXFA_FFTextEdit::OnRButtonUp(uint32_t dwFlags, | 143 FX_BOOL CXFA_FFTextEdit::OnRButtonUp(uint32_t dwFlags, |
| 144 FX_FLOAT fx, | 144 FX_FLOAT fx, |
| 145 FX_FLOAT fy) { | 145 FX_FLOAT fy) { |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 | 790 |
| 791 FWL_ERR CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { | 791 FWL_ERR CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { |
| 792 if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) { | 792 if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) { |
| 793 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; | 793 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; |
| 794 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, | 794 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, |
| 795 event->iDay); | 795 event->iDay); |
| 796 return TRUE; | 796 return TRUE; |
| 797 } | 797 } |
| 798 return CXFA_FFTextEdit::OnProcessEvent(pEvent); | 798 return CXFA_FFTextEdit::OnProcessEvent(pEvent); |
| 799 } | 799 } |
| OLD | NEW |