PDFix SDK  7.2.0
Loading...
Searching...
No Matches
PdeElement Struct Referenceabstract

PdeElement class. More...

#include <pdfix.h>

Inheritance diagram for PdeElement:
PdeAnnot PdeContainer PdeLine PdeList PdeText PdeTextLine PdeTextRun PdeWord

Public Member Functions

virtual PdfElementType GetType () const =0
 Gets the type of an element. More...
 
virtual void GetBBox (PdfRect *bbox) const =0
 
virtual bool SetBBox (const PdfRect *bbox)=0
 
virtual void GetQuad (PdfQuad *quad) const =0
 
virtual int GetId ()=0
 Gets the id of an element. The id is unique number on a page. More...
 
virtual void GetGraphicState (PdfGraphicState *g_state)=0
 Gets the graphics state information for an element. More...
 
virtual int GetNumChildren () const =0
 Gets the number of child elements in an element object. More...
 
virtual PdeElementGetChild (int index)=0
 Gets the requested child element from an element. More...
 
virtual PdfAlignment GetAlignment () const =0
 Gets the element alignment within the content column. More...
 
virtual float GetAngle () const =0
 Gets the element angle. More...
 
virtual void SetData (void *data)=0
 Sets user-supplied data to pass to the element. More...
 
virtual void * GetData () const =0
 Gets user-supplied data to pass to the element. More...
 
virtual bool SetAlt (const wchar_t *alt)=0
 Sets the alternate description of the element. More...
 
virtual bool SetActualText (const wchar_t *text)=0
 Sets the actual text of the element. More...
 
virtual int GetTag (wchar_t *buffer, int len) const =0
 Gets the tag name of the element. More...
 
virtual bool SetTag (const wchar_t *text)=0
 Sets the tag name of the element. More...
 
virtual int GetTagId (wchar_t *buffer, int len) const =0
 Gets the tag id of the element. More...
 
virtual bool SetTagId (const wchar_t *id)=0
 Sets the tag id of the element. More...
 
virtual int GetFlags () const =0
 Get the element state flags. More...
 
virtual bool SetFlags (int flags)=0
 Set the element state flags. More...
 
virtual int GetStateFlags () const =0
 Get the element state flags. More...
 
virtual bool SetStateFlags (PdfStateFlags flags, bool objects)=0
 Set the element state flags. More...
 
virtual int GetNumPageObjects () const =0
 Get the the number pf page object in the element. More...
 
virtual PdsPageObjectGetPageObject (int index)=0
 Get the the page object of the element by index. More...
 
virtual PdePageMapGetPageMap ()=0
 Get the the page map object containing this element. More...
 
virtual PdfLabelType GetLabelType () const =0
 Gets the element label type. More...
 
virtual bool SetLabelType (PdfLabelType type)=0
 Sets the element type level. More...
 

Detailed Description

PdeElement class.

PdeElement is the base class for elements of a pagemap (PdePageMap). The general PdeElement methods allow you to get and set general element properties. PdeElement is an abstract superclass from which the PdeText, PdeTextLine, PdeWord, PdeTable, PdeImage, PdeContainer, PdeLine, PdeRect, PdeTableCell, PdeFormField, PdeHeader, PdeFooter, PdeArtifact classes are derived. Use PdeElement::GetType method to find the type of an element.

Member Function Documentation

◆ GetAlignment()

virtual PdfAlignment PdeElement::GetAlignment ( ) const
pure virtual

Gets the element alignment within the content column.

Returns
Requested element alignment.

◆ GetAngle()

virtual float PdeElement::GetAngle ( ) const
pure virtual

Gets the element angle.

Returns
Requested element angle.

◆ GetBBox()

virtual void PdeElement::GetBBox ( PdfRect bbox) const
pure virtual

Gets the bounding box for an element in user space coordinates. To avoid the device-dependent effects of specifying objects in device space, PDF defines a device-independent coordinate system that always bears the same relationship to the current page, regardless of the output device on which printing or displaying occurs. This device-independent coordinate system is called user space. The origin of the user space(0, 0) represents the bottom-left corner of the PDF page. PDF files specify 72 points to 1 physical inch. The returned bounding box is guaranteed to encompass the element.

Parameters
bbox(Filled by the method) A pointer to a PdfRect structure specifying the bounding box of an element, specified in user space coordinates.

◆ GetChild()

virtual PdeElement * PdeElement::GetChild ( int  index)
pure virtual

Gets the requested child element from an element.

Parameters
indexThe index of element to obtain.
Returns
Requested element.
See also
PdeElement::GetNumChildren

◆ GetData()

virtual void * PdeElement::GetData ( ) const
pure virtual

Gets user-supplied data to pass to the element.

Returns
User-supplied data from the element.

◆ GetFlags()

virtual int PdeElement::GetFlags ( ) const
pure virtual

Get the element state flags.

Returns
the element flags as PdfElementFlags.

◆ GetGraphicState()

virtual void PdeElement::GetGraphicState ( PdfGraphicState g_state)
pure virtual

Gets the graphics state information for an element.

Parameters
g_state(Filled by the method) Pointer to a PdfGraphicState structure that contains graphics state information for pdeElement.

◆ GetId()

virtual int PdeElement::GetId ( )
pure virtual

Gets the id of an element. The id is unique number on a page.

Returns
Unique number for the element.

◆ GetLabelType()

virtual PdfLabelType PdeElement::GetLabelType ( ) const
pure virtual

Gets the element label type.

Returns
The element label type.

◆ GetNumChildren()

virtual int PdeElement::GetNumChildren ( ) const
pure virtual

Gets the number of child elements in an element object.

Returns
The number of children.
See also
PdeElement::GetChild

◆ GetNumPageObjects()

virtual int PdeElement::GetNumPageObjects ( ) const
pure virtual

Get the the number pf page object in the element.

Returns
The number of page objects.

◆ GetPageMap()

virtual PdePageMap * PdeElement::GetPageMap ( )
pure virtual

Get the the page map object containing this element.

Returns
The page map object.

◆ GetPageObject()

virtual PdsPageObject * PdeElement::GetPageObject ( int  index)
pure virtual

Get the the page object of the element by index.

Returns
The page object.

◆ GetQuad()

virtual void PdeElement::GetQuad ( PdfQuad quad) const
pure virtual

Gets the quad for an element in user space coordinates. See GetBBox for more info. The returned quad is guaranteed to encompass the element.

Parameters
quad(Filled by the method) A pointer to a PdfQuad structure specifying the bounding quad of an element, specified in user space coordinates.

◆ GetStateFlags()

virtual int PdeElement::GetStateFlags ( ) const
pure virtual

Get the element state flags.

Returns
the element state flags as PdfStateFlags.

◆ GetTag()

virtual int PdeElement::GetTag ( wchar_t *  buffer,
int  len 
) const
pure virtual

Gets the tag name of the element.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetTagId()

virtual int PdeElement::GetTagId ( wchar_t *  buffer,
int  len 
) const
pure virtual

Gets the tag id of the element.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetType()

virtual PdfElementType PdeElement::GetType ( ) const
pure virtual

Gets the type of an element.

Returns
Element type, kElementUnknown otherwise.

◆ SetActualText()

virtual bool PdeElement::SetActualText ( const wchar_t *  text)
pure virtual

Sets the actual text of the element.

Parameters
altThe actual text to be set.
Returns
true if the actual text was set, false otherwise.

◆ SetAlt()

virtual bool PdeElement::SetAlt ( const wchar_t *  alt)
pure virtual

Sets the alternate description of the element.

Parameters
altThe alternate decsription to be set.
Returns
true if the description was set, false otherwise.

◆ SetBBox()

virtual bool PdeElement::SetBBox ( const PdfRect bbox)
pure virtual

Gets the bounding box for an element in user space coordinates. To avoid the device-dependent effects of specifying objects in device space, PDF defines a device-independent coordinate system that always bears the same relationship to the current page, regardless of the output device on which printing or displaying occurs. This device-independent coordinate system is called user space. The origin of the user space(0, 0) represents the bottom-left corner of the PDF page. PDF files specify 72 points to 1 physical inch. The returned bounding box is guaranteed to encompass the element.

Parameters
bboxA pointer to a PdfRect structure specifying the bounding box of an element, specified in user space coordinates.

◆ SetData()

virtual void PdeElement::SetData ( void *  data)
pure virtual

Sets user-supplied data to pass to the element.

Parameters
dataUser-supplied data to pass to element.

◆ SetFlags()

virtual bool PdeElement::SetFlags ( int  flags)
pure virtual

Set the element state flags.

Parameters
flagsthe PdfElementFlags flags to be set
Returns
true if the element flags was set false otherwise

◆ SetLabelType()

virtual bool PdeElement::SetLabelType ( PdfLabelType  type)
pure virtual

Sets the element type level.

Parameters
typeSets element label type.
Returns
true if label type was set, false otherwise.

◆ SetStateFlags()

virtual bool PdeElement::SetStateFlags ( PdfStateFlags  flags,
bool  objects 
)
pure virtual

Set the element state flags.

Parameters
flagsthe PdfStateFlags flags to be set
objectsset the state flag to all underlying page objects
Returns
true if the element state flags was set false otherwise

◆ SetTag()

virtual bool PdeElement::SetTag ( const wchar_t *  text)
pure virtual

Sets the tag name of the element.

Parameters
altThe tag name to be set.
Returns
true if the value was set, false otherwise.

◆ SetTagId()

virtual bool PdeElement::SetTagId ( const wchar_t *  id)
pure virtual

Sets the tag id of the element.

Parameters
idThe tag id to be set. If empty string passed the previous tag id will be cleared. Null value will auto-generate the tag id.
Returns
true if the value was set, false otherwise.