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 9 namespace pdfium { 10 CFWL_ThemePart(Part iPart,CFWL_Widget * pWidget)11CFWL_ThemePart::CFWL_ThemePart(Part iPart, CFWL_Widget* pWidget) 12 : m_iPart(iPart), m_pWidget(pWidget) {} 13 14 CFWL_ThemePart::~CFWL_ThemePart() = default; 15 GetThemeState() const16FWLTHEME_STATE CFWL_ThemePart::GetThemeState() const { 17 if (m_dwStates & CFWL_PartState::kDisabled) 18 return FWLTHEME_STATE::kDisable; 19 if (m_dwStates & CFWL_PartState::kPressed) 20 return FWLTHEME_STATE::kPressed; 21 if (m_dwStates & CFWL_PartState::kHovered) 22 return FWLTHEME_STATE::kHover; 23 return FWLTHEME_STATE::kNormal; 24 } 25 26 } // namespace pdfium 27