Foxit PDF SDK
FSLRStructureElement Class Reference
Inheritance diagram for FSLRStructureElement:
FSLRElement FSBase

Instance Methods

(unsigned int) - getAttributeValueARGB:index:
 Get an ARGB value (specified by index) for specified attribute type.
More...
 
(int) - getAttributeValueCount:
 Get value count of a specified attribute type.
More...
 
(FSLRStructureElement *) - getAttributeValueElement:index:
 Get an structure element object (specified by index) for specified attribute type.
More...
 
(FSLRStructureElementAttributeValueEnum- getAttributeValueEnum:index:
 Get an enum value (specified by index) for specified attribute type.
More...
 
(float) - getAttributeValueFloat:index:
 Get a float value (specified by index) for specified attribute type.
More...
 
(int) - getAttributeValueInt32:index:
 Get an integer value (specified by index) for specified attribute type.
More...
 
(NSString *) - getAttributeValueString:index:
 Get a string value (specified by index) for specified attribute type.
More...
 
(FSLRStructureElementAttributeValueType- getAttributeValueType:
 Get attribute value type for a specified attribute type.
More...
 
(FSRectF *) - getBBox
 Get bounding box.
More...
 
(FSLRElement *) - getChild:
 Get a child element by index.
More...
 
(int) - getChildCount
 Get the count of children elements.
More...
 
(FSLRStructureElement *) - getParentElement
 Get the parent element.
More...
 
(FSLRStructureElementAttributeType- getSupportedAttribute:
 Get a supported attribute type by index.
More...
 
(int) - getSupportedAttributeCount
 Get supported attribute count.
More...
 
(id) - initWithElement:
 Constructor, with parent class object.
More...
 
(id) - initWithOther:
 Constructor, with another structure element object.
More...
 
- Instance Methods inherited from FSLRElement
(FSLRElementElementType- getElementType
 Get element type.
More...
 
(id) - initWithOther:
 Constructor, with another base element object.
More...
 
(BOOL) - isContentElement
 Check whether current object is content element or not.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(BOOL) - isGraphicsObjectElement
 Check whether current object is graphics object element or not.
More...
 
(BOOL) - isStructureElement
 Check whether current object is structure element or not.
More...
 
(NSString *) - stringifyType
 Convert type (enum value) of current element to a short and memorable string (text) representation.
More...
 

Class Methods

(BOOL) + isArrayAttributeValueType:
 Check whether input attribute value type represents an array.
More...
 
(FSLRStructureElementAttributeType+ parseAttributeType:
 Parse a string representation for attribute type and retrieve the enum value for this attribute type.
More...
 
(NSString *) + stringifyAttributeType:
 Convert the enum value of a specified attribute type to a short and memorable string (text) representation.
More...
 
(NSString *) + stringifyEnumVariant:
 Convert the enum value of a specified attribute value enum to a short and memorable string (text) representation.
More...
 
- Class Methods inherited from FSLRElement
(NSString *) + stringifyElementType:
 Convert enum value of a specified element type to a short and memorable string (text) representation.
More...
 

Detailed Description

This class represents a structure element. A structure element can be used to construct a tree, like graphics structure element, paragraph structure element, span structure element and so on.

Method Documentation

◆ getAttributeValueARGB:index:()

- (unsigned int) getAttributeValueARGB: (FSLRStructureElementAttributeType type
index: (int)  index 

Get an ARGB value (specified by index) for specified attribute type.

This function is available for attributes whose value type is FSLRStructureElementAttributeValueTypeARGB or FSLRStructureElementAttributeValueTypeARGBArray. For other value type, this function will return 0.

Parameters
[in]typeAttribute type. Please refer to values starting from FSLRStructureElementAttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function FSLRStructureElement::getAttributeValueCount:.
Returns
ARGB value.

◆ getAttributeValueCount:()

- (int) getAttributeValueCount: (FSLRStructureElementAttributeType type

Get value count of a specified attribute type.

  • When the value type of an attribute type represents an array, this function returns the size of the array.
  • When the value type of an attribute type does not represent an array, this function will alway return 1.


Parameters
[in]typeAttribute type. Please refer to values starting from FSLRStructureElementAttributeTypeRole and this should be one of these values.
Returns
Value count of a specified attribute type.

◆ getAttributeValueElement:index:()

- (FSLRStructureElement *) getAttributeValueElement: (FSLRStructureElementAttributeType type
index: (int)  index 

Get an structure element object (specified by index) for specified attribute type.

This function is available for attributes whose value type is FSLRStructureElementAttributeValueTypeElement or FSLRStructureElementAttributeValueTypeElementArray. For other value type, this function will return a structure element whose function LRStructureElement::IsEmpty returns YES.

Parameters
[in]typeAttribute type. Please refer to values starting from FSLRStructureElementAttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function FSLRStructureElement::getAttributeValueCount:.
Returns
A structure element.

◆ getAttributeValueEnum:index:()

- (FSLRStructureElementAttributeValueEnum) getAttributeValueEnum: (FSLRStructureElementAttributeType type
index: (int)  index 

Get an enum value (specified by index) for specified attribute type.

This function is available for attributes whose value type is FSLRStructureElementAttributeValueTypeEnum or FSLRStructureElementAttributeValueTypeEnumArray. For other value type, this function will return FSLRStructureElementAttributeValueEnumInvalid.

Parameters
[in]typeAttribute type. Please refer to values starting from FSLRStructureElementAttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function FSLRStructureElement::getAttributeValueCount:.
Returns
An enum value. Please refer to values starting from FSLRStructureElementAttributeValueEnumInvalid and this would be one of these values.

◆ getAttributeValueFloat:index:()

- (float) getAttributeValueFloat: (FSLRStructureElementAttributeType type
index: (int)  index 

Get a float value (specified by index) for specified attribute type.

This function is available for attributes whose value type is FSLRStructureElementAttributeValueTypeFloat or FSLRStructureElementAttributeValueTypeFloatArray. For other value type, this function will return 0.0.

Parameters
[in]typeAttribute type. Please refer to values starting from FSLRStructureElementAttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function FSLRStructureElement::getAttributeValueCount:.
Returns
Float value.

◆ getAttributeValueInt32:index:()

- (int) getAttributeValueInt32: (FSLRStructureElementAttributeType type
index: (int)  index 

Get an integer value (specified by index) for specified attribute type.

This function is available for attributes whose value type is FSLRStructureElementAttributeValueTypeInt32 or FSLRStructureElementAttributeValueTypeInt32Array. For other value type, this function will return 0.

Parameters
[in]typeAttribute type. Please refer to values starting from FSLRStructureElementAttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function FSLRStructureElement::getAttributeValueCount:.
Returns
Integer value.

◆ getAttributeValueString:index:()

- (NSString *) getAttributeValueString: (FSLRStructureElementAttributeType type
index: (int)  index 

Get a string value (specified by index) for specified attribute type.

This function is available for attributes whose value type is FSLRStructureElementAttributeValueTypeWStr or FSLRStructureElementAttributeValueTypeWStrArray. For other value type, this function will return an empty string.

Parameters
[in]typeAttribute type. Please refer to values starting from FSLRStructureElementAttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function FSLRStructureElement::getAttributeValueCount:.
Returns
Wide string value.

◆ getAttributeValueType:()

Get attribute value type for a specified attribute type.

Parameters
[in]typeAttribute type. Please refer to values starting from FSLRStructureElementAttributeTypeRole and this should be one of these values.
Returns
Value type for the specified attribute type. Please refer to values starting from FSLRStructureElementAttributeValueTypeEmpty and this would be one of these values.

◆ getBBox()

- (FSRectF *) getBBox

Get bounding box.

Returns
Bounding box.

◆ getChild:()

- (FSLRElement *) getChild: (int)  index

Get a child element by index.

Parameters
[in]indexIndex of a child element to be retrieved. Valid range: from 0 to (count-1). count is returned by function FSLRStructureElement::getChildCount.
Returns
A child element.

◆ getChildCount()

- (int) getChildCount

Get the count of children elements.

Returns
Count of children elements.

◆ getParentElement()

- (FSLRStructureElement *) getParentElement

Get the parent element.

Returns
Parent element. If function LRStructureElement::IsEmpty for the returned object returns YES, that means current element does not have a parent element.

◆ getSupportedAttribute:()

- (FSLRStructureElementAttributeType) getSupportedAttribute: (int)  index

Get a supported attribute type by index.

Parameters
[in]indexIndex for a supported attribute whose type is to be retrieved. Valid range: from 0 to (count-1). count is returned by function FSLRStructureElement::getSupportedAttributeCount.
Returns
Attribute type of the attribute specified by index.

◆ getSupportedAttributeCount()

- (int) getSupportedAttributeCount

Get supported attribute count.

Returns
Count of supported attribute.

◆ initWithElement:()

- (id) initWithElement: (FSLRElement*)  element

Constructor, with parent class object.

Parameters
[in]elementParent class object.

◆ initWithOther:()

- (id) initWithOther: (FSLRStructureElement*)  other

Constructor, with another structure element object.

Parameters
[in]otherAnother structure element object.

◆ isArrayAttributeValueType:()

+ (BOOL) isArrayAttributeValueType: (FSLRStructureElementAttributeValueType type

Check whether input attribute value type represents an array.

Parameters
[in]typeAttribute value type. Please refer to values starting from FSLRStructureElementAttributeValueTypeEmpty and this should be one of these values.
Returns
YES means input type represents an array, while NO means input type does not represent an array.

◆ parseAttributeType:()

+ (FSLRStructureElementAttributeType) parseAttributeType: (NSString *)  type_string

Parse a string representation for attribute type and retrieve the enum value for this attribute type.

Parameters
[in]type_stringA string representation for a structure element attribute type.
Returns
Enum value for attribute type. Please refer to values starting from FSLRStructureElementAttributeTypeInvalid and this would be one of these values.

◆ stringifyAttributeType:()

+ (NSString *) stringifyAttributeType: (FSLRStructureElementAttributeType type

Convert the enum value of a specified attribute type to a short and memorable string (text) representation.

Parameters
[in]typeEnum value of a specified attribute type. Please refer to values starting from FSLRStructureElementAttributeTypeInvalid and this should be one of these values.
Returns
A string that represents the short and memorable string representation for specified type. If there is no short and memorable string representation, or input type is FSLRStructureElementAttributeTypeInvalid or an invalid enum value, this function would return an empty string.

◆ stringifyEnumVariant:()

+ (NSString *) stringifyEnumVariant: (FSLRStructureElementAttributeValueEnum type

Convert the enum value of a specified attribute value enum to a short and memorable string (text) representation.

Parameters
[in]typeEnum value of a specified attribute value enum. Please refer to values starting from FSLRStructureElementAttributeValueEnumInvalid and this should be one of these values.
Returns
A string that represents the short and memorable string representation for specified enum. If there is no short and memorable string representation, or input enum value is FSLRStructureElementAttributeValueEnumInvalid or an invalid enum value, this function would return an empty string.