/** * @file XTPProgressBase.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(__XTPPROGRESSBASE_H__) # define __XTPPROGRESSBASE_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPProgressPaintManager; /** * @brief * CXTPControlProgressBase is base class for all progress objects */ class _XTP_EXT_CLASS CXTPProgressBase { public: /** * @brief * Constructs a CXTPProgressBase object */ CXTPProgressBase(); /** * @brief * Destroys a CXTPProgressBase object, handles cleanup and deallocation */ virtual ~CXTPProgressBase(); public: /** * @brief * Sets the upper and lower limits of the progress bar control's range. * @param nLower Lower limit of the progress bar control's range. * @param nUpper Upper limit of the progress bar control's range. */ void SetRange(int nLower, int nUpper); /** * @brief * Gets the upper and lower limits of the progress bar control's range. * @param nLower Lower limit of the progress bar control's range. * @param nUpper Upper limit of the progress bar control's range. */ void GetRange(int& nLower, int& nUpper) const; /** * @brief * Gets the current position of the progress bar, whose return value * is always between the values for the Max and Min properties, inclusive. * @return * Current position of the progress bar. */ int GetPos() const; /** * @brief * Sets the current position of the progress bar, whose return value * is always between the values for the Max and Min properties, inclusive. * @param nPos Position to move progress bar. */ void SetPos(int nPos); public: /** * @brief * This method is called to get bounding rectangle of progressbar * @return Progress rectangle. */ virtual CRect GetProgressRect() = 0; protected: /** * @brief * This method is called to redraw progress bar */ virtual void RedrawProgress() = 0; /** * @brief * This method is called to retrieve pointer to CXTPProgressPaintManager * @return Returns a pointer to CXTPProgressPaintManager */ virtual CXTPProgressPaintManager* GetProgressPaintManager() const = 0; protected: int m_nMin; /**< Minimum */ int m_nMax; /**< Maximum */ int m_nPos; /**< Current position */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPPROGRESSBASE_H__) /** @endcond */