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

Side by Side Diff: xfa/fwl/basewidget/fwl_scrollbarimp.cpp

Issue 1821043003: Remove FX_WORD in favor of uint16_t. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use stdint.h directly, bitfield minefield. Created 4 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « xfa/fgas/localization/fgas_localemgr.cpp ('k') | xfa/fwl/theme/widgettp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/basewidget/fwl_scrollbarimp.h" 7 #include "xfa/fwl/basewidget/fwl_scrollbarimp.h"
8 8
9 #include "xfa/fwl/core/fwl_noteimp.h" 9 #include "xfa/fwl/core/fwl_noteimp.h"
10 #include "xfa/fwl/core/fwl_targetimp.h" 10 #include "xfa/fwl/core/fwl_targetimp.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 } 599 }
600 if (m_iMinTrackState == FWL_PARTSTATE_SCB_Pressed) { 600 if (m_iMinTrackState == FWL_PARTSTATE_SCB_Pressed) {
601 DoScroll(FWL_SCBCODE_PageBackward, m_fTrackPos); 601 DoScroll(FWL_SCBCODE_PageBackward, m_fTrackPos);
602 return m_rtThumb.Contains(m_cpTrackPointX, m_cpTrackPointY); 602 return m_rtThumb.Contains(m_cpTrackPointX, m_cpTrackPointY);
603 } 603 }
604 if (m_iMaxTrackState == FWL_PARTSTATE_SCB_Pressed) { 604 if (m_iMaxTrackState == FWL_PARTSTATE_SCB_Pressed) {
605 DoScroll(FWL_SCBCODE_PageForward, m_fTrackPos); 605 DoScroll(FWL_SCBCODE_PageForward, m_fTrackPos);
606 return m_rtThumb.Contains(m_cpTrackPointX, m_cpTrackPointY); 606 return m_rtThumb.Contains(m_cpTrackPointX, m_cpTrackPointY);
607 } 607 }
608 if (m_iMouseWheel) { 608 if (m_iMouseWheel) {
609 FX_WORD dwCode = 609 uint16_t dwCode =
610 m_iMouseWheel < 0 ? FWL_SCBCODE_StepForward : FWL_SCBCODE_StepBackward; 610 m_iMouseWheel < 0 ? FWL_SCBCODE_StepForward : FWL_SCBCODE_StepBackward;
611 DoScroll(dwCode, m_fTrackPos); 611 DoScroll(dwCode, m_fTrackPos);
612 } 612 }
613 return TRUE; 613 return TRUE;
614 } 614 }
615 FX_BOOL CFWL_ScrollBarImp::OnScroll(FX_DWORD dwCode, FX_FLOAT fPos) { 615 FX_BOOL CFWL_ScrollBarImp::OnScroll(FX_DWORD dwCode, FX_FLOAT fPos) {
616 FX_BOOL bRet = TRUE; 616 FX_BOOL bRet = TRUE;
617 CFWL_EvtScroll ev; 617 CFWL_EvtScroll ev;
618 ev.m_iScrollCode = dwCode; 618 ev.m_iScrollCode = dwCode;
619 ev.m_pSrcTarget = m_pInterface; 619 ev.m_pSrcTarget = m_pInterface;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 } 796 }
797 void CFWL_ScrollBarImpDelegate::DoMouseHover(int32_t iItem, 797 void CFWL_ScrollBarImpDelegate::DoMouseHover(int32_t iItem,
798 const CFX_RectF& rtItem, 798 const CFX_RectF& rtItem,
799 int32_t& iState) { 799 int32_t& iState) {
800 if (iState == FWL_PARTSTATE_SCB_Hovered) { 800 if (iState == FWL_PARTSTATE_SCB_Hovered) {
801 return; 801 return;
802 } 802 }
803 iState = FWL_PARTSTATE_SCB_Hovered; 803 iState = FWL_PARTSTATE_SCB_Hovered;
804 m_pOwner->Repaint(&rtItem); 804 m_pOwner->Repaint(&rtItem);
805 } 805 }
OLDNEW
« no previous file with comments | « xfa/fgas/localization/fgas_localemgr.cpp ('k') | xfa/fwl/theme/widgettp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698