Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: xfa/fwl/cfwl_scrollbar.cpp

Issue 2559173002: Move xfa/fwl/core to xfa/fwl. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/cfwl_scrollbar.h ('k') | xfa/fwl/cfwl_spinbutton.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « xfa/fwl/cfwl_scrollbar.h ('k') | xfa/fwl/cfwl_spinbutton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698