/** * @file XTPTaskPanelListViewOffice2003Theme.cpp * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ #include "StdAfx.h" #include "Common/XTPTypeId.h" #include "Common/XTPFramework.h" #include "Common/XTPSystemHelpers.h" #include "Common/XTPSynchro.h" #include "Common/XTPApplication.h" #include "Common/XTPSingleton.h" #include "Common/XTPGdiObjects.h" #include "Common/XTPDrawHelpers.h" #include "Common/XTPColorManager.h" #include "TaskPanel/XTPTaskPanelDefines.h" #include "TaskPanel/XTPTaskPanelItem.h" #include "TaskPanel/XTPTaskPanelGroup.h" #include "TaskPanel/XTPTaskPanelPaintManager.h" #include "TaskPanel/Themes/XTPTaskPanelPaintManagerPlain.h" #include "TaskPanel/Themes/XTPTaskPanelToolboxTheme.h" #include "TaskPanel/Themes/XTPTaskPanelListViewTheme.h" #include "TaskPanel/Themes/XTPTaskPanelListViewOfficeXPTheme.h" #include "TaskPanel/Themes/XTPTaskPanelListViewOffice2003Theme.h" #include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" #ifdef _DEBUG # undef THIS_FILE static char THIS_FILE[] = __FILE__; # define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////////// // CXTPTaskPanelListViewOffice2003Theme CXTPTaskPanelListViewOffice2003Theme::CXTPTaskPanelListViewOffice2003Theme() { m_bOfficeHighlight = XTP_TASKPANEL_HIGHLIGHT_OFFICE2003; m_bEmbossedDisabledText = FALSE; } void CXTPTaskPanelListViewOffice2003Theme::RefreshMetrics() { CXTPTaskPanelListViewOfficeXPTheme::RefreshMetrics(); m_grcPushed.SetStandardValue(GetXtremeColor(XPCOLOR_HIGHLIGHT_PUSHED)); m_grcHot.SetStandardValue(GetXtremeColor(XPCOLOR_HIGHLIGHT)); if (!XTPColorManager()->IsLunaColorsDisabled()) { XTPCurrentSystemTheme systemTheme = XTPColorManager()->GetCurrentSystemTheme(); switch (systemTheme) { case xtpSystemThemeBlue: case xtpSystemThemeRoyale: case xtpSystemThemeAero: m_clrBackground.SetStandardValue(RGB(216, 231, 252)); m_groupNormal.clrClient.SetStandardValue(RGB(216, 231, 252)); break; case xtpSystemThemeOlive: m_clrBackground.SetStandardValue(RGB(226, 231, 191)); m_groupNormal.clrClient.SetStandardValue(RGB(226, 231, 191)); break; case xtpSystemThemeSilver: m_clrBackground.SetStandardValue(RGB(223, 223, 234)); m_groupNormal.clrClient.SetStandardValue(RGB(223, 223, 234)); break; } if (systemTheme != xtpSystemThemeUnknown) { m_grcPushed.SetStandardValue(RGB(232, 127, 8), RGB(247, 218, 124)); m_grcHot.SetStandardValue(RGB(255, 255, 220), RGB(247, 192, 91)); } } m_groupNormal.clrHead.SetStandardValue(XTPColorManager()->grcDockBar.clrDark, XTPColorManager()->grcDockBar.clrLight); m_groupSpecial = m_groupNormal; } CRect CXTPTaskPanelListViewOffice2003Theme::DrawGroupCaptionBackground(CDC* pDC, CXTPTaskPanelGroup* pGroup, CRect rc) { if (pGroup->IsItemHot() || pGroup->IsItemPressed()) { XTPDrawHelpers()->GradientFill(pDC, rc, pGroup->IsItemPressed() ? m_grcPushed : m_grcHot, FALSE); } else { XTPDrawHelpers()->GradientFill(pDC, rc, GetGroupColors(pGroup)->clrHead, FALSE); } pDC->Draw3dRect(rc, GetXtremeColor(COLOR_3DHILIGHT), GetXtremeColor(XPCOLOR_FRAME)); return rc; }