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

Side by Side Diff: xfa/fwl/core/fwl_formimp.h

Issue 1951653002: Return bool rather than bitwise-and for FX_BOOL (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More bool, fix nits. 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_listboximp.cpp ('k') | xfa/fwl/core/fwl_noteimp.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 #ifndef XFA_FWL_CORE_FWL_FORMIMP_H_ 7 #ifndef XFA_FWL_CORE_FWL_FORMIMP_H_
8 #define XFA_FWL_CORE_FWL_FORMIMP_H_ 8 #define XFA_FWL_CORE_FWL_FORMIMP_H_
9 9
10 #include "xfa/fwl/core/fwl_widgetimp.h" 10 #include "xfa/fwl/core/fwl_widgetimp.h"
(...skipping 14 matching lines...) Expand all
25 #define FWL_SYSBUTTONSTATE_Pressed 0x0002 25 #define FWL_SYSBUTTONSTATE_Pressed 0x0002
26 #define FWL_SYSBUTTONSTATE_Disabled 0x0010 26 #define FWL_SYSBUTTONSTATE_Disabled 0x0010
27 27
28 class CFWL_SysBtn { 28 class CFWL_SysBtn {
29 public: 29 public:
30 CFWL_SysBtn() { 30 CFWL_SysBtn() {
31 m_rtBtn.Set(0, 0, 0, 0); 31 m_rtBtn.Set(0, 0, 0, 0);
32 m_dwState = 0; 32 m_dwState = 0;
33 } 33 }
34 34
35 FX_BOOL IsDisabled() { return m_dwState & FWL_SYSBUTTONSTATE_Disabled; } 35 bool IsDisabled() { return !!(m_dwState & FWL_SYSBUTTONSTATE_Disabled); }
36 36
37 void SetNormal() { m_dwState &= 0xFFF0; } 37 void SetNormal() { m_dwState &= 0xFFF0; }
38 void SetPressed() { 38 void SetPressed() {
39 SetNormal(); 39 SetNormal();
40 m_dwState |= FWL_SYSBUTTONSTATE_Pressed; 40 m_dwState |= FWL_SYSBUTTONSTATE_Pressed;
41 } 41 }
42 void SetHover() { 42 void SetHover() {
43 SetNormal(); 43 SetNormal();
44 m_dwState |= FWL_SYSBUTTONSTATE_Hover; 44 m_dwState |= FWL_SYSBUTTONSTATE_Hover;
45 } 45 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 void OnMouseMove(CFWL_MsgMouse* pMsg); 179 void OnMouseMove(CFWL_MsgMouse* pMsg);
180 void OnMouseHover(CFWL_MsgMouse* pMsg); 180 void OnMouseHover(CFWL_MsgMouse* pMsg);
181 void OnMouseLeave(CFWL_MsgMouse* pMsg); 181 void OnMouseLeave(CFWL_MsgMouse* pMsg);
182 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); 182 void OnLButtonDblClk(CFWL_MsgMouse* pMsg);
183 void OnWindowMove(CFWL_MsgWindowMove* pMsg); 183 void OnWindowMove(CFWL_MsgWindowMove* pMsg);
184 void OnClose(CFWL_MsgClose* pMsg); 184 void OnClose(CFWL_MsgClose* pMsg);
185 CFWL_FormImp* m_pOwner; 185 CFWL_FormImp* m_pOwner;
186 }; 186 };
187 187
188 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ 188 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_listboximp.cpp ('k') | xfa/fwl/core/fwl_noteimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698