CFx SDK Documentation  2020SP3
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_
OdOleItemHandlerBase::OdOleItemHandlerBase
OdOleItemHandlerBase()
OdOleItemHandler::DvAspect
DvAspect
Definition: OleItemHandler.h:138
OdString
Definition: OdString.h:95
OdOleItemHandlerBase::m_nItemId
OdUInt32 m_nItemId
Definition: OleItemHandlerBase.h:72
NULL
#define NULL
Definition: GsProperties.h:177
OdOleItemHandlerBase::monikerAssigned
bool monikerAssigned() const
OdOleItemHandlerBase::draw
bool draw(const OdGiCommonDraw &drawObj, void *hdc, const OdGsDCRect &screenRect) const
OdOleItemHandlerBase::setMonikerAssigned
void setMonikerAssigned(bool assigned)
OleItemHandler.h
OdOleItemHandlerBase::embedRaster
virtual bool embedRaster(OdSmartPtr< OdGiRasterImage > pImage, OdRxObject *pRxDb=NULL)
OdOleItemHandler::Type
Type
Definition: OleItemHandler.h:115
OdBinaryData
Definition: OdBinaryData.h:42
OdRxObject
Definition: RxObject.h:564
OdGsDCRect
Definition: GsDefs.h:111
OdOleItemHandlerBasePtr
OdSmartPtr< OdOleItemHandlerBase > OdOleItemHandlerBasePtr
Definition: OleItemHandlerBase.h:146
OdOleItemSimplestHandler::getCompoundDocumentDataSize
OdUInt32 getCompoundDocumentDataSize() const
OdOleItemSimplestHandler::setCompoundDocument
void setCompoundDocument(OdUInt32 numBytes, OdStreamBuf &streamBuf)
OdArray< OdUInt8, OdMemoryAllocator< OdUInt8 > >
TD_PackPop.h
OdOleItemHandlerBase::getRaster
virtual OdGiRasterImagePtr getRaster(bool=true) const
OdUInt16
unsigned short OdUInt16
Definition: OdPlatformSettings.h:760
OdOleItemHandlerBase::adviseType
DvAspect adviseType() const
OdOleItemHandlerBase::outputQuality
PlotQuality outputQuality() const
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdOleItemHandlerBase::load
void load(OdStreamBuf &streamBuf)
OdOleItemHandlerBase::save
void save(OdStreamBuf &streamBuf) const
OdOleItemHandlerBase::m_drawAspect
DvAspect m_drawAspect
Definition: OleItemHandlerBase.h:75
OdGiCommonDraw
Definition: GiCommonDraw.h:572
DbRootExport.h
data
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
OdBinaryData.h
OdOleItemHandlerBase::m_nOleVer
OdUInt32 m_nOleVer
Definition: OleItemHandlerBase.h:71
OdOleItemHandlerBase::m_bMoniker
OdUInt16 m_bMoniker
Definition: OleItemHandlerBase.h:74
OdSmartPtr< OdGiRasterImage >
OdOleItemHandlerBase::m_quality
PlotQuality m_quality
Definition: OleItemHandlerBase.h:76
OdOleItemHandlerBase::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdOleItemHandlerBase)
OdOleItemHandlerBase::linkName
OdString linkName() const
OdOleItemHandlerBase::setOutputQuality
void setOutputQuality(PlotQuality quality)
OdOleItemSimplestHandler
Definition: OleItemHandlerBase.h:153
OdOleItemHandlerBase::m_adviseType
DvAspect m_adviseType
Definition: OleItemHandlerBase.h:73
OdOleItemHandlerBase::setItemId
void setItemId(OdUInt32 nId)
OdOleItemHandlerBase::getWmfData
virtual bool getWmfData(OdBinaryData &data) const
TD_PackPush.h
OdOleItemHandlerBase::drawAspect
DvAspect drawAspect() const
OdOleItemHandler::PlotQuality
PlotQuality
Definition: OleItemHandler.h:194
OdOleItemHandlerBase::itemId
OdUInt32 itemId() const
OdOleItemHandlerBase::setDrawAspect
void setDrawAspect(DvAspect drawAspect)
OdOleItemHandlerBase
Definition: OleItemHandlerBase.h:46
OdStreamBuf
Definition: OdStreamBuf.h:67
OdOleItemHandler
Definition: OleItemHandler.h:70
UInt8Array.h
DBROOT_EXPORT
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
OdOleItemHandlerBase::setAdviseType
void setAdviseType(DvAspect at)
OdOleItemHandlerBase::linkPath
OdString linkPath() const
OdOleItemHandlerBase::setOleVersion
void setOleVersion(OdUInt32 oleVer)
OdOleItemHandlerBase::getOleClientItem
virtual COleClientItem * getOleClientItem(void) const
OdOleItemSimplestHandler::getCompoundDocument
void getCompoundDocument(OdStreamBuf &streamBuf) const
OdOleItemHandlerBase::type
Type type() const
OdOleItemHandlerBase::oleVersion
OdUInt32 oleVersion() const
OdOleItemHandlerBase::userType
OdString userType() const