/** * @file XTPStatusBarPaneScrollBar.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(__XTPSTATUSBARPANESCROLLBAR_H__) # define __XTPSTATUSBARPANESCROLLBAR_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPStatusBarScrollBarPane is a CXTPStatusBarPane derived class. * CXTPStatusBarScrollBarPane works with CXTStatusBar and allows * you to create a themed ScrollBar in your status bar area. */ class _XTP_EXT_CLASS CXTPStatusBarScrollBarPane : public CXTPStatusBarPane , public CXTPScrollBase { /** @cond */ DECLARE_DYNAMIC(CXTPStatusBarScrollBarPane) /** @endcond */ public: /** * @brief * Constructs a CXTPStatusBarScrollBarPane object. */ CXTPStatusBarScrollBarPane(); /** * @brief * Destroys a CXTPStatusBarScrollBarPane object, handles cleanup and * deallocation. */ virtual ~CXTPStatusBarScrollBarPane(); public: /** * @brief * Call this method to set the position of the scrollbar. * @param nValue Scrollbar position to be set. */ void SetPos(int nValue); /** * @brief * Sets the rangle of the scroll bar. * @param nMin Lower limit of the scrollbar control's range. * @param nMax Upper limit of the scrollbar control's range. */ void SetRange(int nMin, int nMax); /** * @brief * Gets the current position of the scroll bar, whose return value * is always between the values for the Max and Min properties, inclusive. * @return * Current position of the scroll bar. */ int GetPos() const; public: /** * @brief * Call this method to set a tooltip for the scroll part of scrollbar. * @param nPart Part of the scrollbar to set the tooltip. Can be XTP_HTSCROLLUP, * XTP_HTSCROLLDOWN, XTP_HTSCROLLUPPAGE, XTP_HTSCROLLDOWNPAGE, * XTP_HTSCROLLTHUMB. * @param lpszTooltip Text of the tooltip to be set. */ void SetTooltipPart(int nPart, LPCTSTR lpszTooltip); protected: /** @cond */ virtual CRect GetScrollBarRect(); virtual void GetScrollInfo(SCROLLINFO* psi); virtual void DoScroll(int cmd, int pos); virtual void RedrawScrollBar(); virtual CXTPScrollBarPaintManager* GetScrollBarPaintManager() const; virtual BOOL IsScrollBarEnabled() const; virtual CWnd* GetParentWindow() const; virtual INT_PTR OnToolHitTest(CPoint point, TOOLINFO* pTI) const; virtual void OnDraw(CDC* pDC, CRect rcItem); virtual void OnMouseMove(CPoint point); virtual void OnLButtonDown(CPoint point); /** @endcond */ protected: int m_nMin; /**< Lower limit of the scrollbar control's range. */ int m_nMax; /**< Upper limit of the scrollbar control's range. */ int m_nValue; /**< Scrollbar position. */ int m_nPage; /**< Scrollbar Page. */ CString m_strToolTipPart[5]; /**< Text of tooltip. */ }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // !defined(__XTPSTATUSBARPANESCROLLBAR_H__) /** @endcond */