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

Unified Diff: xfa/fwl/cfwl_listbox.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_listbox.h ('k') | xfa/fwl/cfwl_listitem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/cfwl_listbox.cpp
diff --git a/xfa/fwl/core/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
similarity index 95%
rename from xfa/fwl/core/cfwl_listbox.cpp
rename to xfa/fwl/cfwl_listbox.cpp
index 45898b1ed73f70f90b9b65bc2e3ef4c458e7b279..30c160a24802967869387859540bc2f7b6cd0163 100644
--- a/xfa/fwl/core/cfwl_listbox.cpp
+++ b/xfa/fwl/cfwl_listbox.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fwl/core/cfwl_listbox.h"
+#include "xfa/fwl/cfwl_listbox.h"
#include <algorithm>
#include <memory>
@@ -13,14 +13,14 @@
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
#include "xfa/fde/tto/fde_textout.h"
-#include "xfa/fwl/core/cfwl_app.h"
-#include "xfa/fwl/core/cfwl_msgkey.h"
-#include "xfa/fwl/core/cfwl_msgmouse.h"
-#include "xfa/fwl/core/cfwl_msgmousewheel.h"
-#include "xfa/fwl/core/cfwl_themebackground.h"
-#include "xfa/fwl/core/cfwl_themepart.h"
-#include "xfa/fwl/core/cfwl_themetext.h"
-#include "xfa/fwl/core/ifwl_themeprovider.h"
+#include "xfa/fwl/cfwl_app.h"
+#include "xfa/fwl/cfwl_messagekey.h"
+#include "xfa/fwl/cfwl_messagemouse.h"
+#include "xfa/fwl/cfwl_messagemousewheel.h"
+#include "xfa/fwl/cfwl_themebackground.h"
+#include "xfa/fwl/cfwl_themepart.h"
+#include "xfa/fwl/cfwl_themetext.h"
+#include "xfa/fwl/ifwl_themeprovider.h"
namespace {
@@ -773,7 +773,7 @@ void CFWL_ListBox::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);
@@ -787,10 +787,10 @@ void CFWL_ListBox::OnProcessMessage(CFWL_Message* pMessage) {
break;
}
case CFWL_Message::Type::MouseWheel:
- OnMouseWheel(static_cast<CFWL_MsgMouseWheel*>(pMessage));
+ OnMouseWheel(static_cast<CFWL_MessageMouseWheel*>(pMessage));
break;
case CFWL_Message::Type::Key: {
- CFWL_MsgKey* pMsg = static_cast<CFWL_MsgKey*>(pMessage);
+ CFWL_MessageKey* pMsg = static_cast<CFWL_MessageKey*>(pMessage);
if (pMsg->m_dwCmd == FWL_KeyCommand::KeyDown)
OnKeyDown(pMsg);
break;
@@ -810,7 +810,7 @@ void CFWL_ListBox::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);
}
@@ -844,7 +844,7 @@ void CFWL_ListBox::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
Repaint(&m_rtClient);
}
-void CFWL_ListBox::OnLButtonDown(CFWL_MsgMouse* pMsg) {
+void CFWL_ListBox::OnLButtonDown(CFWL_MessageMouse* pMsg) {
m_bLButtonDown = true;
if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0)
SetFocus(true);
@@ -886,7 +886,7 @@ void CFWL_ListBox::OnLButtonDown(CFWL_MsgMouse* pMsg) {
Repaint(&m_rtClient);
}
-void CFWL_ListBox::OnLButtonUp(CFWL_MsgMouse* pMsg) {
+void CFWL_ListBox::OnLButtonUp(CFWL_MessageMouse* pMsg) {
if (!m_bLButtonDown)
return;
@@ -894,12 +894,12 @@ void CFWL_ListBox::OnLButtonUp(CFWL_MsgMouse* pMsg) {
SetGrab(false);
}
-void CFWL_ListBox::OnMouseWheel(CFWL_MsgMouseWheel* pMsg) {
+void CFWL_ListBox::OnMouseWheel(CFWL_MessageMouseWheel* pMsg) {
if (IsShowScrollBar(true))
m_pVertScrollBar->GetDelegate()->OnProcessMessage(pMsg);
}
-void CFWL_ListBox::OnKeyDown(CFWL_MsgKey* pMsg) {
+void CFWL_ListBox::OnKeyDown(CFWL_MessageKey* pMsg) {
uint32_t dwKeyCode = pMsg->m_dwKeyCode;
switch (dwKeyCode) {
case FWL_VKEY_Tab:
@@ -949,50 +949,50 @@ void CFWL_ListBox::OnVK(CFWL_ListItem* pItem, bool bShift, bool bCtrl) {
}
bool CFWL_ListBox::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) {
@@ -1128,4 +1128,3 @@ uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) {
return 0;
return pItem->m_dwStates | pItem->m_dwCheckState;
}
-
« no previous file with comments | « xfa/fwl/cfwl_listbox.h ('k') | xfa/fwl/cfwl_listitem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698