/** * @file XTPMarkupRoutedEventArgs.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/XTPTypeId.h" #include "Common/XTPFramework.h" #include "Common/XTPSystemHelpers.h" #include "Markup/XTPMarkupTools.h" #include "Markup/XTPMarkupObject.h" #include "Markup/XTPMarkupRoutedEvent.h" #include "Markup/XTPMarkupRoutedEventArgs.h" #include "Markup/XTPMarkupIIDs.h" #include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" #ifdef _DEBUG # define new DEBUG_NEW # undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ////////////////////////////////////////////////////////////////////////// // CXTPMarkupRoutedEventArgs CXTPMarkupRoutedEventArgs::CXTPMarkupRoutedEventArgs(CXTPMarkupRoutedEvent* pEvent, CXTPMarkupObject* pSource) : CXTPMarkupObject(flagNoCom) { m_pSource = pSource; m_pEvent = pEvent; m_bHandled = FALSE; EnableAutomation(); #ifdef _XTP_ACTIVEX EnableTypeLib(); #endif } CXTPMarkupRoutedEventArgs::CXTPMarkupRoutedEventArgs() : CXTPMarkupObject(flagNoCom) { m_pSource = NULL; m_pEvent = NULL; m_bHandled = FALSE; EnableAutomation(); #ifdef _XTP_ACTIVEX EnableTypeLib(); #endif } #include "Common/Base/Diagnostic/XTPBeginAfxMap.h" BEGIN_DISPATCH_MAP(CXTPMarkupRoutedEventArgs, CXTPCmdTarget) DISP_PROPERTY_EX_ID(CXTPMarkupRoutedEventArgs, "Handled", 100, OleGetHandled, OleSetHandled, VT_BOOL) DISP_PROPERTY_EX_ID(CXTPMarkupRoutedEventArgs, "Event", 101, OleGetEvent, SetNotSupported, VT_DISPATCH) DISP_PROPERTY_EX_ID(CXTPMarkupRoutedEventArgs, "Source", 102, OleGetSource, SetNotSupported, VT_DISPATCH) END_DISPATCH_MAP() #include "Common/Base/Diagnostic/XTPEndAfxMap.h" BOOL CXTPMarkupRoutedEventArgs::OleGetHandled() { return IsHandled(); } void CXTPMarkupRoutedEventArgs::OleSetHandled(BOOL bHandled) { if (bHandled) SetHandled(); } LPDISPATCH CXTPMarkupRoutedEventArgs::OleGetEvent() { return XTPGetDispatch(GetEvent()); } LPDISPATCH CXTPMarkupRoutedEventArgs::OleGetSource() { return XTPGetDispatch(GetSource()); } #ifdef _XTP_ACTIVEX BEGIN_INTERFACE_MAP(CXTPMarkupRoutedEventArgs, CXTPCmdTarget) INTERFACE_PART(CXTPMarkupRoutedEventArgs, XTPDIID_MarkupRoutedEventArgs, Dispatch) END_INTERFACE_MAP() IMPLEMENT_OLETYPELIB_EX(CXTPMarkupRoutedEventArgs, XTPDIID_MarkupRoutedEventArgs) #endif