| Index: xfa/fwl/cfwl_edit.cpp
|
| diff --git a/xfa/fwl/core/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
|
| similarity index 96%
|
| rename from xfa/fwl/core/cfwl_edit.cpp
|
| rename to xfa/fwl/cfwl_edit.cpp
|
| index c6c0ce29ba7e6b53180c48dda0a024ace948e3b2..321303942e3e82fdfea49a1d8ef80fbab52c4f11 100644
|
| --- a/xfa/fwl/core/cfwl_edit.cpp
|
| +++ b/xfa/fwl/cfwl_edit.cpp
|
| @@ -4,7 +4,7 @@
|
|
|
| // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
|
|
|
| -#include "xfa/fwl/core/cfwl_edit.h"
|
| +#include "xfa/fwl/cfwl_edit.h"
|
|
|
| #include <algorithm>
|
| #include <memory>
|
| @@ -18,18 +18,18 @@
|
| #include "xfa/fde/fde_render.h"
|
| #include "xfa/fde/ifde_txtedtpage.h"
|
| #include "xfa/fgas/font/cfgas_gefont.h"
|
| -#include "xfa/fwl/core/cfwl_app.h"
|
| -#include "xfa/fwl/core/cfwl_caret.h"
|
| -#include "xfa/fwl/core/cfwl_event.h"
|
| -#include "xfa/fwl/core/cfwl_evtcheckword.h"
|
| -#include "xfa/fwl/core/cfwl_evttextchanged.h"
|
| -#include "xfa/fwl/core/cfwl_evtvalidate.h"
|
| -#include "xfa/fwl/core/cfwl_msgkey.h"
|
| -#include "xfa/fwl/core/cfwl_msgmouse.h"
|
| -#include "xfa/fwl/core/cfwl_themebackground.h"
|
| -#include "xfa/fwl/core/cfwl_themepart.h"
|
| -#include "xfa/fwl/core/cfwl_widgetmgr.h"
|
| -#include "xfa/fwl/core/ifwl_themeprovider.h"
|
| +#include "xfa/fwl/cfwl_app.h"
|
| +#include "xfa/fwl/cfwl_caret.h"
|
| +#include "xfa/fwl/cfwl_event.h"
|
| +#include "xfa/fwl/cfwl_eventcheckword.h"
|
| +#include "xfa/fwl/cfwl_eventtextchanged.h"
|
| +#include "xfa/fwl/cfwl_eventvalidate.h"
|
| +#include "xfa/fwl/cfwl_messagekey.h"
|
| +#include "xfa/fwl/cfwl_messagemouse.h"
|
| +#include "xfa/fwl/cfwl_themebackground.h"
|
| +#include "xfa/fwl/cfwl_themepart.h"
|
| +#include "xfa/fwl/cfwl_widgetmgr.h"
|
| +#include "xfa/fwl/ifwl_themeprovider.h"
|
| #include "xfa/fxfa/xfa_ffdoc.h"
|
| #include "xfa/fxfa/xfa_ffwidget.h"
|
| #include "xfa/fxgraphics/cfx_path.h"
|
| @@ -194,7 +194,7 @@ void CFWL_Edit::DrawSpellCheck(CFX_Graphics* pGraphics,
|
| pGraphics->ConcatMatrix(const_cast<CFX_Matrix*>(pMatrix));
|
|
|
| CFX_Color crLine(0xFFFF0000);
|
| - CFWL_EvtCheckWord checkWordEvent(this);
|
| + CFWL_EventCheckWord checkWordEvent(this);
|
|
|
| CFX_ByteString sLatinWord;
|
| CFX_Path pathSpell;
|
| @@ -440,7 +440,7 @@ void CFWL_Edit::OnTextChanged(const FDE_TXTEDT_TEXTCHANGE_INFO& ChangeInfo) {
|
| CFX_RectF rtTemp;
|
| GetClientRect(rtTemp);
|
|
|
| - CFWL_EvtTextChanged event(this);
|
| + CFWL_EventTextChanged event(this);
|
| event.wsPrevText = ChangeInfo.wsPrevText;
|
| DispatchEvent(&event);
|
|
|
| @@ -481,7 +481,7 @@ bool CFWL_Edit::OnValidate(const CFX_WideString& wsText) {
|
| if (!pDst)
|
| pDst = this;
|
|
|
| - CFWL_EvtValidate event(this);
|
| + CFWL_EventValidate event(this);
|
| event.wsInsert = wsText;
|
| event.bValidate = true;
|
| DispatchEvent(&event);
|
| @@ -1286,7 +1286,7 @@ void CFWL_Edit::OnProcessMessage(CFWL_Message* pMessage) {
|
| OnFocusChanged(pMessage, false);
|
| break;
|
| case CFWL_Message::Type::Mouse: {
|
| - CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
|
| + CFWL_MessageMouse* pMsg = static_cast<CFWL_MessageMouse*>(pMessage);
|
| switch (pMsg->m_dwCmd) {
|
| case FWL_MouseCommand::LeftButtonDown:
|
| OnLButtonDown(pMsg);
|
| @@ -1309,7 +1309,7 @@ void CFWL_Edit::OnProcessMessage(CFWL_Message* pMessage) {
|
| break;
|
| }
|
| case CFWL_Message::Type::Key: {
|
| - CFWL_MsgKey* pKey = static_cast<CFWL_MsgKey*>(pMessage);
|
| + CFWL_MessageKey* pKey = static_cast<CFWL_MessageKey*>(pMessage);
|
| if (pKey->m_dwCmd == FWL_KeyCommand::KeyDown)
|
| OnKeyDown(pKey);
|
| else if (pKey->m_dwCmd == FWL_KeyCommand::Char)
|
| @@ -1331,7 +1331,7 @@ void CFWL_Edit::OnProcessEvent(CFWL_Event* pEvent) {
|
| CFWL_Widget* pSrcTarget = pEvent->m_pSrcTarget;
|
| if ((pSrcTarget == m_pVertScrollBar.get() && m_pVertScrollBar) ||
|
| (pSrcTarget == m_pHorzScrollBar.get() && m_pHorzScrollBar)) {
|
| - CFWL_EvtScroll* pScrollEvent = static_cast<CFWL_EvtScroll*>(pEvent);
|
| + CFWL_EventScroll* pScrollEvent = static_cast<CFWL_EventScroll*>(pEvent);
|
| OnScroll(static_cast<CFWL_ScrollBar*>(pSrcTarget),
|
| pScrollEvent->m_iScrollCode, pScrollEvent->m_fPos);
|
| }
|
| @@ -1342,7 +1342,7 @@ void CFWL_Edit::OnDrawWidget(CFX_Graphics* pGraphics,
|
| DrawWidget(pGraphics, pMatrix);
|
| }
|
|
|
| -void CFWL_Edit::DoButtonDown(CFWL_MsgMouse* pMsg) {
|
| +void CFWL_Edit::DoButtonDown(CFWL_MessageMouse* pMsg) {
|
| if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0)
|
| SetFocus(true);
|
|
|
| @@ -1394,7 +1394,7 @@ void CFWL_Edit::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
|
| Repaint(&rtInvalidate);
|
| }
|
|
|
| -void CFWL_Edit::OnLButtonDown(CFWL_MsgMouse* pMsg) {
|
| +void CFWL_Edit::OnLButtonDown(CFWL_MessageMouse* pMsg) {
|
| if (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)
|
| return;
|
|
|
| @@ -1420,12 +1420,12 @@ void CFWL_Edit::OnLButtonDown(CFWL_MsgMouse* pMsg) {
|
| Repaint(&m_rtEngine);
|
| }
|
|
|
| -void CFWL_Edit::OnLButtonUp(CFWL_MsgMouse* pMsg) {
|
| +void CFWL_Edit::OnLButtonUp(CFWL_MessageMouse* pMsg) {
|
| m_bLButtonDown = false;
|
| SetGrab(false);
|
| }
|
|
|
| -void CFWL_Edit::OnButtonDblClk(CFWL_MsgMouse* pMsg) {
|
| +void CFWL_Edit::OnButtonDblClk(CFWL_MessageMouse* pMsg) {
|
| IFDE_TxtEdtPage* pPage = m_EdtEngine.GetPage(0);
|
| if (!pPage)
|
| return;
|
| @@ -1442,7 +1442,7 @@ void CFWL_Edit::OnButtonDblClk(CFWL_MsgMouse* pMsg) {
|
| Repaint(&m_rtEngine);
|
| }
|
|
|
| -void CFWL_Edit::OnMouseMove(CFWL_MsgMouse* pMsg) {
|
| +void CFWL_Edit::OnMouseMove(CFWL_MessageMouse* pMsg) {
|
| if (m_nSelStart == -1 || !m_bLButtonDown)
|
| return;
|
|
|
| @@ -1469,7 +1469,7 @@ void CFWL_Edit::OnMouseMove(CFWL_MsgMouse* pMsg) {
|
| FXSYS_abs(nIndex - m_nSelStart));
|
| }
|
|
|
| -void CFWL_Edit::OnKeyDown(CFWL_MsgKey* pMsg) {
|
| +void CFWL_Edit::OnKeyDown(CFWL_MessageKey* pMsg) {
|
| FDE_TXTEDTMOVECARET MoveCaret = MC_MoveNone;
|
| bool bShift = !!(pMsg->m_dwFlags & FWL_KEYFLAG_Shift);
|
| bool bCtrl = !!(pMsg->m_dwFlags & FWL_KEYFLAG_Ctrl);
|
| @@ -1523,7 +1523,7 @@ void CFWL_Edit::OnKeyDown(CFWL_MsgKey* pMsg) {
|
| m_EdtEngine.MoveCaretPos(MoveCaret, bShift, bCtrl);
|
| }
|
|
|
| -void CFWL_Edit::OnChar(CFWL_MsgKey* pMsg) {
|
| +void CFWL_Edit::OnChar(CFWL_MessageKey* pMsg) {
|
| if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly) ||
|
| (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)) {
|
| return;
|
| @@ -1578,54 +1578,54 @@ void CFWL_Edit::OnChar(CFWL_MsgKey* pMsg) {
|
| }
|
|
|
| bool CFWL_Edit::OnScroll(CFWL_ScrollBar* pScrollBar,
|
| - CFWL_EvtScroll::Code dwCode,
|
| + CFWL_EventScroll::Code dwCode,
|
| FX_FLOAT fPos) {
|
| CFX_SizeF fs;
|
| pScrollBar->GetRange(&fs.x, &fs.y);
|
| FX_FLOAT iCurPos = pScrollBar->GetPos();
|
| FX_FLOAT fStep = pScrollBar->GetStepSize();
|
| switch (dwCode) {
|
| - case CFWL_EvtScroll::Code::Min: {
|
| + case CFWL_EventScroll::Code::Min: {
|
| fPos = fs.x;
|
| break;
|
| }
|
| - case CFWL_EvtScroll::Code::Max: {
|
| + case CFWL_EventScroll::Code::Max: {
|
| fPos = fs.y;
|
| break;
|
| }
|
| - case CFWL_EvtScroll::Code::StepBackward: {
|
| + case CFWL_EventScroll::Code::StepBackward: {
|
| fPos -= fStep;
|
| if (fPos < fs.x + fStep / 2) {
|
| fPos = fs.x;
|
| }
|
| break;
|
| }
|
| - case CFWL_EvtScroll::Code::StepForward: {
|
| + case CFWL_EventScroll::Code::StepForward: {
|
| fPos += fStep;
|
| if (fPos > fs.y - fStep / 2) {
|
| fPos = fs.y;
|
| }
|
| break;
|
| }
|
| - case CFWL_EvtScroll::Code::PageBackward: {
|
| + case CFWL_EventScroll::Code::PageBackward: {
|
| fPos -= pScrollBar->GetPageSize();
|
| if (fPos < fs.x) {
|
| fPos = fs.x;
|
| }
|
| break;
|
| }
|
| - case CFWL_EvtScroll::Code::PageForward: {
|
| + case CFWL_EventScroll::Code::PageForward: {
|
| fPos += pScrollBar->GetPageSize();
|
| if (fPos > fs.y) {
|
| fPos = fs.y;
|
| }
|
| break;
|
| }
|
| - case CFWL_EvtScroll::Code::Pos:
|
| - case CFWL_EvtScroll::Code::TrackPos:
|
| - case CFWL_EvtScroll::Code::None:
|
| + case CFWL_EventScroll::Code::Pos:
|
| + case CFWL_EventScroll::Code::TrackPos:
|
| + case CFWL_EventScroll::Code::None:
|
| break;
|
| - case CFWL_EvtScroll::Code::EndScroll:
|
| + case CFWL_EventScroll::Code::EndScroll:
|
| return false;
|
| }
|
| if (iCurPos == fPos)
|
|
|