/** * @file XTPFlowGraphSelectionRect.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(__XTPFLOWGRAPHVISIOSELECTIONRECT_H__) # define __XTPFLOWGRAPHVISIOSELECTIONRECT_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPFlowGraphDrawContext; // constants are in the same order as rectangles appear after GetSizingRects method /** * @brief * Defines selection rectangle hit test codes. */ enum SelectionRectHitTest { SelectionRectHitTestTopLeft = 0, /**< Specifies top left rectangle area */ SelectionRectHitTestTopCenter, /**< Specifies top center rectangle area */ SelectionRectHitTestTopRight, /**< Specifies top right rectangle area */ SelectionRectHitTestMiddleRight, /**< Specifies middle right rectangle area */ SelectionRectHitTestBottomRight, /**< Specifies bottom right rectangle area */ SelectionRectHitTestBottomCenter, /**< Specifies bottom center rectangle area */ SelectionRectHitTestBottomLeft, /**< Specifies bottom left rectangle area */ SelectionRectHitTestMiddleLeft, /**< Specifies middle left rectangle area */ SelectionRectHitTestNone /**< No rectangle area is hit */ }; class _XTP_EXT_CLASS CXTPFlowGraphSelectionRect { protected: static double m_zoomLevel; static int m_iSizeSquareSize; static void AFX_CDECL GetSizingRects(const CRect& rc, CRect* rects); static void AFX_CDECL GetSizingRectsEx(const CRect& rc, CRect* rects); public: CXTPFlowGraphSelectionRect(); virtual ~CXTPFlowGraphSelectionRect(); void Draw(CXTPFlowGraphDrawContext* pDC, const CRect& rc); static SelectionRectHitTest AFX_CDECL HitTest(const CRect& rc, const CPoint& point); static void AFX_CDECL ResizeRect(CRect& rcRect, CSize szMinSize, CPoint ptOffset, SelectionRectHitTest hitPoint); static UINT AFX_CDECL GetCursorBySelectionHitTest(SelectionRectHitTest hitTest); static void SetZoomLevel(double zoomLevel); }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPFLOWGRAPHVISIOSELECTIONRECT_H__) /** @endcond */