CFx SDK Documentation  2020SP3
OleItemHandler.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 _ODOLEITEMHANDLER_INCLUDED_
25 #define _ODOLEITEMHANDLER_INCLUDED_
26 
27 #include "RxObject.h"
28 #include "OdErrorContext.h"
29 #include "Gi/GiViewportGeometry.h"
30 #include "RxModule.h"
31 #include "OdStreamBuf.h"
32 
33 #include "TD_PackPush.h"
34 
35 class COleClientItem;
36 
43 {
44 public:
46 
50  virtual OdDbStub* frameId() const = 0;
51 };
56 
57 class OdOleItemHandler;
58 class OdDbObjectId;
63 
70 {
71 public:
73 
83  virtual void load(OdStreamBuf& streamBuf) = 0;
84 
94  virtual void save(OdStreamBuf& streamBuf) const = 0;
95 
100 
105  virtual void getCompoundDocument(OdStreamBuf& streamBuf) const = 0;
106 
112  virtual void setCompoundDocument(OdUInt32 numBytes, OdStreamBuf& streamBuf) = 0;
113 
114  enum Type
115  {
116  kUnknown = 0,
117  kLink = 1,
118  kEmbedded = 2,
119  kStatic = 3
120  };
135  virtual Type type() const = 0;
136 
137  enum DvAspect
138  {
139  kContent = 1,
140  kThumbnail = 2,
141  kIcon = 4,
142  kDocPrint = 8
143  };
144 
159  virtual DvAspect drawAspect() const = 0;
160 
164  virtual OdString linkName() const = 0;
165 
169  virtual OdString linkPath() const = 0;
170 
174  virtual OdString userType() const = 0;
175 
191  virtual void setDrawAspect(DvAspect drawAspect) = 0;
192 
194  {
195  kMonochrome = 0, // e.g., spreadsheet
196  kLowGraphics = 1, // e.g., color text & pie charts
197  kHighGraphics = 2, // e.g., photograph
198  kAutomatic = 3 // Automatic dependent on document type
199  };
200 
217  virtual PlotQuality outputQuality() const = 0;
218 
237  virtual void setOutputQuality(PlotQuality quality) = 0;
238 
239  virtual COleClientItem* getOleClientItem(void) const = 0; virtual bool embedRaster(OdSmartPtr<class OdGiRasterImage> pImage,
249  OdRxObject* pRxDb = NULL) = 0;
250 
251  virtual OdGiRasterImagePtr getRaster(bool bDisplayedOnly = true) const = 0;
252 };
253 
254 #include "TD_PackPop.h"
255 
256 #endif // _ODOLEITEMHANDLER_INCLUDED_
OdOleItemHandler::DvAspect
DvAspect
Definition: OleItemHandler.h:138
OdString
Definition: OdString.h:95
NULL
#define NULL
Definition: GsProperties.h:177
RxModule.h
OdErrorContext.h
OdOleItemHandler::Type
Type
Definition: OleItemHandler.h:115
OdOleItemHandler::save
virtual void save(OdStreamBuf &streamBuf) const =0
OdOleItemHandler::getCompoundDocument
virtual void getCompoundDocument(OdStreamBuf &streamBuf) const =0
OdOleItemHandler::load
virtual void load(OdStreamBuf &streamBuf)=0
OdRxObject
Definition: RxObject.h:564
OdDbObjectId
Definition: DbObjectId.h:99
OdOleItemHandler::type
virtual Type type() const =0
TD_PackPop.h
kUnknown
@ kUnknown
Definition: DbManagerSubentData.h:39
OdOleItemHandler::userType
virtual OdString userType() const =0
OdOleItemHandler::getRaster
virtual OdGiRasterImagePtr getRaster(bool bDisplayedOnly=true) const =0
OdOleItemInitStream
Definition: OleItemHandler.h:43
RxObject.h
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdOleItemHandler::setOutputQuality
virtual void setOutputQuality(PlotQuality quality)=0
GiViewportGeometry.h
OdStreamBuf.h
OdSmartPtr
Definition: SmartPtr.h:58
OdOleItemHandler::outputQuality
virtual PlotQuality outputQuality() const =0
OdOleItemHandlerPtr
OdSmartPtr< OdOleItemHandler > OdOleItemHandlerPtr
Definition: OleItemHandler.h:58
TD_PackPush.h
OdOleItemHandler::linkName
virtual OdString linkName() const =0
OdGiSelfGdiDrawable
Definition: GiViewportGeometry.h:45
OdOleItemInitStreamPtr
OdSmartPtr< OdOleItemInitStream > OdOleItemInitStreamPtr
Definition: OleItemHandler.h:55
OdOleItemInitStream::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdOleItemInitStream)
OdOleItemHandler::PlotQuality
PlotQuality
Definition: OleItemHandler.h:194
OdOleItemHandler::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdOleItemHandler)
OdStreamBuf
Definition: OdStreamBuf.h:67
OdOleItemHandler::drawAspect
virtual DvAspect drawAspect() const =0
OdOleItemHandler
Definition: OleItemHandler.h:70
DBROOT_EXPORT
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
OdOleItemInitStream::frameId
virtual OdDbStub * frameId() const =0
OdOleItemHandler::setDrawAspect
virtual void setDrawAspect(DvAspect drawAspect)=0
OdOleItemHandler::getOleClientItem
virtual COleClientItem * getOleClientItem(void) const =0
OdOleItemHandler::getCompoundDocumentDataSize
virtual OdUInt32 getCompoundDocumentDataSize() const =0
OdOleItemHandler::linkPath
virtual OdString linkPath() const =0
OdOleItemHandler::setCompoundDocument
virtual void setCompoundDocument(OdUInt32 numBytes, OdStreamBuf &streamBuf)=0