Index: xfa/fwl/cfwl_scrollbar.cpp |
diff --git a/xfa/fwl/core/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp |
similarity index 92% |
rename from xfa/fwl/core/cfwl_scrollbar.cpp |
rename to xfa/fwl/cfwl_scrollbar.cpp |
index 6c2ad996015582b177e3ca0179182b52354c08ae..d6124c6515d5f5f0b16f1f76f24da6b02a693915 100644 |
--- a/xfa/fwl/core/cfwl_scrollbar.cpp |
+++ b/xfa/fwl/cfwl_scrollbar.cpp |
@@ -4,20 +4,20 @@ |
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
-#include "xfa/fwl/core/cfwl_scrollbar.h" |
+#include "xfa/fwl/cfwl_scrollbar.h" |
#include <algorithm> |
#include <memory> |
#include <utility> |
#include "third_party/base/ptr_util.h" |
-#include "xfa/fwl/core/cfwl_msgmouse.h" |
-#include "xfa/fwl/core/cfwl_msgmousewheel.h" |
-#include "xfa/fwl/core/cfwl_notedriver.h" |
-#include "xfa/fwl/core/cfwl_themebackground.h" |
-#include "xfa/fwl/core/cfwl_themepart.h" |
-#include "xfa/fwl/core/cfwl_timerinfo.h" |
-#include "xfa/fwl/core/ifwl_themeprovider.h" |
+#include "xfa/fwl/cfwl_messagemouse.h" |
+#include "xfa/fwl/cfwl_messagemousewheel.h" |
+#include "xfa/fwl/cfwl_notedriver.h" |
+#include "xfa/fwl/cfwl_themebackground.h" |
+#include "xfa/fwl/cfwl_themepart.h" |
+#include "xfa/fwl/cfwl_timerinfo.h" |
+#include "xfa/fwl/ifwl_themeprovider.h" |
#define FWL_SCROLLBAR_Elapse 500 |
#define FWL_SCROLLBAR_MinThumb 5 |
@@ -97,8 +97,8 @@ void CFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) { |
CalcMaxTrackRect(m_rtMaxTrack); |
} |
-bool CFWL_ScrollBar::DoScroll(CFWL_EvtScroll::Code dwCode, FX_FLOAT fPos) { |
- if (dwCode == CFWL_EvtScroll::Code::None) |
+bool CFWL_ScrollBar::DoScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos) { |
+ if (dwCode == CFWL_EventScroll::Code::None) |
return false; |
return OnScroll(dwCode, fPos); |
} |
@@ -293,32 +293,32 @@ FX_FLOAT CFWL_ScrollBar::GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy) { |
bool CFWL_ScrollBar::SendEvent() { |
if (m_iMinButtonState == CFWL_PartState_Pressed) { |
- DoScroll(CFWL_EvtScroll::Code::StepBackward, m_fTrackPos); |
+ DoScroll(CFWL_EventScroll::Code::StepBackward, m_fTrackPos); |
return false; |
} |
if (m_iMaxButtonState == CFWL_PartState_Pressed) { |
- DoScroll(CFWL_EvtScroll::Code::StepForward, m_fTrackPos); |
+ DoScroll(CFWL_EventScroll::Code::StepForward, m_fTrackPos); |
return false; |
} |
if (m_iMinTrackState == CFWL_PartState_Pressed) { |
- DoScroll(CFWL_EvtScroll::Code::PageBackward, m_fTrackPos); |
+ DoScroll(CFWL_EventScroll::Code::PageBackward, m_fTrackPos); |
return m_rtThumb.Contains(m_cpTrackPointX, m_cpTrackPointY); |
} |
if (m_iMaxTrackState == CFWL_PartState_Pressed) { |
- DoScroll(CFWL_EvtScroll::Code::PageForward, m_fTrackPos); |
+ DoScroll(CFWL_EventScroll::Code::PageForward, m_fTrackPos); |
return m_rtThumb.Contains(m_cpTrackPointX, m_cpTrackPointY); |
} |
if (m_iMouseWheel) { |
- CFWL_EvtScroll::Code dwCode = m_iMouseWheel < 0 |
- ? CFWL_EvtScroll::Code::StepForward |
- : CFWL_EvtScroll::Code::StepBackward; |
+ CFWL_EventScroll::Code dwCode = m_iMouseWheel < 0 |
+ ? CFWL_EventScroll::Code::StepForward |
+ : CFWL_EventScroll::Code::StepBackward; |
DoScroll(dwCode, m_fTrackPos); |
} |
return true; |
} |
-bool CFWL_ScrollBar::OnScroll(CFWL_EvtScroll::Code dwCode, FX_FLOAT fPos) { |
- CFWL_EvtScroll ev(this); |
+bool CFWL_ScrollBar::OnScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos) { |
+ CFWL_EventScroll ev(this); |
ev.m_iScrollCode = dwCode; |
ev.m_fPos = fPos; |
DispatchEvent(&ev); |
@@ -331,7 +331,7 @@ void CFWL_ScrollBar::OnProcessMessage(CFWL_Message* pMessage) { |
CFWL_Message::Type type = pMessage->GetType(); |
if (type == 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->m_dwFlags, pMsg->m_fx, pMsg->m_fy); |
@@ -349,7 +349,8 @@ void CFWL_ScrollBar::OnProcessMessage(CFWL_Message* pMessage) { |
break; |
} |
} else if (type == CFWL_Message::Type::MouseWheel) { |
- CFWL_MsgMouseWheel* pMsg = static_cast<CFWL_MsgMouseWheel*>(pMessage); |
+ CFWL_MessageMouseWheel* pMsg = |
+ static_cast<CFWL_MessageMouseWheel*>(pMessage); |
OnMouseWheel(pMsg->m_fx, pMsg->m_fy, pMsg->m_dwFlags, pMsg->m_fDeltaX, |
pMsg->m_fDeltaY); |
} |
@@ -447,7 +448,7 @@ void CFWL_ScrollBar::DoMouseUp(int32_t iItem, |
iState = iNewState; |
Repaint(&rtItem); |
- OnScroll(CFWL_EvtScroll::Code::EndScroll, m_fTrackPos); |
+ OnScroll(CFWL_EventScroll::Code::EndScroll, m_fTrackPos); |
} |
void CFWL_ScrollBar::DoMouseMove(int32_t iItem, |
@@ -466,7 +467,7 @@ void CFWL_ScrollBar::DoMouseMove(int32_t iItem, |
} else if ((2 == iItem) && (m_iThumbButtonState == CFWL_PartState_Pressed)) { |
FX_FLOAT fPos = GetTrackPointPos(fx, fy); |
m_fTrackPos = fPos; |
- OnScroll(CFWL_EvtScroll::Code::TrackPos, fPos); |
+ OnScroll(CFWL_EventScroll::Code::TrackPos, fPos); |
} |
} |