/** * @file XTPTrackHeader.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(__XTPTRACKEADER_H__) # define __XTPTRACKEADER_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * This class represents a track control header. */ class _XTP_EXT_CLASS CXTPTrackHeader : public CXTPGridHeader { public: /** * @brief * Creates a CXTPTrackHeader object. * @param pControl Pointer to the Grid control. * @param pColumns Pointer to the grid columns. */ CXTPTrackHeader(CXTPGridControl* pControl, CXTPGridColumns* pColumns); /** * @brief * CXTPTrackHeader default destructor. */ ~CXTPTrackHeader(); public: /** * @brief * Call this function to draw the block. * @param pDC Pointer to the device context. * @param rcHeader Header rectangle. * @param nLeftOffset Left offset. */ void Draw(CDC* pDC, CRect rcHeader, int nLeftOffset); /** * @brief * This function is called when the left mouse button is clicked on the header. * @param ptClick Point where the mouse event occurred. */ void OnLButtonDown(CPoint ptClick); /** * @brief * This function is called when the mouse is moved over the header. * @param nFlags State of mouse buttons, while the mouse is moved. * @param point Point where the mouse event occurred. */ void OnMouseMove(UINT nFlags, CPoint point); /** * @brief * This function is called when the scrollbar is about to be resized/dragged. * @param bResize TRUE if the scrollbar is about to be resized, * FALSE if the scrollbar is about to be dragged. */ void StartDragScrollBar(BOOL bResize); /** * @brief * This function is called when the slider is about to be resized/dragged. * @param bResize TRUE if the slider is about to be resized, * FALSE if the slider is about to be dragged. */ void StartDragSlider(BOOL bResize); /** * @brief * This function is called when the marker is about to be dragged. * @param nMarkerIndex Zero-based index of the marker which is about * to be dragged. */ void StartDragMarker(int nMarkerIndex); protected: /** * @brief * Call this function to resize/move the slider. * @param pt New position for the slider. * @param bResize TRUE if the slider is resizing, * FALSE if the slider is moving. */ void OnMoveSlider(CPoint pt, BOOL bResize); /** * @brief * Call this function to move the marker. * @param pt New position for the marker. * @param nMarkerIndex Zero-based index of the marker which is moving. */ void OnMoveMarker(CPoint pt, int nMarkerIndex); /** * @brief * Call this function to resize/move the scrollbar. * @param pt New position for the scrollbar. * @param bResize TRUE if the scrollbar is resizing, * FALSE if the scrollbar is moving. */ void OnMoveScrollBar(CPoint pt, BOOL bResize); protected: CPoint m_ptStartDrag; /**< The drag start point. */ int m_nOldWorkAreaMin; /**< The old work area minimum value. */ int m_nOldWorkAreaMax; /**< The old work area maximum value. */ int m_nOldViewPortMin; /**< The old view port minimum value. */ int m_nOldViewPortMax; /**< The old view port maximum value. */ int m_nOldMarkerPos; /**< The old marker position. */ }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPTRACKEADER_H__) /** @endcond */