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

Side by Side Diff: xfa/fwl/cfwl_sysbtn.cpp

Issue 2578603002: Remove unused sysbtn code (Closed)
Patch Set: Rebase to master 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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/cfwl_sysbtn.h ('k') | xfa/fwl/fwl_widgetdef.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "xfa/fwl/cfwl_sysbtn.h"
8
9 #include "xfa/fwl/cfwl_themepart.h"
10
11 CFWL_SysBtn::CFWL_SysBtn() {
12 m_rtBtn.Set(0, 0, 0, 0);
13 m_dwState = 0;
14 }
15
16 CFWL_SysBtn::~CFWL_SysBtn() {}
17
18 bool CFWL_SysBtn::IsDisabled() const {
19 return !!(m_dwState & FWL_SYSBUTTONSTATE_Disabled);
20 }
21
22 void CFWL_SysBtn::SetNormal() {
23 m_dwState &= 0xFFF0;
24 }
25
26 void CFWL_SysBtn::SetPressed() {
27 SetNormal();
28 m_dwState |= FWL_SYSBUTTONSTATE_Pressed;
29 }
30
31 void CFWL_SysBtn::SetHover() {
32 SetNormal();
33 m_dwState |= FWL_SYSBUTTONSTATE_Hover;
34 }
35
36 void CFWL_SysBtn::SetDisabled(bool bDisabled) {
37 bDisabled ? m_dwState |= FWL_SYSBUTTONSTATE_Disabled
38 : m_dwState &= ~FWL_SYSBUTTONSTATE_Disabled;
39 }
40
41 uint32_t CFWL_SysBtn::GetPartState() const {
42 if (IsDisabled())
43 return CFWL_PartState_Disabled;
44 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed)
45 return CFWL_PartState_Pressed;
46 if (m_dwState & FWL_SYSBUTTONSTATE_Hover)
47 return CFWL_PartState_Hovered;
48 return CFWL_PartState_Normal;
49 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_sysbtn.h ('k') | xfa/fwl/fwl_widgetdef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698