DATAKIT API  V2025.1
Dtk_OLEObject Class Referenceabstract

This is the Dtk_OLEObject Class.
The Dtk_OLEObject object is used to store any informations about Object Linking and Embedding items. More...

+ Inheritance diagram for Dtk_OLEObject:

Public Types

enum  Dtk_OLEObjectViewingAspect { OLE_ASPECT_UNKNOWN = 0, OLE_ASPECT_CONTENT, OLE_ASPECT_ICON }
 

Public Member Functions

Dtk_Int32 DtkDynamicType (const Dtk_Int32 &inId)
 Retrieves the dynamic entity type. More...
 
virtual int DtkDynamicType (const int &inId)=0
 
virtual void dump (FILE *file=stdout)
 
Dtk_ErrorStatus ExtractPreviewPicture (Dtk_picturePtr &outPreviewPicture) const
 Extract the currently displayed picture from the OLE Object. More...
 
type_detk get_type_detk () const
 
const Dtk_Char8 *const GetBinaryContent () const
 Returns the OLE Object data size. More...
 
const Dtk_Size_t GetBinaryContentSize () const
 Returns the OLE Object data. More...
 
Dtk_Oriented2dBBoxGetPlacement ()
 Returns the position and orientation of the OLE Object in space. More...
 
const Dtk_Oriented2dBBoxGetPlacement () const
 Returns the position and orientation of the OLE Object in space. More...
 
Dtk_Double64 GetScale () const
 Returns the scale that is applied to the OLE Object. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_OLEObjectViewingAspect GetViewingAspect () const
 Returns the way the OLE Object should be displayed at screen. More...
 
Dtk_OLEObjectoperator= (const Dtk_OLEObject &inToBeAssigned)
 Assignment Operator. More...
 
void SetBinaryContent (const Dtk_Char8 *const inNewContent, const Dtk_Size_t inNewContentSize)
 Set the OLE Object data. More...
 
void SetPlacement (const Dtk_Oriented2dBBox &inNewPlacement)
 Set the position and orientation of the OLE Object in space. More...
 
void SetScale (const Dtk_Double64 &inNewScale)
 Set the scale that is applied to the OLE Object. More...
 
void SetViewingAspect (const Dtk_OLEObjectViewingAspect &inNewAspect)
 Set the way the OLE Object should be displayed at screen. More...
 
Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 Applies a transformation matrix to the entity. //! More...
 

Static Public Member Functions

static Dtk_OLEObjectPtr Create (const Dtk_Char8 *const binaryContent, const Dtk_Size_t &binaryContentSize, const Dtk_Oriented2dBBox &positioning, const Dtk_OLEObjectViewingAspect viewingAspect, const Dtk_Double64 &scale=1)
 Create a Dtk_OLEObjectPtr. More...
 
static Dtk_OLEObjectPtr Create (const Dtk_OLEObject &inToBeCopied)
 Copy constructor. More...
 
static Dtk_string Dtk_OLEObjectViewingAspectToString (const Dtk_OLEObjectViewingAspect &inEnum)
 
static Dtk_OLEObjectDtkDynamicCast (Dtk_Object *o)
 Performs a dynamic cast - doesn't need RTTI -. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_OLE_OBJECT }
 

Protected Member Functions

void _copy (const Dtk_Object &s)
 
void _init ()
 
void _reset ()
 
virtual Dtk_ObjectClone ()
 
 Dtk_OLEObject (const Dtk_Char8 *const binaryContent, const Dtk_Size_t &binaryContentSize, const Dtk_Oriented2dBBox &placement, const Dtk_OLEObjectViewingAspect viewingAspect, const Dtk_Double64 &scale=1)
 Base Constructor. More...
 
 Dtk_OLEObject (const Dtk_OLEObject &o)
 Copy Constructor. More...
 
 ~Dtk_OLEObject ()
 Destructor. More...
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_OLEObject >
 

Detailed Description

This is the Dtk_OLEObject Class.
The Dtk_OLEObject object is used to store any informations about Object Linking and Embedding items.

See also
Please use the Dtk_OLEObjectPtr class to handle it.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
49  {
51  };

◆ Dtk_OLEObjectViewingAspect

Enumerator
OLE_ASPECT_UNKNOWN 
OLE_ASPECT_CONTENT 
OLE_ASPECT_ICON 
24  {
27  // OLE_ASPECT_DOCPRINT,
29  // OLE_ASPECT_THUMBNAIL
30  };

Constructor & Destructor Documentation

◆ Dtk_OLEObject() [1/2]

Dtk_OLEObject::Dtk_OLEObject ( const Dtk_Char8 *const  binaryContent,
const Dtk_Size_t binaryContentSize,
const Dtk_Oriented2dBBox placement,
const Dtk_OLEObjectViewingAspect  viewingAspect,
const Dtk_Double64 scale = 1 
)
protected

Base Constructor.

◆ Dtk_OLEObject() [2/2]

Dtk_OLEObject::Dtk_OLEObject ( const Dtk_OLEObject o)
protected

Copy Constructor.

◆ ~Dtk_OLEObject()

Dtk_OLEObject::~Dtk_OLEObject ( )
protected

Destructor.

Member Function Documentation

◆ _copy()

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _init()

void Dtk_Object::_init ( )
protectedinherited

◆ _reset()

void Dtk_Object::_reset ( )
protectedinherited

◆ Clone()

virtual Dtk_Object* Dtk_OLEObject::Clone ( )
protectedvirtual
66  {
67  return new Dtk_OLEObject( *this );
68  }

◆ Create() [1/2]

static Dtk_OLEObjectPtr Dtk_OLEObject::Create ( const Dtk_Char8 *const  binaryContent,
const Dtk_Size_t binaryContentSize,
const Dtk_Oriented2dBBox positioning,
const Dtk_OLEObjectViewingAspect  viewingAspect,
const Dtk_Double64 scale = 1 
)
static

Create a Dtk_OLEObjectPtr.

Parameters
binaryContentThe OLE Object data.
binaryContentSizeThe OLE Object data size.
positioningPosition and orientation of the OLE Object in space.
viewingAspectThe way the OLE Object should be displayed at screen.
scaleThe scale that is applied to the OLE Object.
Returns
The constructed Dtk_OLEObjectPtr.

◆ Create() [2/2]

static Dtk_OLEObjectPtr Dtk_OLEObject::Create ( const Dtk_OLEObject inToBeCopied)
static

Copy constructor.

Parameters
inToBeCopiedObject to copy.

◆ Dtk_OLEObjectViewingAspectToString()

static Dtk_string Dtk_OLEObject::Dtk_OLEObjectViewingAspectToString ( const Dtk_OLEObjectViewingAspect inEnum)
static
33  {
34  switch( inEnum )
35  {
36  case OLE_ASPECT_CONTENT: return L"OLE_ASPECT_CONTENT";
37  //case OLE_ASPECT_DOCPRINT: return L"OLE_ASPECT_DOCPRINT";
38  case OLE_ASPECT_ICON: return L"OLE_ASPECT_ICON";
39  //case OLE_ASPECT_THUMBNAIL: return L"OLE_ASPECT_THUMBNAIL";
40  default:
41  case OLE_ASPECT_UNKNOWN: return L"OLE_ASPECT_UNKNOWN";
42  }
43  }

◆ DtkDynamicCast()

static Dtk_OLEObject* Dtk_OLEObject::DtkDynamicCast ( Dtk_Object o)
static

Performs a dynamic cast - doesn't need RTTI -.

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_OLEObject::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

◆ DtkDynamicType() [2/2]

◆ dump()

virtual void Dtk_Object::dump ( FILE *  file = stdout)
virtualinherited

◆ ExtractPreviewPicture()

Dtk_ErrorStatus Dtk_OLEObject::ExtractPreviewPicture ( Dtk_picturePtr outPreviewPicture) const

Extract the currently displayed picture from the OLE Object.

Returns
dtkNoError if OK.

◆ get_type_detk()

type_detk Dtk_OLEObject::get_type_detk ( ) const
100  {
101  return DTK_TYPE_OLE_OBJECT;
102  }

◆ GetBinaryContent()

const Dtk_Char8* const Dtk_OLEObject::GetBinaryContent ( ) const

Returns the OLE Object data size.

◆ GetBinaryContentSize()

const Dtk_Size_t Dtk_OLEObject::GetBinaryContentSize ( ) const

Returns the OLE Object data.

◆ GetPlacement() [1/2]

Dtk_Oriented2dBBox& Dtk_OLEObject::GetPlacement ( )

Returns the position and orientation of the OLE Object in space.

◆ GetPlacement() [2/2]

const Dtk_Oriented2dBBox& Dtk_OLEObject::GetPlacement ( ) const

Returns the position and orientation of the OLE Object in space.

◆ GetScale()

Dtk_Double64 Dtk_OLEObject::GetScale ( ) const

Returns the scale that is applied to the OLE Object.

◆ GetSize()

◆ GetViewingAspect()

Dtk_OLEObjectViewingAspect Dtk_OLEObject::GetViewingAspect ( ) const

Returns the way the OLE Object should be displayed at screen.

◆ operator=()

Dtk_OLEObject& Dtk_OLEObject::operator= ( const Dtk_OLEObject inToBeAssigned)

Assignment Operator.

Parameters
inToBeAssignedObject to copy.

◆ SetBinaryContent()

void Dtk_OLEObject::SetBinaryContent ( const Dtk_Char8 *const  inNewContent,
const Dtk_Size_t  inNewContentSize 
)

Set the OLE Object data.

Parameters
inNewContentThe OLE Object data.
inNewContentSizeThe OLE Object data size.

◆ SetPlacement()

void Dtk_OLEObject::SetPlacement ( const Dtk_Oriented2dBBox inNewPlacement)

Set the position and orientation of the OLE Object in space.

◆ SetScale()

void Dtk_OLEObject::SetScale ( const Dtk_Double64 inNewScale)

Set the scale that is applied to the OLE Object.

◆ SetViewingAspect()

void Dtk_OLEObject::SetViewingAspect ( const Dtk_OLEObjectViewingAspect inNewAspect)

Set the way the OLE Object should be displayed at screen.

◆ Transform()

Dtk_ErrorStatus Dtk_OLEObject::Transform ( const Dtk_transfo inTransfo)

Applies a transformation matrix to the entity. //!

Parameters
inTransfoThe transformation matrix to apply.

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_OLEObject >

friend class Dtk_SmartPtr< Dtk_OLEObject >
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_OLEObject::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_OLEObject::_typeID
@ _typeID
Definition: dtk_oleobject.hpp:50
Dtk_OLEObject::OLE_ASPECT_CONTENT
@ OLE_ASPECT_CONTENT
Definition: dtk_oleobject.hpp:26
Dtk_OLEObject::OLE_ASPECT_ICON
@ OLE_ASPECT_ICON
Definition: dtk_oleobject.hpp:28
DTK_TYPE_OLE_OBJECT
@ DTK_TYPE_OLE_OBJECT
Definition: define.h:617
Dtk_OLEObject::OLE_ASPECT_UNKNOWN
@ OLE_ASPECT_UNKNOWN
Definition: dtk_oleobject.hpp:25
Dtk_OLEObject::Dtk_OLEObject
Dtk_OLEObject(const Dtk_Char8 *const binaryContent, const Dtk_Size_t &binaryContentSize, const Dtk_Oriented2dBBox &placement, const Dtk_OLEObjectViewingAspect viewingAspect, const Dtk_Double64 &scale=1)
Base Constructor.