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

Unified Diff: xfa/fwl/core/ifwl_edit.cpp

Issue 2482253004: Convert FWL_SCBCODE to an enum class (Closed)
Patch Set: Rebase to master Created 4 years, 1 month 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/core/ifwl_edit.h ('k') | xfa/fwl/core/ifwl_listbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_edit.cpp
diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp
index 79896ea6367b50323abb172295aff55ccb4ff000..1679a5b16d95163f466aa5d8d8519eac13ae2fad 100644
--- a/xfa/fwl/core/ifwl_edit.cpp
+++ b/xfa/fwl/core/ifwl_edit.cpp
@@ -1928,56 +1928,55 @@ void IFWL_Edit::OnChar(CFWL_MsgKey* pMsg) {
}
bool IFWL_Edit::OnScroll(IFWL_ScrollBar* pScrollBar,
- uint32_t dwCode,
+ FWL_SCBCODE 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 FWL_SCBCODE_Min: {
+ case FWL_SCBCODE::Min: {
fPos = fs.x;
break;
}
- case FWL_SCBCODE_Max: {
+ case FWL_SCBCODE::Max: {
fPos = fs.y;
break;
}
- case FWL_SCBCODE_StepBackward: {
+ case FWL_SCBCODE::StepBackward: {
fPos -= fStep;
if (fPos < fs.x + fStep / 2) {
fPos = fs.x;
}
break;
}
- case FWL_SCBCODE_StepForward: {
+ case FWL_SCBCODE::StepForward: {
fPos += fStep;
if (fPos > fs.y - fStep / 2) {
fPos = fs.y;
}
break;
}
- case FWL_SCBCODE_PageBackward: {
+ case FWL_SCBCODE::PageBackward: {
fPos -= pScrollBar->GetPageSize();
if (fPos < fs.x) {
fPos = fs.x;
}
break;
}
- case FWL_SCBCODE_PageForward: {
+ case FWL_SCBCODE::PageForward: {
fPos += pScrollBar->GetPageSize();
if (fPos > fs.y) {
fPos = fs.y;
}
break;
}
- case FWL_SCBCODE_Pos:
- case FWL_SCBCODE_TrackPos:
+ case FWL_SCBCODE::Pos:
+ case FWL_SCBCODE::TrackPos:
+ case FWL_SCBCODE::None:
break;
- case FWL_SCBCODE_EndScroll:
+ case FWL_SCBCODE::EndScroll:
return false;
- default:
- break;
}
if (iCurPos != fPos) {
pScrollBar->SetPos(fPos);
« no previous file with comments | « xfa/fwl/core/ifwl_edit.h ('k') | xfa/fwl/core/ifwl_listbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698