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

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

Issue 1938163002: More define cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 7 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/fwl/basewidget/fwl_pushbuttonimp.cpp ('k') | xfa/fwl/basewidget/fwl_spinbuttonimp.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/basewidget/ifwl_scrollbar.h" 9 #include "xfa/fwl/basewidget/ifwl_scrollbar.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 : m_pOwner(pOwner) {} 629 : m_pOwner(pOwner) {}
630 630
631 int32_t CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { 631 int32_t CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
632 if (!pMessage) 632 if (!pMessage)
633 return 0; 633 return 0;
634 634
635 int32_t iRet = 1; 635 int32_t iRet = 1;
636 CFWL_MessageType dwMsgCode = pMessage->GetClassID(); 636 CFWL_MessageType dwMsgCode = pMessage->GetClassID();
637 if (dwMsgCode == CFWL_MessageType::Mouse) { 637 if (dwMsgCode == CFWL_MessageType::Mouse) {
638 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); 638 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
639 uint32_t dwCmd = pMsg->m_dwCmd; 639 switch (pMsg->m_dwCmd) {
640 switch (dwCmd) { 640 case FWL_MouseCommand::LeftButtonDown: {
641 case FWL_MSGMOUSECMD_LButtonDown: {
642 OnLButtonDown(pMsg->m_dwFlags, pMsg->m_fx, pMsg->m_fy); 641 OnLButtonDown(pMsg->m_dwFlags, pMsg->m_fx, pMsg->m_fy);
643 break; 642 break;
644 } 643 }
645 case FWL_MSGMOUSECMD_LButtonUp: { 644 case FWL_MouseCommand::LeftButtonUp: {
646 OnLButtonUp(pMsg->m_dwFlags, pMsg->m_fx, pMsg->m_fy); 645 OnLButtonUp(pMsg->m_dwFlags, pMsg->m_fx, pMsg->m_fy);
647 break; 646 break;
648 } 647 }
649 case FWL_MSGMOUSECMD_MouseMove: { 648 case FWL_MouseCommand::Move: {
650 OnMouseMove(pMsg->m_dwFlags, pMsg->m_fx, pMsg->m_fy); 649 OnMouseMove(pMsg->m_dwFlags, pMsg->m_fx, pMsg->m_fy);
651 break; 650 break;
652 } 651 }
653 case FWL_MSGMOUSECMD_MouseLeave: { 652 case FWL_MouseCommand::Leave: {
654 OnMouseLeave(); 653 OnMouseLeave();
655 break; 654 break;
656 } 655 }
657 default: { 656 default: {
658 iRet = 0; 657 iRet = 0;
659 break; 658 break;
660 } 659 }
661 } 660 }
662 } else if (dwMsgCode == CFWL_MessageType::MouseWheel) { 661 } else if (dwMsgCode == CFWL_MessageType::MouseWheel) {
663 CFWL_MsgMouseWheel* pMsg = static_cast<CFWL_MsgMouseWheel*>(pMessage); 662 CFWL_MsgMouseWheel* pMsg = static_cast<CFWL_MsgMouseWheel*>(pMessage);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 } 804 }
806 void CFWL_ScrollBarImpDelegate::DoMouseHover(int32_t iItem, 805 void CFWL_ScrollBarImpDelegate::DoMouseHover(int32_t iItem,
807 const CFX_RectF& rtItem, 806 const CFX_RectF& rtItem,
808 int32_t& iState) { 807 int32_t& iState) {
809 if (iState == CFWL_PartState_Hovered) { 808 if (iState == CFWL_PartState_Hovered) {
810 return; 809 return;
811 } 810 }
812 iState = CFWL_PartState_Hovered; 811 iState = CFWL_PartState_Hovered;
813 m_pOwner->Repaint(&rtItem); 812 m_pOwner->Repaint(&rtItem);
814 } 813 }
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_pushbuttonimp.cpp ('k') | xfa/fwl/basewidget/fwl_spinbuttonimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698