• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The PDFium Authors
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_themepart.h"
8 
CFWL_ThemePart(Part iPart,CFWL_Widget * pWidget)9 CFWL_ThemePart::CFWL_ThemePart(Part iPart, CFWL_Widget* pWidget)
10     : m_iPart(iPart), m_pWidget(pWidget) {}
11 
12 CFWL_ThemePart::~CFWL_ThemePart() = default;
13 
GetThemeState() const14 FWLTHEME_STATE CFWL_ThemePart::GetThemeState() const {
15   if (m_dwStates & CFWL_PartState::kDisabled)
16     return FWLTHEME_STATE::kDisable;
17   if (m_dwStates & CFWL_PartState::kPressed)
18     return FWLTHEME_STATE::kPressed;
19   if (m_dwStates & CFWL_PartState::kHovered)
20     return FWLTHEME_STATE::kHover;
21   return FWLTHEME_STATE::kNormal;
22 }
23