summaryrefslogtreecommitdiff
path: root/xfa/src/fwl/src/basewidget
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fwl/src/basewidget')
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp43
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_editimp.cpp61
2 files changed, 1 insertions, 103 deletions
diff --git a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp
index 2237953907..2aa072ed2d 100644
--- a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp
@@ -1786,15 +1786,7 @@ void CFWL_ComboProxyImpDelegate::OnLButtonDown(CFWL_MsgMouse* pMsg) {
m_bLButtonDown = FALSE;
pDriver->SetGrab(m_pForm, FALSE);
m_pComboBox->ShowDropList(FALSE);
- return;
}
- IFWL_AdapterNative* pNative = FWL_GetAdapterNative();
- IFWL_AdapterCursorMgr* pCursorMgr = pNative->GetCursorMgr();
- FWL_HCURSOR hCursor = pCursorMgr->GetSystemCursor(FWL_CURSORTYPE_SizeNS);
- pCursorMgr->SetCursor(hCursor);
- pCursorMgr->ShowCursor(TRUE);
- m_pForm->TransformTo(NULL, pMsg->m_fx, pMsg->m_fy);
- m_fStartPos = pMsg->m_fy;
}
void CFWL_ComboProxyImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) {
m_bLButtonDown = FALSE;
@@ -1817,41 +1809,6 @@ void CFWL_ComboProxyImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) {
}
}
void CFWL_ComboProxyImpDelegate::OnMouseMove(CFWL_MsgMouse* pMsg) {
- IFWL_AdapterNative* pNative = FWL_GetAdapterNative();
- IFWL_AdapterCursorMgr* pCursorMgr = pNative->GetCursorMgr();
- FWL_CURSORTYPE cursorType = FWL_CURSORTYPE_Arrow;
- if (m_pComboBox->m_rtHandler.Contains(pMsg->m_fx, pMsg->m_fy)) {
- cursorType = FWL_CURSORTYPE_SizeNS;
- }
- FWL_HCURSOR hCursor = pCursorMgr->GetSystemCursor(cursorType);
- pCursorMgr->SetCursor(hCursor);
- pCursorMgr->ShowCursor(TRUE);
- if (!m_bLButtonDown) {
- return;
- }
- m_pForm->TransformTo(NULL, pMsg->m_fx, pMsg->m_fy);
- FX_FLOAT fChanged = pMsg->m_fy - m_fStartPos;
- if (m_pComboBox->m_bUpFormHandler) {
- fChanged = m_fStartPos - pMsg->m_fy;
- }
- if (m_pComboBox->m_rtList.height + fChanged < m_pComboBox->m_fItemHeight) {
- return;
- }
- m_pComboBox->m_rtList.height += fChanged;
- m_pComboBox->m_rtProxy.height += fChanged;
- if (m_pComboBox->m_bUpFormHandler) {
- m_pComboBox->m_rtProxy.top -= fChanged;
- m_pComboBox->m_rtHandler.Set(0, 0, m_pComboBox->m_rtList.width,
- m_pComboBox->m_fComboFormHandler);
- } else {
- m_pComboBox->m_rtHandler.Set(0, m_pComboBox->m_rtList.height,
- m_pComboBox->m_rtList.width,
- m_pComboBox->m_fComboFormHandler);
- }
- m_pForm->SetWidgetRect(m_pComboBox->m_rtProxy);
- m_pComboBox->m_pListBox->SetWidgetRect(m_pComboBox->m_rtList);
- m_pComboBox->m_pListBox->Update();
- m_fStartPos = pMsg->m_fy;
}
void CFWL_ComboProxyImpDelegate::OnDeactive(CFWL_MsgDeactivate* pMsg) {
m_pComboBox->ShowDropList(FALSE);
diff --git a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
index 45b94d13b0..f5342d0f52 100644
--- a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
@@ -648,56 +648,7 @@ FWL_ERR CFWL_EditImp::DoClipboard(int32_t iCmd) {
(m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)) {
return FWL_ERR_Succeeded;
}
- IFWL_AdapterNative* pNative = FWL_GetAdapterNative();
- if (!pNative)
- return FWL_ERR_Indefinite;
- IFWL_AdapterClipboardMgr* pClipBorder = pNative->GetClipboardMgr();
- if (!pClipBorder)
- return FWL_ERR_Indefinite;
- CFX_WideString wsText;
- switch (iCmd) {
- case 1: {
- int32_t nStart;
- int32_t nCount = m_pEdtEngine->GetSelRange(0, nStart);
- if (nCount < 1) {
- break;
- }
- m_pEdtEngine->GetText(wsText, nStart, nCount);
- pClipBorder->SetStringData(wsText);
- break;
- }
- case 2: {
- int32_t nStart;
- int32_t nCount = m_pEdtEngine->GetSelRange(0, nStart);
- if (nCount < 1) {
- break;
- }
- m_pEdtEngine->GetText(wsText, nStart, nCount);
- m_pEdtEngine->DeleteRange(nStart, nCount);
- m_pEdtEngine->ClearSelection();
- pClipBorder->SetStringData(wsText);
- break;
- }
- case 3: {
- pClipBorder->GetStringData(wsText);
- int32_t iLen = wsText.GetLength();
- if (iLen < 0) {
- break;
- }
- if (wsText[iLen] == L'\0') {
- if (iLen == 1) {
- break;
- }
- iLen--;
- wsText = wsText.Left(iLen);
- }
- int32_t nPos = m_pEdtEngine->GetCaretPos();
- m_pEdtEngine->Insert(nPos, wsText, iLen);
- break;
- }
- default: {}
- }
- return FWL_ERR_Succeeded;
+ return FWL_ERR_Indefinite;
}
FX_BOOL CFWL_EditImp::Copy(CFX_WideString& wsCopy) {
if (!m_pEdtEngine)
@@ -2205,14 +2156,4 @@ FX_BOOL CFWL_EditImpDelegate::OnScroll(IFWL_ScrollBar* pScrollBar,
return TRUE;
}
void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {
- if (m_pOwner->m_rtClient.Contains(pMsg->m_fx, pMsg->m_fy)) {
- IFWL_AdapterNative* pNative = FWL_GetAdapterNative();
- IFWL_AdapterCursorMgr* pCursorMgr = pNative->GetCursorMgr();
- if (NULL != pCursorMgr) {
- FWL_HCURSOR hCursor =
- pCursorMgr->GetSystemCursor(FWL_CURSORTYPE_InputBeam);
- pCursorMgr->SetCursor(hCursor);
- pCursorMgr->ShowCursor(TRUE);
- }
- }
}