CFx SDK Documentation  2022 SP0
OleItemHandlerBase.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 #ifndef _OLEITEMDATAHEADER_INCLUDED_
25 #define _OLEITEMDATAHEADER_INCLUDED_
26 
27 #include "TD_PackPush.h"
28 #include "OleItemHandler.h"
29 #include "UInt8Array.h"
30 #include "OdBinaryData.h"
31 #include "DbRootExport.h"
32 
33 
46 {
47 protected:
48  /* FROM MFC SOURCE:
49  enum OLE_OBJTYPE
50  {
51  OT_UNKNOWN = 0,
52 
53  // These are OLE 1.0 types and OLE 2.0 types as returned from GetType().
54  OT_LINK = 1,
55  OT_EMBEDDED = 2,
56  OT_STATIC = 3,
57 
58  // All OLE2 objects are written with this tag when serialized. This
59  // differentiates them from OLE 1.0 objects written with MFC 2.0.
60  // This value will never be returned from GetType().
61  OT_OLE2 = 256,
62  };
63  */
64 
65  //OdUInt32 m_nOleVer; // (enum OLE_OBJTYPE) must be always OT_OLE2
66  //OdUInt32 m_nItemId; // id in COleDocument
67  //DvAspect m_adviseType; // view advise type (DVASPECT)
68  //OdUInt16 m_bMoniker; // flag indicating whether to create moniker upon load
69  //DvAspect m_drawAspect; // current default display aspect
70 
77 
78 
80 public:
82 
87  void load(OdStreamBuf& streamBuf);
88 
93  void save(OdStreamBuf& streamBuf) const;
94 
98  bool draw(const OdGiCommonDraw& drawObj, void* hdc, const OdGsDCRect& screenRect) const;
99 
103  Type type() const;
104 
109 
114 
119 
121  void setDrawAspect(DvAspect drawAspect);
122 
123  OdUInt32 itemId() const;
124  void setItemId(OdUInt32 nId);
125 
128 
129  bool monikerAssigned() const;
130  void setMonikerAssigned(bool assigned);
131 
133  void setOleVersion(OdUInt32 oleVer);
134 
137 
138  virtual COleClientItem* getOleClientItem(void) const;
139 
141  OdRxObject* pRxDb = NULL);
142 
143  virtual OdGiRasterImagePtr getRaster(bool = true) const;
144  virtual bool getWmfData(OdBinaryData& data) const;
145 };
147 
153 {
154  OdUInt8Array m_compDocData;
155 public:
157 
158  void getCompoundDocument(OdStreamBuf& streamBuf) const;
159 
160  void setCompoundDocument(OdUInt32 numBytes, OdStreamBuf& streamBuf);
161 };
162 
163 
164 #include "TD_PackPop.h"
165 
166 #endif // #ifndef _OLEITEMDATAHEADER_INCLUDED_
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
#define NULL
Definition: GsProperties.h:177
unsigned int OdUInt32
unsigned short OdUInt16
OdSmartPtr< OdOleItemHandlerBase > OdOleItemHandlerBasePtr
void load(OdStreamBuf &streamBuf)
OdUInt32 itemId() const
bool draw(const OdGiCommonDraw &drawObj, void *hdc, const OdGsDCRect &screenRect) const
ODRX_DECLARE_MEMBERS(OdOleItemHandlerBase)
virtual OdGiRasterImagePtr getRaster(bool=true) const
PlotQuality outputQuality() const
void setOutputQuality(PlotQuality quality)
void setMonikerAssigned(bool assigned)
void setAdviseType(DvAspect at)
virtual bool embedRaster(OdSmartPtr< OdGiRasterImage > pImage, OdRxObject *pRxDb=NULL)
OdString linkName() const
virtual COleClientItem * getOleClientItem(void) const
virtual bool getWmfData(OdBinaryData &data) const
DvAspect adviseType() const
OdString userType() const
void setOleVersion(OdUInt32 oleVer)
OdString linkPath() const
DvAspect drawAspect() const
void save(OdStreamBuf &streamBuf) const
OdUInt32 oleVersion() const
void setDrawAspect(DvAspect drawAspect)
bool monikerAssigned() const
void setItemId(OdUInt32 nId)
OdUInt32 getCompoundDocumentDataSize() const
void setCompoundDocument(OdUInt32 numBytes, OdStreamBuf &streamBuf)
void getCompoundDocument(OdStreamBuf &streamBuf) const
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110