24#if FRX_MAJOR_VERSION >= 2024
25#include "../_impl_include/include_x64/OdaX.h"
27#include "../_impl_include/include_x64/OdaX2.h"
30#if FRX_MAJOR_VERSION >= 2024
31#include "../_impl_include/include_x86/OdaX.h"
33#include "../_impl_include/include_x86/OdaX2.h"
40 :
public ICategorizeProperties
41 ,
public IPerPropertyBrowsing
58 return ::AcOpmMapPropertyToCategory(
reinterpret_cast<IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispid , ppropcat );
63 return ::AcOpmGetCategoryName(
reinterpret_cast<IUnknown*
>(
this ) , GetResourceInstance( ) , T::GetOPMPropertyMap( ) , propcat , lcid , pbstrName );
69 return ::AcOpmGetDisplayString(
reinterpret_cast<IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , pBstr );
74 return ::AcOpmMapPropertyToPage(
reinterpret_cast<IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , pClsid );
79 return ::AcOpmGetPredefinedStrings(
reinterpret_cast<IUnknown*
>(
this ) , GetResourceInstance( ) , T::GetOPMPropertyMap( ) , dispID , pCaStringsOut , pCaCookiesOut );
84 return ::AcOpmGetPredefinedValue(
reinterpret_cast<IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , dwCookie , pVarOut );
90 return ::AcOpmGetDisplayName(
reinterpret_cast<IUnknown*
>(
this ) , GetResourceInstance( ) , T::GetOPMPropertyMap( ) , dispID , pBstr );
93 STDMETHODIMP
Editable( DISPID dispID , BOOL __RPC_FAR *bEditable )
95 return ::AcOpmEditable(
reinterpret_cast<IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , bEditable );
100 return ::AcOpmShowProperty(
reinterpret_cast<IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , pShow );
104#define ICategorizeProperties2Impl IAcPiCategorizePropertiesImpl
115 return m_CategoryVector;
120 return m_CatCmdBtnVector;
174 m_CatCmdBtnVector.clear( );
175 m_CategoryVector.clear( );
177 while ( !IsDefaultCmdBtnEntry( T::GetCmdBtnArray( ) [ i ] ) )
179 m_CatCmdBtnVector.push_back( T::GetCmdBtnArray( ) [ i ] );
184 while ( !IsDefaultCategoryEntry( T::GetCatArray( ) [ i ] ) )
186 m_CategoryVector.push_back( T::GetCatArray( ) [ i ] );
206 hr =
AcOpmGetCategoryName(
reinterpret_cast< IUnknown*
>(
this ) , GetResourceInstance( ) , T::GetOPMPropertyMap( ) , propcat , lcid , pbstrName );
207 if ( hr == S_FALSE ) {
208 hr =
AcOpmGetCategoryName(
reinterpret_cast< IUnknown*
>(
this ) , GetResourceInstance( ) , GetCategoryVector( ) , propcat , lcid , pbstrName );
215 return AcOpmGetCategoryDescription(
reinterpret_cast< IUnknown*
>(
this ) , GetResourceInstance( ) , GetCategoryVector( ) , propcat , lcid , pbstrDesc );
220 return AcOpmGetCategoryWeight(
reinterpret_cast< IUnknown*
>(
this ) , GetCategoryVector( ) , CatID , pCategoryWeight );
225 return AcOpmGetParentCategory(
reinterpret_cast< IUnknown*
>(
this ) , GetCategoryVector( ) , CatID , pParentCatID );
230 return AcOpmGetCategoryCommandButtons(
reinterpret_cast< IUnknown*
>(
this ) , GetResourceInstance( ) , GetCmdBtnVector( ) , CatID , pCatCmdBtns );
236 public IPerPropertyBrowsing ,
253 return ::AcOpmGetDisplayString(
reinterpret_cast< IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , pBstr );
258 return ::AcOpmMapPropertyToPage(
reinterpret_cast< IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , pClsid );
263 return ::AcOpmGetPredefinedStrings(
reinterpret_cast< IUnknown*
>(
this ) , GetResourceInstance( ) , T::GetOPMPropertyMap( ) , dispID , pCaStringsOut , pCaCookiesOut );
268 return ::AcOpmGetPredefinedValue(
reinterpret_cast< IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , dwCookie , pVarOut );
274 return ::AcOpmGetDisplayName(
reinterpret_cast< IUnknown*
>(
this ) , GetResourceInstance( ) , T::GetOPMPropertyMap( ) , dispID , pBstr );
277 STDMETHODIMP
Editable( DISPID dispID , BOOL __RPC_FAR *bEditable )
279 return ::AcOpmEditable(
reinterpret_cast< IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , bEditable );
284 return ::AcOpmShowProperty(
reinterpret_cast< IUnknown*
>(
this ) , T::GetOPMPropertyMap( ) , dispID , pShow );
295 T* pT =
static_cast<T*
>( this );
299 IUnknown** pp = this->m_vec.begin( );
300 while ( pp < this->m_vec.end( ) )
305 _ASSERTE( pAcadObjectEvents != NULL );
307 pAcadObjectEvents->Modified( pAcadObject );
317 :
public IConnectionPointImpl<T , &IID_IPropertyNotifySink , CComDynamicUnkArray>
326 T* pT =
static_cast< T*
>( this );
328 IUnknown** pp = this->m_vec.begin( );
329 while ( pp < this->m_vec.end( ) )
331 IPropertyNotifySink* pNotifySink =
reinterpret_cast< IPropertyNotifySink*
>( *pp );
333 pNotifySink->OnChanged( dispId );
348template <
class T , const CLSID* pcls
id>
350 :
public IAcadBaseObject
351 ,
public IConnectionPointContainerImpl<T>
391 HRESULT hr = NullObjectId( );
397 hr = CreateNewObject( objId , ownerId , keyName );
424 STDMETHOD( GetClassID )(
CLSID& clsid )
430 STDMETHOD( NullObjectId )( void )
438 STDMETHOD( OnModified )( void )
440 this->Fire_Modified( );
441 this->Fire_OnChanged( );
446 BEGIN_CONNECTION_POINT_MAP( T )
448 CONNECTION_POINT_ENTRY( IID_IPropertyNotifySink )
449 END_CONNECTION_POINT_MAP( )
454template <class T , const
CLSID* pclsid>
456 : public IAcadBaseObject2,
474 if ( pObj->objectId( ).isNull( ) )
476 this->NullObjectId( );
477 m_objRef.acquire( pObj );
482 m_objRef.acquire( pObj->objectId( ) );
484 return this->SetObjectId( tmpId );
490 if ( m_objRef.objectId( ).isNull( ) )
492 this->Fire_Modified( );
493 this->Fire_OnChanged( dispId );
497 STDMETHOD( ForceDbResident )( VARIANT_BOOL* forceDbResident )
500 if ( NULL == forceDbResident )
514 STDMETHOD(ObjectExists)(VARIANT_BOOL* objectExists)
516 if ( NULL == objectExists )
525 if ( !m_objRef.objectId( ).isNull( ) )
529 m_objRef.release( tmpId , pObj );
530 _ASSERTE( this->m_objId.
isNull( ) );
531 _ASSERTE( tmpId.
isNull( ) );
545 public IRetrieveApplication
571 STDMETHOD( SetApplicationObject )( LPDISPATCH pApp )
585 STDMETHOD( GetApplicationObject )( LPDISPATCH* pApp )
601 GetApplicationObject( &pRes );
612template <
class C ,
const CLSID* pclsid ,
class T ,
const IID* piid ,
const GUID* plibid ,
613 WORD wMajor = 1 , WORD wMinor = 0 ,
class tihclass = CComTypeInfoHolder>
615 :
public IDispatchImpl<T , piid , plibid , wMajor , wMinor , tihclass>
620 REFGUID
defItf( )
const {
return *piid; }
632 STDMETHOD( get_Application )( LPDISPATCH* pVal )
634 return GetApplicationObject( pVal );
637 STDMETHOD( get_ObjectID )( LONG_PTR *pVal )
643 *pVal = ( LONG_PTR ) ( AcDbStub* ) this->m_objId;
647 STDMETHOD( get_OwnerID )( LONG_PTR *pVal )
649 return ::AcAxGetOwnerId( this->m_objId , pVal );
652 STDMETHOD( Delete )( )
655 if ( SUCCEEDED( hr ) )
656 this->removeAllReactors( );
660 STDMETHOD( SetXData )( VARIANT type , VARIANT data )
662 return ::AcAxSetXData( this->m_objId , type , data );
665 STDMETHOD( GetXData )( BSTR bstrName , VARIANT* type , VARIANT* data )
667 return ::AcAxGetXData( this->m_objId , bstrName , type , data );
670 STDMETHOD( get_ObjectName )( BSTR *pVal )
672 return ::AcAxGetObjectName( this->m_objId , pVal );
675 STDMETHOD( get_Handle )( BSTR *pVal )
677 return ::AcAxGetHandle( this->m_objId , pVal );
680 STDMETHOD( get_HasExtensionDictionary )( VARIANT_BOOL* bHasDictionary )
682 return ::AcAxHasExtensionDictionary( this->m_objId , bHasDictionary );
687 return ::AcAxGetExtensionDictionary( this->m_objId , m_App , pExtDictionary );
704 STDMETHOD( get_Document )( LPDISPATCH* pDocument )
713 _ASSERTE( pOleLinkManager != NULL );
715 *pDocument = pOleLinkManager->
GetDocIDispatch( this->m_objId.database( ) );
716 if ( *pDocument == NULL )
721 ( *pDocument )->AddRef( );
729 STDMETHOD( Erase )( )
736 static const IID* arr [ ] =
741 for (
int i = 0; i <
sizeof( arr ) /
sizeof( arr [ 0 ] ); i++ )
743 if ( InlineIsEqualGUID( *arr [ i ] , riid ) )
interface IAcPiCategorizeProperties IAcPiCategorizeProperties
interface IAcadDictionary IAcadDictionary
interface IAcadObjectEvents IAcadObjectEvents
interface IAcadDatabase IAcadDatabase
interface IAcadObject IAcadObject
EXTERN_C const IID IID_IAcadObject
interface IOPMPropertyExtension IOPMPropertyExtension
EXTERN_C const IID IID_IAcadObjectEvents
ARX_API class AcAxOleLinkManager * AcAxGetOleLinkManager(void)
ARX_API long __cdecl AcOpmGetParentCategory(IUnknown *, class std::vector< struct CATEGORY_ENTRY, class std::allocator< struct CATEGORY_ENTRY > > &, int, int *)
ARX_API long __cdecl AcOpmGetCategoryCommandButtons(IUnknown *, struct HINSTANCE__ *, class std::vector< struct CATCMDBTN_ENTRY, class std::allocator< struct CATCMDBTN_ENTRY > > &, int, VARIANT *)
ARX_API long __cdecl AcOpmGetCategoryWeight(IUnknown *, class std::vector< struct CATEGORY_ENTRY, class std::allocator< struct CATEGORY_ENTRY > > &, int, long *)
ARX_API long __cdecl AcAxErase(AcAxObjectRef &)
ARX_API long __cdecl AcOpmGetCategoryName(IUnknown *, struct HINSTANCE__ *, class std::vector< struct CATEGORY_ENTRY, class std::allocator< struct CATEGORY_ENTRY > > &, int, unsigned long, BSTR *)
ARX_API long __cdecl AcOpmGetCategoryDescription(IUnknown *, struct HINSTANCE__ *, class std::vector< struct CATEGORY_ENTRY, class std::allocator< struct CATEGORY_ENTRY > > &, int, unsigned long, BSTR *)
ARX_API long __cdecl AcOpmMapPropertyToCategory(IUnknown *, struct ACAD_OPMPROPMAP_ENTRY *, long, int *)
#define ACAX_VARIANT_TRUE
#define ACAX_VARIANT_FALSE
virtual int SetIUnknown(AcDbDatabase *, IUnknown *)
virtual IDispatch * GetDocIDispatch(AcDbDatabase *)
static ARX_API_STATIC const AcDbObjectId kNull
AcDbDatabase * database(void) const
void Fire_OnChanged(DISPID dispId)
IAcPiCategorizePropertiesImpl()
virtual HINSTANCE GetResourceInstance()=0
STDMETHODIMP GetParentCategory(PROPCAT CatID, PROPCAT *pParentCatID)
CATCMDBTN_VECTOR m_CatCmdBtnVector
STDMETHODIMP GetCommandButtons(PROPCAT CatID, VARIANT *pCatCmdBtns)
STDMETHODIMP GetCategoryDescription(PROPCAT propcat, LCID lcid, BSTR *pbstrDesc)
CATCMDBTN_VECTOR & GetCmdBtnVector()
bool IsDefaultCategoryEntry(CATEGORY_ENTRY in)
STDMETHODIMP GetCategoryWeight(PROPCAT CatID, long *pCategoryWeight)
STDMETHODIMP GetCategoryName(PROPCAT propcat, LCID lcid, BSTR *pbstrName)
virtual ~IAcPiCategorizePropertiesImpl()
STDMETHODIMP MapPropertyToCategory(DISPID dispid, PROPCAT *ppropcat)
CATEGORY_VECTOR & GetCategoryVector()
bool IsDefaultCmdBtnEntry(CATCMDBTN_ENTRY in)
CATEGORY_VECTOR m_CategoryVector
void Fire_Notification(DISPID dispId=DISPID_UNKNOWN)
virtual ~IAcadBaseObject2Impl()
virtual ~IAcadBaseObjectImpl()
virtual HRESULT CreateNewObject(AcDbObjectId &, AcDbObjectId &, TCHAR *)
IAcadObjectDispatchImpl()
STDMETHODIMP InterfaceSupportsErrorInfo(REFIID riid)
AcDbHostAppServices * hostApp() const
virtual ~IAcadObjectDispatchImpl()
STDMETHODIMP GetDisplayName(DISPID dispID, BSTR *pBstr)
IOPMPropertyExtensionImpl2()
STDMETHODIMP GetPredefinedStrings(DISPID dispID, CALPOLESTR *pCaStringsOut, CADWORD *pCaCookiesOut)
virtual HINSTANCE GetResourceInstance()=0
STDMETHODIMP MapPropertyToPage(DISPID dispID, CLSID *pClsid)
STDMETHODIMP GetPredefinedValue(DISPID dispID, DWORD dwCookie, VARIANT *pVarOut)
STDMETHODIMP GetDisplayString(DISPID dispID, BSTR *pBstr)
virtual ~IOPMPropertyExtensionImpl2()
STDMETHODIMP ShowProperty(DISPID dispID, BOOL *pShow)
STDMETHODIMP Editable(DISPID dispID, BOOL __RPC_FAR *bEditable)
IOPMPropertyExtensionImpl()
STDMETHODIMP GetDisplayString(DISPID dispID, BSTR *pBstr)
STDMETHODIMP GetDisplayName(DISPID dispID, BSTR *pBstr)
virtual HINSTANCE GetResourceInstance()=0
STDMETHODIMP MapPropertyToCategory(DISPID dispid, PROPCAT *ppropcat)
virtual ~IOPMPropertyExtensionImpl()
STDMETHODIMP ShowProperty(DISPID dispID, BOOL *pShow)
STDMETHODIMP MapPropertyToPage(DISPID dispID, CLSID *pClsid)
STDMETHODIMP GetPredefinedValue(DISPID dispID, DWORD dwCookie, VARIANT *pVarOut)
STDMETHODIMP GetPredefinedStrings(DISPID dispID, CALPOLESTR *pCaStringsOut, CADWORD *pCaCookiesOut)
STDMETHODIMP GetCategoryName(PROPCAT propcat, LCID lcid, BSTR *pbstrName)
STDMETHODIMP Editable(DISPID dispID, BOOL __RPC_FAR *bEditable)
IRetrieveApplicationImpl()
virtual ~IRetrieveApplicationImpl()
IDispatchPtr GetApplicationObject()
std::vector< CATCMDBTN_ENTRY > CATCMDBTN_VECTOR
std::vector< CATEGORY_ENTRY > CATEGORY_VECTOR
const ACHAR * m_lpEnBtnBmpRes
const ACHAR * m_lpDisBtnBmpRes