/** * @file XTPCoreTreePaintManager.h * * @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 * */ /** @cond */ #if !defined(__XTPCORETREEPAINTMANAGER_H__) # define __XTPCORETREEPAINTMANAGER_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPCoreTreeControl; class CXTPCoreTreeItem; class CXTPWinThemeWrapper; class _XTP_EXT_CLASS CXTPCoreTreePaintManager { public: CXTPCoreTreePaintManager(); virtual ~CXTPCoreTreePaintManager(); public: virtual void RefreshMetrics(); public: virtual void FillTreeControl(CDC* pDC, CXTPCoreTreeControl* pTreeControl); virtual void DrawItem(CDC* pDC, CXTPCoreTreeItem* pItem); virtual int GetChildrenIndent(CXTPCoreTreeItem* pItem); virtual int GetItemHeight() const; virtual void SetFontIndirect(LOGFONT* pLogFont); virtual void DrawDropRect(CDC* pDC, CXTPCoreTreeItem* pItem); BOOL IsAppThemed() const; protected: virtual void DrawButton(CDC* pDC, CXTPCoreTreeItem* pItem, CRect rcItem); virtual void DrawCheckbox(CDC* pDC, CXTPCoreTreeItem* pItem, CRect rcItem); public: BOOL m_bShowButtons; void EnableTheme(BOOL bEnable); protected: BOOL m_bEnableTheme; COLORREF m_clrBackground; COLORREF m_clrText; COLORREF m_clrLabelText; COLORREF m_clrLabelBackground; COLORREF m_clrSelectedText; COLORREF m_clrSelectedBackground; COLORREF m_clrDisabledText; CXTPWinThemeWrapper* m_themeButton; CXTPWinThemeWrapper* m_themeTree; int m_nItemHeight; CXTPFont m_xtpFontItem; CXTPFont m_xtpFontLabel; XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fntItem, m_xtpFontItem, GetItemFontHandle); XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fntLabel, m_xtpFontLabel, GetLabelFontHandle); }; /** @cond */ AFX_INLINE int CXTPCoreTreePaintManager::GetItemHeight() const { return m_nItemHeight; } /** @endcond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPCORETREEPAINTMANAGER_H__) /** @endcond */