/** * @file XTPControlGalleryResourceTheme.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(__XTPCONTROLGALLERYRESOURCETHEME_H__) # define __XTPCONTROLGALLERYRESOURCETHEME_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * The CXTPControlGalleryResourceTheme class is used to enable a * Gallery Resource style theme for Command Bars. * @see * CXTPPaintManager::SetTheme */ class _XTP_EXT_CLASS CXTPControlGalleryResourceTheme : public CXTPControlGalleryPaintManager { public: /** * @brief * Constructs a CXTPControlGalleryResourceTheme object. * @param pPaintManager Reference to a CXTPPaintManager object. */ CXTPControlGalleryResourceTheme(CXTPPaintManager* pPaintManager); public: /** * @brief * This method is called to draw the background of the gallery. * @param pDC Pointer to device context. * @param pGallery CXTPControlGallery object to draw. * @param rc Bounding rectangle of gallery object. */ virtual void FillControl(CDC* pDC, CXTPControlGallery* pGallery, CRect rc); /** * @brief * This method is called to draw the scrollbar of the inplace gallery. * @param pDC Pointer to device context. * @param pGallery CXTPControlGallery object to draw. * @see * DrawScrollBar */ virtual void DrawPopupScrollBar(CDC* pDC, CXTPControlGallery* pGallery); /** * @brief * This method is called to draw the label control. * @param pDC Pointer to device context. * @param pLabel Label item. * @param rc Bounding rectangle of the label. */ virtual void DrawLabel(CDC* pDC, CXTPControlGalleryItem* pLabel, CRect rc); /** * @brief * This method is called to refresh the visual metrics of the manager. */ virtual void RefreshMetrics(); protected: COLORREF m_clrControlGallerySelected; /**< Selected item color. */ COLORREF m_clrControlGalleryNormal; /**< Normal item color. */ COLORREF m_clrControlGalleryBorder; /**< Border color. */ }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // !defined(__XTPCONTROLGALLERYRESOURCETHEME_H__) /** @endcond */