/** * @file XTPGridBehaviorRowMouse.cpp * * @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 * */ #include "StdAfx.h" #include "Common/XTPCasting.h" #include "Common/XTPFramework.h" #include "Common/XTPCustomHeap.h" #include "GridControl/XTPGridDefines.h" #include "GridControl/Behavior/XTPGridBehavior.h" #include "GridControl/XTPGridControlIIDs.h" #include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" #ifdef _DEBUG # undef THIS_FILE static char THIS_FILE[] = __FILE__; # define new DEBUG_NEW #endif CXTPGridBehaviorRowMouse::CXTPGridBehaviorRowMouse(XTPGridMouseEvent event) : Left(NULL) , Right(NULL) { Left = new CXTPGridBehaviorRowMouseButton(xtpGridMouseButtonLeft, event); Right = new CXTPGridBehaviorRowMouseButton(xtpGridMouseButtonRight, event); #ifdef _XTP_ACTIVEX EnableAutomation(); EnableTypeLib(); #endif } CXTPGridBehaviorRowMouse::~CXTPGridBehaviorRowMouse() { SAFE_DELETE(Left); SAFE_DELETE(Right); } #ifdef _XTP_ACTIVEX BEGIN_DISPATCH_MAP(CXTPGridBehaviorRowMouse, CXTPCmdTarget) DISP_FUNCTION_ID(CXTPGridBehaviorRowMouse, "LeftButton", 1, OleGetLeft, VT_DISPATCH, VTS_NONE) DISP_FUNCTION_ID(CXTPGridBehaviorRowMouse, "RightButton", 2, OleGetRight, VT_DISPATCH, VTS_NONE) END_DISPATCH_MAP() BEGIN_INTERFACE_MAP(CXTPGridBehaviorRowMouse, CXTPCmdTarget) INTERFACE_PART(CXTPGridBehaviorRowMouse, XTPDIID_IGridBehaviorRowMouse, Dispatch) END_INTERFACE_MAP() IMPLEMENT_OLETYPELIB_EX(CXTPGridBehaviorRowMouse, XTPDIID_IGridBehaviorRowMouse) LPDISPATCH CXTPGridBehaviorRowMouse::OleGetLeft() { return XTPGetDispatch(Left); } LPDISPATCH CXTPGridBehaviorRowMouse::OleGetRight() { return XTPGetDispatch(Right); } #endif // _XTP_ACTIVEX