CFx SDK Documentation  2023 SP0
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_
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
#define NULL
Definition: GsProperties.h:177
unsigned int OdUInt32
OdSmartPtr< OdOleItemInitStream > OdOleItemInitStreamPtr
OdSmartPtr< OdOleItemHandler > OdOleItemHandlerPtr
virtual void getCompoundDocument(OdStreamBuf &streamBuf) const =0
virtual COleClientItem * getOleClientItem(void) const =0
virtual void save(OdStreamBuf &streamBuf) const =0
virtual void setDrawAspect(DvAspect drawAspect)=0
virtual void load(OdStreamBuf &streamBuf)=0
virtual Type type() const =0
virtual void setCompoundDocument(OdUInt32 numBytes, OdStreamBuf &streamBuf)=0
virtual DvAspect drawAspect() const =0
virtual OdUInt32 getCompoundDocumentDataSize() const =0
virtual void setOutputQuality(PlotQuality quality)=0
virtual OdString linkName() const =0
virtual OdString linkPath() const =0
virtual OdGiRasterImagePtr getRaster(bool bDisplayedOnly=true) const =0
virtual OdString userType() const =0
virtual PlotQuality outputQuality() const =0
ODRX_DECLARE_MEMBERS(OdOleItemHandler)
virtual OdDbStub * frameId() const =0
ODRX_DECLARE_MEMBERS(OdOleItemInitStream)