blob: 7294a1aa90e6974f7ccfbdac1782d57a61d344cf [file] [log] [blame]
// Copyright 2016 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc.
#include "xfa/fwl/cfwl_themepart.h"
CFWL_ThemePart::CFWL_ThemePart(Part iPart, CFWL_Widget* pWidget)
: m_iPart(iPart), m_pWidget(pWidget) {}
CFWL_ThemePart::~CFWL_ThemePart() = default;
FWLTHEME_STATE CFWL_ThemePart::GetThemeState() const {
if (m_dwStates & CFWL_PartState::kDisabled)
return FWLTHEME_STATE::kDisable;
if (m_dwStates & CFWL_PartState::kPressed)
return FWLTHEME_STATE::kPressed;
if (m_dwStates & CFWL_PartState::kHovered)
return FWLTHEME_STATE::kHover;
return FWLTHEME_STATE::kNormal;