CFx SDK Documentation  2020SP3
odaxwrap.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 
26 
27 #ifndef _ODAXWRAP_H_INCLUDED_
28 #define _ODAXWRAP_H_INCLUDED_
29 
30 #if defined(_MSC_VER) && (_MSC_VER > 1310) && defined(_TOOLKIT_IN_DLL_) && !defined(_WIN32_WCE)
31 #include "TD_PackPush.h"
32 
33 #define _INC_MALLOC
34 #include <comdef.h>
35 
36 #include "oaidl.h"
37 #include "OdaX2.h"
38 class OdDbObjectId;
39 class OdGePoint3d;
40 class OdGeVector3d;
41 class OdGePoint2d;
42 class OdGeVector2d;
44 
45 interface __declspec(uuid("C9E0781D-BA3D-4224-9FA4-58ECEA2BC559"))
46 IAcadBaseObject : public IUnknown
47 {
48  // IAcadBaseObject methods
49  virtual HRESULT STDMETHODCALLTYPE SetObjectId(OdDbObjectId& objId,
50  OdDbObjectId ownerId = OdDbObjectId::kNull, TCHAR* keyName = 0) = 0;
51  virtual HRESULT STDMETHODCALLTYPE GetObjectId(OdDbObjectId* objId) = 0;
52  virtual HRESULT STDMETHODCALLTYPE Clone(OdDbObjectId ownerId, LPUNKNOWN* pUnkClone) = 0;
53  virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID& clsid) = 0;
54  virtual HRESULT STDMETHODCALLTYPE NullObjectId() = 0;
55  virtual HRESULT STDMETHODCALLTYPE OnModified() = 0;
56 };
57 
58 typedef IAcadBaseObject* LPACADBASEOBJECT;
59 
60 
61 // Definition of interface: IRetrieveApplication
62 interface __declspec(uuid("0E25DE83-2257-4b6d-B73B-33F1D21FFD8D"))
63 IRetrieveHostAppServices : IUnknown
64 {
65  virtual HRESULT STDMETHODCALLTYPE GetHostAppServices(OdDbHostAppServices** ppHostAppServices) = 0;
66 };
67 
68 _COM_SMARTPTR_TYPEDEF(IRetrieveHostAppServices, __uuidof(IRetrieveHostAppServices));
69 
70 // Definition of interface: IRetrieveApplication
71 interface __declspec(uuid("765B4640-664A-11cf-93F3-0800099EB3B7"))
72 IRetrieveApplication : public IUnknown
73 {
74  // IRetrieveApplication methods
75  virtual HRESULT STDMETHODCALLTYPE SetApplicationObject(LPDISPATCH pAppDisp) = 0;
76  virtual HRESULT STDMETHODCALLTYPE GetApplicationObject(LPDISPATCH* pAppDisp) = 0;
77 };
78 
79 typedef IRetrieveApplication* LPRETRIEVEAPPLICATION;
80 
81 // Definition of interface: IAcadBaseDatabase
82 interface __declspec(uuid("CD3EB5B8-F3FC-48c2-84EE-954EFC4D4208"))
83 IAcadBaseDatabase : public IUnknown
84 {
85  // IAcadBaseObject methods
86  virtual HRESULT STDMETHODCALLTYPE SetDatabase(OdDbDatabase*& pDb) = 0;
87  virtual HRESULT STDMETHODCALLTYPE GetDatabase(OdDbDatabase** pDb) = 0;
88  virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID& clsid) = 0;
89 };
90 
91 typedef IAcadBaseDatabase* LPACADBASEDATABASE;
92 
93 
94 _COM_SMARTPTR_TYPEDEF(IAcadBaseObject, __uuidof(IAcadBaseObject));
95 _COM_SMARTPTR_TYPEDEF(IRetrieveApplication, __uuidof(IRetrieveApplication));
96 _COM_SMARTPTR_TYPEDEF(IAcadBaseDatabase, __uuidof(IAcadBaseDatabase));
97 
98 
99 // {4D07FC10-F931-11ce-B001-00AA006884E5}
100 DEFINE_GUID(IID_ICategorizeProperties, 0x4d07fc10, 0xf931, 0x11ce, 0xb0, 0x1, 0x0, 0xaa, 0x0, 0x68, 0x84, 0xe5);
101 
102 // category ID: negative values are 'standard' categories, positive are control-specific
103 #define PROPCAT_Nil -1
104 #define PROPCAT_Misc -2
105 #define PROPCAT_Font -3
106 #define PROPCAT_Position -4
107 #define PROPCAT_Appearance -5
108 #define PROPCAT_Behavior -6
109 #define PROPCAT_Data -7
110 #define PROPCAT_List -8
111 #define PROPCAT_Text -9
112 #define PROPCAT_Scale -10
113 #define PROPCAT_DDE -11
114 #define PROPCAT_General -12
115 #define PROPCAT_Mass -13
116 #define PROPCAT_Pattern -14
117 #define PROPCAT_DataPoints -15
118 #define PROPCAT_Mesh -16
119 #define PROPCAT_ImageAdjust -17
120 #define PROPCAT_ControlPoints -18
121 #define PROPCAT_PrimaryUnits -19
122 #define PROPCAT_AltUnits -20
123 #define PROPCAT_Fit -21
124 #define PROPCAT_LinesArrows -22
125 #define PROPCAT_Tolerances -23
126 #define PROPCAT_Geometry -24
127 #define PROPCAT_Table -25
128 #define PROPCAT_3dVisualization -26
129 #define PROPCAT_UnderlayAdjust -27
130 #define PROPCAT_SectionObject -28
131 
132 
133 typedef int PROPCAT;
134 
135 #ifndef __OBJEXT_H
136 interface __declspec(uuid("4D07FC10-F931-11ce-B001-00AA006884E5"))
137 ICategorizeProperties : public IUnknown
138 {
139  // Return a property category for the specified property.
140  virtual HRESULT STDMETHODCALLTYPE MapPropertyToCategory(
141  /*[in]*/ DISPID dispid, /*[out]*/ PROPCAT* ppropcat) = 0;
142 
143  // Return the name associated with the specified category ID, as a BSTR.
144  virtual HRESULT STDMETHODCALLTYPE GetCategoryName(
145  /*[in]*/ PROPCAT propcat, /*[in]*/ LCID lcid, /*[out]*/BSTR* pbstrName) = 0;
146 };
147 
148 typedef ICategorizeProperties FAR* LPCATEGORIZEPROPERTIES;
149 #endif
150 
151 //
152 // Utility functions
153 //
154 TOOLKIT_EXPORT IUnknown* OdOxGetIUnknownOfObject(OdDbObjectId objId, LPDISPATCH pApp);
155 //TOOLKIT_EXPORT IUnknown* OdOxGetIUnknownOfObject(OdDbObject* pObj, LPDISPATCH pApp);
156 TOOLKIT_EXPORT IUnknown* OdOxGetIUnknownOfDatabase(OdDbDatabase* pDb, LPDISPATCH pApp);
157 
158 
159 #define FACILITY_ODA 32
160 
161 #define OdHresultFromOdResult(res) MAKE_HRESULT(res!=eOk ? 3 : 0, FACILITY_ODA, res)
162 
163 #include "TD_PackPop.h"
164 #endif //_WIN32
165 
166 #endif // _ODAXWRAP_H_INCLUDED_
167 
OdGeVector3d
Definition: GeVector3d.h:54
OdDbDatabase
Definition: DbDatabase.h:421
OdDbObjectId
Definition: DbObjectId.h:99
LCID
unsigned long LCID
Definition: DbBaseHostAppServices.h:55
TD_PackPop.h
OdGePoint3d
Definition: GePoint3d.h:55
OdDbObjectId::kNull
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:118
OdGeVector2d
Definition: GeVector2d.h:51
OdDbHostAppServices
Definition: DbHostAppServices.h:65
TD_PackPush.h
CLSID
#define CLSID
Definition: OdPlatform.h:1040
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdGePoint2d
Definition: GePoint2d.h:60