Mako 8.1.0 API
Loading...
Searching...
No Matches
JawsMako::IStructureElement Class Referenceabstract

A structure element in the structure tree. More...

#include <structure.h>

Inheritance diagram for JawsMako::IStructureElement:

Public Member Functions

virtual IStructureElementPtr clone () const =0
 Obtain a clone of the element.
 
virtual U8String getStructureType () const =0
 Get the structure type.
 
virtual void setStructureType (const U8String &structureType)=0
 Set the structure type. Must be non-zero length.
 
virtual void setTitle (const U8String &title)=0
 Set the "Title" of the structure element, or an empty string to remove.
 
virtual U8String getLanguage () const =0
 Get the language specifier for this element, or an empty string if none is specified.
 
virtual void setLanguage (const U8String &language)=0
 Set the language specifier for this element, or an empty string to remove.
 
virtual U8String getAlternate () const =0
 Get the alternate description of the structure element, in human-readable form. Returns an empty string if none is provided.
 
virtual void setAlternate (const U8String &alternateDescription)=0
 Set the alternate description of the structure element, or an empty string to remove.
 
virtual U8String getActualText () const =0
 Get the actual text of the structure element. Returns an empty string if none is provided.
 
virtual void setActualText (const U8String &actualText)=0
 Set the alternate description of the structure element, or an empty string to remove.
 
virtual void setAttributes (const IPDFObjectPtr &attributes)=0
 Set the PDF object representing the attributes of this element. Please see the PDF specification for the format of these objects. Any far references should be retrievable using the object store (see getObjectStore() above)
 
virtual IPDFObjectPtr getAttributes () const =0
 Obtain the PDF object representing the attributes of this element. Please see the PDF specification for the format of these objects. Any far references should be retrievable from the IDocument associated with the structure (see IDocument::getObjectStore() for details)
 
virtual void appendElement (const IStructurePtr &structure, const IStructureElementPtr &element)=0
 Add an element to the end of the children. An exception will be thrown if the element already exists in the structure tree. The structure containing the target element must be provided.
 
virtual void insertElement (const IStructurePtr &structure, const IStructureElementPtr &element, uint32 index)=0
 Insert an element at the given index, where 0 is the head. An exception will be thrown if an element is added that already exists in the structure tree.
 
virtual void appendMarkedContentReferenceChild (const IStructureMarkedContentReferenceChildPtr &child)=0
 Add a marked content reference to the end of the children.
 
virtual void insertMarkedContentReferenceChild (const IStructureMarkedContentReferenceChildPtr &child, uint32 index)=0
 Insert a marked content reference into the children at the given index.
 
virtual void appendObjectReferenceChild (const IPagePtr &page, const IDOMFormPtr &targetForm)=0
 Add an object reference targeting the given form to the end of the children. In some situations the form may have its properties edited. Pass in the page (required) that the form will appear on.
 
virtual void insertObjectReferenceChild (const IPagePtr &page, const IDOMFormPtr &targetForm, uint32 index)=0
 Insert an object reference targeting the given form into the children at the given index, where 0 is the head. In some situations the form may have its properties edited. Pass in the page (required) that the form will appear on.
 
virtual void removeChild (const IStructurePtr &structure, uint32 index)=0
 Remove the child at the given index from the list of children. Note: This will also cause all child elements of that element to be removed.
 
virtual void createMarkedContentReferencePair (const IStructurePtr &structure, const IPagePtr &page, const IDOMNodePtr &node, IStructureMarkedContentReferenceChildPtr &resultReference, IMarkedContentStructureDetailsPtr &resultDetails)=0
 Create a IStructureMarkedContentReferenceChild and an IMarkedContentStructureDetails pair for a node present on a given page. Cannot be used with form nodes. Neither the node nor the target element are edited, but in some situations the parents of the node may have their properties edited.
 
virtual const CStructureElementChildVect & getChildren () const =0
 Get the child structure information.
 
virtual IStructureElementReferencePtr getStructureElementReference () const =0
 Obtain a reference for the structure element.
 
virtual IStructureElementPtr findStructureElementWithReference (const IStructureElementReferencePtr &reference) const =0
 Find the structure element matching the given reference, in the children. Returns NULL if it does not exist.
 
virtual IPDFObjectStorePtr getObjectStore ()=0
 Obtain access to the store of objects associated with the structure element. Objects which are controlled by formal Mako APIs may not be reachable, and may be overridden at output.
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Static Public Member Functions

static JAWSMAKO_API IStructureElementPtr create (const IJawsMakoPtr &jawsMako, const U8String &structureType)
 Create a structure element.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

A structure element in the structure tree.

Member Function Documentation

◆ appendElement()

virtual void JawsMako::IStructureElement::appendElement ( const IStructurePtr & structure,
const IStructureElementPtr & element )
pure virtual

Add an element to the end of the children. An exception will be thrown if the element already exists in the structure tree. The structure containing the target element must be provided.

Parameters
structureThe structure to which the element belongs.
elementThe structure element to add.

◆ appendMarkedContentReferenceChild()

virtual void JawsMako::IStructureElement::appendMarkedContentReferenceChild ( const IStructureMarkedContentReferenceChildPtr & child)
pure virtual

Add a marked content reference to the end of the children.

Parameters
childThe marked content reference child to add.

◆ appendObjectReferenceChild()

virtual void JawsMako::IStructureElement::appendObjectReferenceChild ( const IPagePtr & page,
const IDOMFormPtr & targetForm )
pure virtual

Add an object reference targeting the given form to the end of the children. In some situations the form may have its properties edited. Pass in the page (required) that the form will appear on.

Parameters
pageThe page on which the form will appear.
targetFormThe form to target with the object reference.

◆ clone()

virtual IStructureElementPtr JawsMako::IStructureElement::clone ( ) const
pure virtual

Obtain a clone of the element.

Returns
IStructureElementPtr A new structure element that is a deep clone of this one.

◆ create()

static JAWSMAKO_API IStructureElementPtr JawsMako::IStructureElement::create ( const IJawsMakoPtr & jawsMako,
const U8String & structureType )
static

Create a structure element.

Parameters
jawsMakoThe IJawsMako object.
structureTypeThe type of the structure element, such as "Document", "Part", etc.
Returns
IStructureElementPtr The new structure element.

◆ createMarkedContentReferencePair()

virtual void JawsMako::IStructureElement::createMarkedContentReferencePair ( const IStructurePtr & structure,
const IPagePtr & page,
const IDOMNodePtr & node,
IStructureMarkedContentReferenceChildPtr & resultReference,
IMarkedContentStructureDetailsPtr & resultDetails )
pure virtual

Create a IStructureMarkedContentReferenceChild and an IMarkedContentStructureDetails pair for a node present on a given page. Cannot be used with form nodes. Neither the node nor the target element are edited, but in some situations the parents of the node may have their properties edited.

See also IStructure::tagNode() for a simplified method for applying structure to an individual node.

Parameters
[in]structureThe structure to which the element belongs.
[in]pageThe page on which the node resides.
[in]nodeThe node to create the marked content reference for.
[out]resultReferenceThe resulting IStructureMarkedContentReferenceChildPtr to be filled in.
[out]resultDetailsThe resulting IMarkedContentStructureDetailsPtr to be filled in.

◆ findStructureElementWithReference()

virtual IStructureElementPtr JawsMako::IStructureElement::findStructureElementWithReference ( const IStructureElementReferencePtr & reference) const
pure virtual

Find the structure element matching the given reference, in the children. Returns NULL if it does not exist.

Parameters
referenceThe structure element reference to find.
Returns
IStructureElementPtr The structure element matching the reference.

◆ getActualText()

virtual U8String JawsMako::IStructureElement::getActualText ( ) const
pure virtual

Get the actual text of the structure element. Returns an empty string if none is provided.

Returns
U8String The actual text of the structure element, or an empty string if none is set.

◆ getAlternate()

virtual U8String JawsMako::IStructureElement::getAlternate ( ) const
pure virtual

Get the alternate description of the structure element, in human-readable form. Returns an empty string if none is provided.

Returns
U8String The alternate description of the structure element, or an empty string if none is set.

◆ getAttributes()

virtual IPDFObjectPtr JawsMako::IStructureElement::getAttributes ( ) const
pure virtual

Obtain the PDF object representing the attributes of this element. Please see the PDF specification for the format of these objects. Any far references should be retrievable from the IDocument associated with the structure (see IDocument::getObjectStore() for details)

Returns
IPDFObjectPtr The attributes, or NULL if not available. If non-null this can be edited freely, but any edits will not take effect unless setAttributes() is used.

◆ getChildren()

virtual const CStructureElementChildVect & JawsMako::IStructureElement::getChildren ( ) const
pure virtual

Get the child structure information.

Returns
CStructureElementChildVect The vector of child structure elements.

◆ getLanguage()

virtual U8String JawsMako::IStructureElement::getLanguage ( ) const
pure virtual

Get the language specifier for this element, or an empty string if none is specified.

Returns
U8String The language specifier, such as "en-US", or an empty string if none is set.

◆ getObjectStore()

virtual IPDFObjectStorePtr JawsMako::IStructureElement::getObjectStore ( )
pure virtual

Obtain access to the store of objects associated with the structure element. Objects which are controlled by formal Mako APIs may not be reachable, and may be overridden at output.

Returns
IPDFObjectStorePtr The object store for the document.

◆ getStructureElementReference()

virtual IStructureElementReferencePtr JawsMako::IStructureElement::getStructureElementReference ( ) const
pure virtual

Obtain a reference for the structure element.

Returns
IStructureElementReferencePtr The reference for this structure element.

◆ getStructureType()

virtual U8String JawsMako::IStructureElement::getStructureType ( ) const
pure virtual

Get the structure type.

Returns
U8String The structure type, such as "Document", "Part", etc.

◆ insertElement()

virtual void JawsMako::IStructureElement::insertElement ( const IStructurePtr & structure,
const IStructureElementPtr & element,
uint32 index )
pure virtual

Insert an element at the given index, where 0 is the head. An exception will be thrown if an element is added that already exists in the structure tree.

Parameters
structureThe structure to which the element belongs.
elementThe structure element to insert.
indexThe index at which to insert the element, where 0 is the head.

◆ insertMarkedContentReferenceChild()

virtual void JawsMako::IStructureElement::insertMarkedContentReferenceChild ( const IStructureMarkedContentReferenceChildPtr & child,
uint32 index )
pure virtual

Insert a marked content reference into the children at the given index.

Parameters
childThe marked content reference child to insert.
indexThe index at which to insert the child, where 0 is the head.

◆ insertObjectReferenceChild()

virtual void JawsMako::IStructureElement::insertObjectReferenceChild ( const IPagePtr & page,
const IDOMFormPtr & targetForm,
uint32 index )
pure virtual

Insert an object reference targeting the given form into the children at the given index, where 0 is the head. In some situations the form may have its properties edited. Pass in the page (required) that the form will appear on.

Parameters
pageThe page on which the form will appear.
targetFormThe form to target with the object reference.
indexThe index at which to insert the object reference, where 0 is the head.

◆ removeChild()

virtual void JawsMako::IStructureElement::removeChild ( const IStructurePtr & structure,
uint32 index )
pure virtual

Remove the child at the given index from the list of children. Note: This will also cause all child elements of that element to be removed.

Parameters
structureThe structure to which the element belongs.
indexThe index of the child to remove, where 0 is the head.

◆ setActualText()

virtual void JawsMako::IStructureElement::setActualText ( const U8String & actualText)
pure virtual

Set the alternate description of the structure element, or an empty string to remove.

Parameters
actualTextThe actual text of the structure element.

◆ setAlternate()

virtual void JawsMako::IStructureElement::setAlternate ( const U8String & alternateDescription)
pure virtual

Set the alternate description of the structure element, or an empty string to remove.

Parameters
alternateDescriptionThe alternate description of the structure element.

◆ setAttributes()

virtual void JawsMako::IStructureElement::setAttributes ( const IPDFObjectPtr & attributes)
pure virtual

Set the PDF object representing the attributes of this element. Please see the PDF specification for the format of these objects. Any far references should be retrievable using the object store (see getObjectStore() above)

Parameters
attributesEither a Dictionary, Array or NULL to clear the attributes.

◆ setLanguage()

virtual void JawsMako::IStructureElement::setLanguage ( const U8String & language)
pure virtual

Set the language specifier for this element, or an empty string to remove.

Parameters
languageA "Natural Language Specification" string representing the language and possibly a locale, such as "en-US".

◆ setStructureType()

virtual void JawsMako::IStructureElement::setStructureType ( const U8String & structureType)
pure virtual

Set the structure type. Must be non-zero length.

Parameters
structureTypeThe structure type to set, such as "Document", "Part", etc.

◆ setTitle()

virtual void JawsMako::IStructureElement::setTitle ( const U8String & title)
pure virtual

Set the "Title" of the structure element, or an empty string to remove.

Parameters
titleThe title of the structure element.

The documentation for this class was generated from the following file: